Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

scheduler migration minor fixes #7638

Merged
merged 1 commit into from
Aug 20, 2023
Merged

Conversation

liamaharon
Copy link
Contributor

Existing scheduler pre/post hooks contain unnecessarily strict checks which will begin failing after the migration is applied, breaking our runtime migration CI checks.

I could have used VersionedRuntimeUpgrade here, but it seemed overkill and I didn't want to break the API and cause unnecessary merge conflicts in Rob's async backing PR.

pre_upgrade change

Removed check ensuring on-chain version is 0.

This check is unnecessary as it is already checked in on_runtime_upgrade, which skips the migration and warns the developer if the migration can be removed.

post_upgrade change:

Changed check ensuring the post-upgrade version == 1 to checking it is >= 1.

This check is unnecessary because all pallet post_upgrade hooks already check that the on-chain version matches the pallet version post-upgrade.

@liamaharon liamaharon added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. T1-runtime This PR/Issue is related to the topic “runtime”. labels Aug 18, 2023
Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

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

Are there more of such cases?

@liamaharon
Copy link
Contributor Author

Are there more of such cases?

none others that I could spot

@liamaharon liamaharon requested a review from a team August 18, 2023 11:14
@bkchr bkchr merged commit aba8bee into master Aug 20, 2023
18 checks passed
@bkchr bkchr deleted the liam/scheduler-migration-prepost-hooks branch August 20, 2023 20:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. T1-runtime This PR/Issue is related to the topic “runtime”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants