-
Notifications
You must be signed in to change notification settings - Fork 103
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
Removes already applied migrations #118
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.
Looks good, but let's merge after we see them applied on-chain.
Wait I'm confused, lemme double check this
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.
I saw comment #68 (comment) where it says you want to merge this PR for pending 1.1.0
release, but some migrations here were never released (they were added after 1.0.0
release).
So we should not include/merge this PR (at least in its current form) before 1.1.0
release.
relay/polkadot/src/lib.rs
Outdated
/// Upgrade Session keys to include BEEFY key. | ||
/// When this is removed, should also remove `OldSessionKeys`. | ||
pub struct UpgradeSessionKeys; | ||
impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys { | ||
fn on_runtime_upgrade() -> Weight { | ||
Session::upgrade_keys::<OldSessionKeys, _>(transform_session_keys); | ||
Perbill::from_percent(50) * BlockWeights::get().max_block | ||
} | ||
} |
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.
This migration was never released (and obviously never enacted on-chain) - don't remove it before we see it enacted.
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.
Haha, I didn't wanted to remove it :P I even left it in the list below :D Will readd the code, ty!
FYI: opened a PR for a doc with a quick guide that IMO we should follow to make our lives easier: #120 |
pallet_nomination_pools::migration::versioned_migrations::V5toV6<Runtime>, | ||
pallet_nomination_pools::migration::versioned_migrations::V6ToV7<Runtime>, | ||
|
||
runtime_parachains::scheduler::migration::v1::MigrateToV1<Runtime> |
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.
not sure how to check if this was already run on-chain, but I see it was added here after the last release:
- active on-chain is spec
polkadot/1_000_001
which was released on22.10.2023
- added in Fix migrations and add migration CI checks #75 merged a month later on
22.11.2023
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.
This was added after the release, to switch back to the fixed upstream one. However, I had included the fixed upstream migration directly in this repo here: https://github.com/polkadot-fellows/runtimes/pull/26/files#diff-efa4caeb17487ecb13d8f5eb7863c3241d84afa2e73fbf25909a2ca89df0f362R1739
pub type Migrations = ( | ||
pallet_collator_selection::migration::v1::MigrateToV1<Runtime>, | ||
pallet_multisig::migrations::v1::MigrateToV1<Runtime>, | ||
InitStorageVersions, |
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.
maybe also remove struct InitStorageVersions
defined and implemented below
(same for other system paras)
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.
Done
@@ -817,49 +817,14 @@ pub type UncheckedExtrinsic = | |||
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>; | |||
/// Migrations to apply on runtime upgrade. | |||
pub type Migrations = | |||
(pallet_collator_selection::migration::v1::MigrateToV1<Runtime>, InitStorageVersions); | |||
frame_support::migrations::VersionedMigration<0, 1, UniquesMigration, Uniques, RocksDbWeight>; |
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.
If the InitStorageVersions
was executed, we need to reset the Uniques
on-chain version back to 0 before running this.
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.
No this init was never executed on chain. This was the reason the CI was failing for this pr.
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.
I wonder why it was not, I can see it here - https://github.com/polkadot-fellows/runtimes/blob/v1.0.0/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs#L799
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.
Yes the migration was there. But the init of Uniques was added here: https://github.com/polkadot-fellows/runtimes/pull/87/files#diff-2dc481414ffabfb3b0b2c24f3c0cfc8a8b3ed6b56689a696d02be635795f5cb6R857
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.
I dont know why we use --disable-idempotency-checks
in the CI migration checks.
I will try it in a MR to see if we can enable it now (maybe at least for some runtimes).
|
Yea I cannot read 🙈 removed in #133 |
@muharem its not counting your approval since your on-chain identity does not contain a github in the |
it's not counting mine as well and I have my github in the additional field |
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.
Checked polkadot migration list in 1.0.1 and it checks out.
parachains_configuration::migration::v9::MigrateToV9<Runtime>, | ||
// Migrate parachain info format | ||
paras_registrar::migration::VersionCheckedMigrateToV1<Runtime, ParachainsToUnlock>, | ||
|
||
// Upgrade SessionKeys to include BEEFY key | ||
UpgradeSessionKeys, |
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.
is there an issue to track the removal of this in the next release so we don't forget?
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.
No we don't have an issue for this, but in the fellowship repo we can just remove always all the migrations.
The logs say something different:
|
Enable one more check in the CI to ensure that our migrations are idempotent. Can only merge after #118 --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]>
No description provided.