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

@@ -14,6 +14,7 @@ using Umbraco.Cms.Core.Packaging;
using Umbraco.Cms.Core.Routing;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.Implement;
using Umbraco.Cms.Infrastructure.Packaging;
using Umbraco.Extensions;
namespace Umbraco.Cms.Infrastructure.DependencyInjection
@@ -70,9 +71,7 @@ namespace Umbraco.Cms.Infrastructure.DependencyInjection
builder.Services.AddUnique<ConflictingPackageData>();
builder.Services.AddUnique<CompiledPackageXmlParser>();
builder.Services.AddUnique<ICreatedPackagesRepository>(factory => CreatePackageRepository(factory, "createdPackages.config"));
builder.Services.AddUnique<IInstalledPackagesRepository>(factory => CreatePackageRepository(factory, "installedPackages.config"));
builder.Services.AddUnique<PackageDataInstallation>();
builder.Services.AddUnique<PackageFileInstallation>();
builder.Services.AddUnique<IPackageInstallation, PackageInstallation>();
return builder;
@@ -91,8 +90,6 @@ namespace Umbraco.Cms.Infrastructure.DependencyInjection
factory.GetRequiredService<ILocalizationService>(),
factory.GetRequiredService<IHostingEnvironment>(),
factory.GetRequiredService<IEntityXmlSerializer>(),
factory.GetRequiredService<ILoggerFactory>(),
factory.GetRequiredService<IUmbracoVersion>(),
factory.GetRequiredService<IOptions<GlobalSettings>>(),
factory.GetRequiredService<IMediaService>(),
factory.GetRequiredService<IMediaTypeService>(),