mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
CI: Disable runtime upgrade spec name check on Westend Asset Hub and fix Staking pallet migration (#2447)
Westend Asset Hub currently failing because the spec name is being changed next runtime upgrade (https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4413125). This also fixes an idempotency issue with a staking pallet migration. Similar issues will be caught automatically now that we've also updated to try-runtime-cli v0.5.0 which checks for idempotency issues. This also enables try-state checks running in the CI.
This commit is contained in:
@@ -101,16 +101,16 @@ check-rust-feature-propagation:
|
||||
export RUST_LOG=remote-ext=debug,runtime=debug
|
||||
|
||||
echo "---------- Downloading try-runtime CLI ----------"
|
||||
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime
|
||||
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.5.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime
|
||||
chmod +x ./try-runtime
|
||||
|
||||
echo "---------- Building ${PACKAGE} runtime ----------"
|
||||
time cargo build --release --locked -p "$PACKAGE" --features try-runtime
|
||||
|
||||
echo "---------- Executing on-runtime-upgrade for ${NETWORK} ----------"
|
||||
time ./try-runtime \
|
||||
time ./try-runtime ${COMMAND_EXTRA_ARGS} \
|
||||
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
|
||||
on-runtime-upgrade --checks=pre-and-post ${EXTRA_ARGS} live --uri ${URI}
|
||||
on-runtime-upgrade --disable-spec-version-check --checks=all ${SUBCOMMAND_EXTRA_ARGS} live --uri ${URI}
|
||||
|
||||
# Check runtime migrations for Parity managed relay chains
|
||||
check-runtime-migration-westend:
|
||||
@@ -124,7 +124,7 @@ check-runtime-migration-westend:
|
||||
PACKAGE: "westend-runtime"
|
||||
WASM: "westend_runtime.compact.compressed.wasm"
|
||||
URI: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
|
||||
EXTRA_ARGS: "--no-weight-warnings"
|
||||
SUBCOMMAND_EXTRA_ARGS: "--no-weight-warnings"
|
||||
|
||||
check-runtime-migration-rococo:
|
||||
stage: check
|
||||
@@ -137,7 +137,7 @@ check-runtime-migration-rococo:
|
||||
PACKAGE: "rococo-runtime"
|
||||
WASM: "rococo_runtime.compact.compressed.wasm"
|
||||
URI: "wss://rococo-try-runtime-node.parity-chains.parity.io:443"
|
||||
EXTRA_ARGS: "--no-weight-warnings"
|
||||
SUBCOMMAND_EXTRA_ARGS: "--no-weight-warnings"
|
||||
|
||||
# Check runtime migrations for Parity managed asset hub chains
|
||||
check-runtime-migration-asset-hub-westend:
|
||||
@@ -151,7 +151,7 @@ check-runtime-migration-asset-hub-westend:
|
||||
PACKAGE: "asset-hub-westend-runtime"
|
||||
WASM: "asset_hub_westend_runtime.compact.compressed.wasm"
|
||||
URI: "wss://westend-asset-hub-rpc.polkadot.io:443"
|
||||
|
||||
|
||||
check-runtime-migration-asset-hub-rococo:
|
||||
stage: check
|
||||
extends:
|
||||
@@ -214,6 +214,7 @@ check-runtime-migration-collectives-westend:
|
||||
PACKAGE: "collectives-westend-runtime"
|
||||
WASM: "collectives_westend_runtime.compact.compressed.wasm"
|
||||
URI: "wss://westend-collectives-rpc.polkadot.io:443"
|
||||
COMMAND_EXTRA_ARGS: "--disable-spec-name-check"
|
||||
|
||||
find-fail-ci-phrase:
|
||||
stage: check
|
||||
|
||||
@@ -81,20 +81,10 @@ pub mod v14 {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, TryRuntimeError> {
|
||||
frame_support::ensure!(
|
||||
Pallet::<T>::on_chain_storage_version() == 13,
|
||||
"Required v13 before upgrading to v14."
|
||||
);
|
||||
|
||||
Ok(Default::default())
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), TryRuntimeError> {
|
||||
frame_support::ensure!(
|
||||
Pallet::<T>::on_chain_storage_version() == 14,
|
||||
Pallet::<T>::on_chain_storage_version() >= 14,
|
||||
"v14 not applied"
|
||||
);
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user