Skip to content

✨ Allow registering multiple config migrations at a time#456

Merged
wwilsman merged 6 commits intomasterfrom
ww/multi-config-migrations
Jul 29, 2021
Merged

✨ Allow registering multiple config migrations at a time#456
wwilsman merged 6 commits intomasterfrom
ww/multi-config-migrations

Conversation

@wwilsman
Copy link
Copy Markdown
Contributor

What is this?

With #450, the migrate function was updated to be able to migrate specific schemas. We can now utilize that new feature to register a snapshot config migration for deprecated options. These deprecations previously lived within a merge callback.

The migrate function was updated again in this PR to accept multiple migration at once similar to how we can register multiple schemas at once. The forced version was also moved into a default migration; and to ensure it always runs last, migrations are now registered in reverse order, so they run last-in-first-out.

wwilsman added 5 commits July 29, 2021 14:04
Instead, a default config migration can be registered to accomplish the same.

Migrations are now registered in reverse order, a.k.a. last-in-first-out. This allows the default
migration to always run last.
@wwilsman wwilsman added the ✨ enhancement New feature or request label Jul 29, 2021
@wwilsman wwilsman requested a review from Robdel12 July 29, 2021 19:30
Copy link
Copy Markdown
Contributor

@Robdel12 Robdel12 left a comment

Choose a reason for hiding this comment

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

🏁 oh this is a nice win!

We want to show this warning anytime the migration detects them. A deprecation log will only show
once per message. This was the previous behaviour, but accidentally got dropped when it was moved
@wwilsman wwilsman enabled auto-merge (squash) July 29, 2021 19:40
@wwilsman wwilsman merged commit 17508d6 into master Jul 29, 2021
@wwilsman wwilsman deleted the ww/multi-config-migrations branch July 29, 2021 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants