-
Notifications
You must be signed in to change notification settings - Fork 823
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
pallet-contracts: Do not return an error on already applied upgrades #2077
Conversation
Migrations in general should just skip the operation, if they were already applied. This is especially useful for CI checks that run in each pr to check that the current set of migrations are valid.
agreed, let me update that to a warn log. I think the is_upgrade_supported might need to be adjusted as well. Double checking.. |
There is a |
The CI pipeline was cancelled due to failure one of the required jobs. |
already fixed #2079 |
Pull request was closed
@liamaharon This should stay ensure!(
T::Migrations::is_upgrade_supported(on_chain_version, current_version),
"Unsupported upgrade: VERSION_RANGE should be (on-chain storage version + 1, current storage version)"
); the noop case though should just trigger a warning. |
@pgherveou can that case be hit during normal execution (if the migration is left in the Executive tuple indefinitely) or does it only exec in an error path? |
Restore fix from paritytech#2077
Migrations in general should just skip the operation, if they were already applied. This is especially useful for CI checks that run in each pr to check that the current set of migrations are valid.