Skip to content
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

Make parallel block editor migration optional #17827

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Dec 17, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #17810

Description

we're migrating all block editor data for V15 to a new data format that supports block level variance. For SQL Server, we run this migration in parallel to speed things up. Unfortunately, it turns out that certain content architectures won't support that - #17810 is an example of this.

This PR makes the parallel migration an opt-in thing, meaning one must explicitly choose to use parallel migration. It utilises the migration options that have already been put in place for opting out of the migration entirely (see this docs article).

Testing this PR

Setup a V13 or V14 site using SQL Server. Make sure you have a backup of the database 😄

Now run the V15 migration from this branch. It should run both with and without parallel execution of the migration.

To enable parallel migration, add the following composer:

using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0;

namespace UmbracoDocs.Samples;

public class DisableBlockEditorMigrationComposer : IComposer
{
    [Obsolete]
    public void Compose(IUmbracoBuilder builder)
        => builder.Services.Configure<ConvertBlockEditorPropertiesOptions>(options =>
        {
            // setting this to true will parallelize the migration of all Block Editors
            options.ParallelizeMigration = true;
        });
}

Docs update

I have queued a task to update the article above to include this configuration, after this is merged in 👍

Copy link
Member

@Zeegaan Zeegaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm 🚀

@Zeegaan Zeegaan merged commit b6351f9 into v15/dev Dec 18, 2024
27 of 28 checks passed
@Zeegaan Zeegaan deleted the v15/fix/17810-migrate-blocks-parallel-optional branch December 18, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants