-
Notifications
You must be signed in to change notification settings - Fork 813
Document Deploy legacy property type migrators, import and migration flow and clarify grid editor configuration #6533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
5a2800c
f0e6620
0ad2685
266d18e
049bcbd
37ab97d
bb4be99
8d473d4
898c98a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,34 @@ internal class ArtifactMigratorsComposer : IComposer | |
| } | ||
| ``` | ||
|
|
||
| ### Import and migration flow | ||
|
|
||
| When an import is started, the following happens: | ||
| 1. Artifact signatures are read from the import provider (using `IArtifactImportProvider.GetArtifactSignatures()`). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before I start working on this list, I need to know: Is it steps that the user needs to go through, or is it an explanation of what happens during a migration/import? 🤔
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an explanation of the things that happen and should give users a better understanding of the (order of) operations. We also hadn't documented the notifications yet or the fact a default
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. I wont touch the list then 💪 It would be great to have a new section about notifications. |
||
| 2. The artifact signatures are sorted based on dependencies with `Ordering` enabled (ensuring dependent items are processed in the correct order, e.g. parent items before children and data types before document types). | ||
| 3. For each artifact signature: | ||
| 1. Check whether the entity type is allowed to be imported. | ||
| 2. Publish an `ArtifactImportingNotification` (cancelling will skip importing the artifact). | ||
| 4. Publish a `ValidateArtifactImportNotification`: | ||
| - Deploy adds a default handler (`ValidateArtifactImportDependenciesNotificationHandler`) to validate whether all dependencies are either in the import or already present in the current environment. It emits warnings for missing content artifacts, missing or different artifact checksums and errors for missing schema artifacts. | ||
| - The import fails on validation errors or 'soft' fails on warnings if the `WarningsAsErrors` import option is set. | ||
| 5. Create a Deploy scope and context (containing the 'owner' user for auditing purposes and cultures to import, in case the user doesn't have edit permissions for all languages). | ||
| 6. For each artifact signature: | ||
| 1. Create a (readonly) `Stream` for the artifact (using `IArtifactImportProvider.CreateArtifactReadStream(Udi)`). | ||
| 2. Deserialize the artifact into a generic JSON object (`JToken`). | ||
| 3. Parse the `__version` and `__type` properties and resolve the artifact type (using `IArtifactTypeResolver`). | ||
| 4. Migrate the JSON object (using `IArtifactJsonMigrator`). | ||
| 5. Deserialize the JSON object into the artifact type. | ||
| 6. Migrate the artifact (using `IArtifactMigrator`). | ||
| 7. Initialize artifact processing (using `IServiceConnector.ProcessInit(...)`) and track deploy state with next passes. | ||
| 7. For each next process pass (starting at the lowest initial next pass): | ||
| 1. Process artifact (using `IServiceConnector.Process(...)`). | ||
| 2. During processing: service connectors for content, media and members migrate property type values if a property editor alias has changed (using `IPropertyTypeMigrator`). | ||
| 3. When no next pass is required (the deploy state returns -1 as next pass): | ||
| 1. Publish an `ArtifactImportedNotification`. | ||
| 2. Report the import process (using `IProgress.Report(...)`). | ||
| 8. The Deploy scope is completed, causing all scoped notifications to be published to handlers implementing `IDistributedCacheNotificationHandler`) and completing the import. | ||
|
|
||
| ### Details of Specific Migrations | ||
|
|
||
| Umbraco Deploy ships with migrators to handle the conversion of core property editors as they have changed, been removed or replaced between versions. | ||
|
|
@@ -95,7 +123,7 @@ Open source migrators may be built by HQ or the community for property editors f | |
|
|
||
| #### Grid to Block Grid | ||
|
|
||
| The grid editor introduced in Umbraco 7 has been removed from Umbraco 14. It's functionality is replaced with the Block Grid. | ||
| The Grid editor introduced in Umbraco 7 can still be used in version 13, but has been removed from Umbraco 14. It's functionality is replaced with the Block Grid editor. | ||
ronaldbarendse marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| With Deploy migrators we have support for migrating Data Type configuration and property data between these property editors. | ||
|
|
||
|
|
@@ -118,6 +146,10 @@ internal sealed class DeployMigratorsComposer : IComposer | |
| } | ||
| ``` | ||
|
|
||
| {% hint style="info" %} | ||
| The project you're importing into needs to know about any custom legacy Grid editor configurations to correctly migrate to the Block Grid editor. Make sure to either copy the `grid.editors.config.js` and `package.manifest` (containing grid editors) files or override the `GetGridEditors()` method of the artifact migrator to provide this. | ||
ronaldbarendse marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {% endhint %} | ||
|
|
||
| These implementations make use of the following conventions to migrate the data: | ||
|
|
||
| - `ReplaceGridDataTypeArtifactMigrator`: | ||
|
|
@@ -201,6 +233,10 @@ The migrators add the following behavior: | |
| - `ReplaceDocTypeGridEditorDataTypeArtifactMigrator` extends `ReplaceGridDataTypeArtifactMigrator` and ensures any DocTypeGridEditor is migrated to blocks using the allowed element types. If the element types aren't found the default implementation will migrate to new element types. | ||
| - `DocTypeGridEditorPropertyTypeMigrator` extends `GridPropertyTypeMigrator` and ensures the Doc Type Grid Editor values are mapped one-to-one to the block item data. | ||
|
|
||
| {% hint style="info" %} | ||
| The artifact migrator adds the default DTGE grid editor configuration (with alias `docType`), which can be disabled by setting the `AddDefaultDocTypeGridEditor` property to `false` (in a custom/inherited class). Similar to the base migrator, any custom DTGE grid editor configurations need to be available to correctly migrate to the Block Grid editor. | ||
ronaldbarendse marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {% endhint %} | ||
|
|
||
| #### Migrating from Matryoshka | ||
|
|
||
| [Matryoshka](https://our.umbraco.com/packages/backoffice-extensions/matryoshka-tabs-for-umbraco-8/) was an Umbraco package that added tab support for document types in Umbraco. The feature was subsequently added to the product itself. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.