-
Notifications
You must be signed in to change notification settings - Fork 1k
Call SingleBlockMigrations from frame_system::Config on try_on_runtime_upgrade #9451
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides a missing test it looks good 👍
I hope we can still backport stuff into unstable2507 since the runtimes will directly go to that. |
I think all CI checks related to this PR are now passing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. (holidays)
I'm not happy with the current test, please fix it and then we can merge this.
The fixed method is inside |
Also important to note that this is a bug. |
…e_upgrade (#9451) Recently, when moving the single block migrations from `frame_executive::Executive` to `SingleBlockMigrations` in `frame_system::Config`, I noticed that `try_runtime_upgrade` was ignoring the `SingleBlockMigrations` defined in frame_system. More context at polkadot-fellows/runtimes#844 Based on PR #1781 and [PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29), the new way for providing the single block migrations should be through `SingleBlockMigrations` in `frame_system::Config`. Providing them from `frame_executive::Executive` is still supported, but from what I understood is or will be deprecated. > `SingleBlockMigrations` this is the new way of configuring migrations that run in a single block. Previously they were defined as last generic argument of Executive. This shift is brings all central configuration about migrations closer into view of the developer (migrations that are configured in Executive will still work for now but is deprecated). ## Follow-up Changes Will try to open a pull request tomorrow for deprecating the use of `OnRuntimeUpgrade` in `frame_executive::Executive`. (cherry picked from commit 7753112)
Successfully created backport PR for |
Successfully created backport PR for |
…e_upgrade (#9451) Recently, when moving the single block migrations from `frame_executive::Executive` to `SingleBlockMigrations` in `frame_system::Config`, I noticed that `try_runtime_upgrade` was ignoring the `SingleBlockMigrations` defined in frame_system. More context at polkadot-fellows/runtimes#844 Based on PR #1781 and [PRDoc](https://github.com/paritytech/polkadot-sdk/blob/beb9030b249cc078b3955232074a8495e7e0302a/prdoc/1.9.0/pr_1781.prdoc#L29), the new way for providing the single block migrations should be through `SingleBlockMigrations` in `frame_system::Config`. Providing them from `frame_executive::Executive` is still supported, but from what I understood is or will be deprecated. > `SingleBlockMigrations` this is the new way of configuring migrations that run in a single block. Previously they were defined as last generic argument of Executive. This shift is brings all central configuration about migrations closer into view of the developer (migrations that are configured in Executive will still work for now but is deprecated). ## Follow-up Changes Will try to open a pull request tomorrow for deprecating the use of `OnRuntimeUpgrade` in `frame_executive::Executive`. (cherry picked from commit 7753112)
Backport #9451 into `stable2506` from RomarQ. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Co-authored-by: Rodrigo Quelhas <[email protected]>
Backport #9451 into `unstable2507` from RomarQ. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Co-authored-by: Rodrigo Quelhas <[email protected]>
Recently, when moving the single block migrations from
frame_executive::Executive
toSingleBlockMigrations
inframe_system::Config
, I noticed thattry_runtime_upgrade
was ignoring theSingleBlockMigrations
defined in frame_system. More context at polkadot-fellows/runtimes#844Based on PR #1781 and PRDoc, the new way for providing the single block migrations should be through
SingleBlockMigrations
inframe_system::Config
. Providing them fromframe_executive::Executive
is still supported, but from what I understood is or will be deprecated.Follow-up Changes
Will try to open a pull request tomorrow for deprecating the use of
OnRuntimeUpgrade
inframe_executive::Executive
.