Implements unattended package migrations for both explicit and implicit migrations (#10418)

* Clean up and changes to backoffice for the nuget only packages

* temp commit of package logic removal

* Lots of package code cleanup and removal

* Removes old package data from the test package xml

* Updates packaging code to take in XDocument instead of a file since we'll not be dealing with files, starts creating expressions for the package migrations scripting.

* fixing tests

* Fixes runtime state and boot failed middleware so that it actually runs. Separates out unattended install/upgrade into notification handlers.

* Gets unattended package migrations working and running

* Gets embedded package.xml resources able to install from package migration.

* Implements automatic package migrations for package that just declare an xml data manifest.

* fix build

* small cleanups

* fix build

* adds some tests

* Fix export test

* Fix newlines in test for linux

* Typo

* removes old todos and updates AutomaticPackgeMigrationPlan to use getter with backing field.

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Shannon Deminick
2021-06-15 15:05:57 +10:00
committed by GitHub
parent dc6f1a6086
commit de2fb47b78
120 changed files with 1963 additions and 6284 deletions

View File

@@ -136,32 +136,5 @@ namespace Umbraco.Cms.Infrastructure.Install
return _databaseBuilder.IsUmbracoInstalled() == false;
}
}
public IEnumerable<Package> GetStarterKits()
{
if (_httpClient == null)
_httpClient = new HttpClient();
var packages = new List<Package>();
try
{
var requestUri = $"https://our.umbraco.com/webapi/StarterKit/Get/?umbracoVersion={_umbracoVersion.Version}";
using (var request = new HttpRequestMessage(HttpMethod.Get, requestUri))
{
var response = _httpClient.SendAsync(request).Result;
var json = response.Content.ReadAsStringAsync().Result;
packages = _jsonSerializer.Deserialize<IEnumerable<Package>>(json).ToList();
}
}
catch (AggregateException ex)
{
_logger.LogError(ex, "Could not download list of available starter kits");
}
return packages;
}
}
}