-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow running try-runtime checks for all pallets except those in the exclusion list #10300
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
|
/cmd prdoc --audience runtime_dev --bump patch |
…time_dev --bump patch'
| #( (<Tuple as crate::traits::PalletInfoAccess>::name(), Tuple::try_state) ),* | ||
| )]; | ||
|
|
||
| excluded_pallet_names.iter().for_each(|excluded_name| { |
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.
We could filter out here the names that should not be used with retain in try_state_fns. Then we don't need the extra iteration below.
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.
instead of retain I went for filter() + collect() which should achieve the same. Reasons being for_tuples! macro generates a compile time static array, and not the mutable vector retain requires. Plus in no_std/WASM context (e.g. while building for WAH) I got a error: cannot find macro vec in this scope. I could have tackled both mutating into Vec, implement Clone for tuple (&'static str, fn(...)) and then importing alloc::vec or similar. But I found that filter().collect() addresses your main concern w/o requiring any of above changes, it works with no_std and we collect references so no cloning needed. Hope it's ok
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
kianenigma
left a comment
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.
Nice, this will def be useful while we cleanup the failing try-states.
Once it is released, we should use the same in runtimes as well.
|
Both westend (skipping staking-related pallets, proper cleanup will be done in #9442) and WAH (manually fixing on-chain via |
…exclusion list (#10300) - Added `AllExcept` variant in `Select` enum to exclude try-runtime checks for a given list of pallets - Added `TryRuntimeUpgradeConfig` struct for extensible configuration of runtime upgrade testing - Added `Executive::try_runtime_upgrade_with_config()` for control over which pallets' try_state hooks to execute - Maintained backwards compatibility: existing `Executive::try_runtime_upgrade(checks)` function continues to work unchanged - Updated Westend runtime to use the new config-based API to exclude staking-related pallets (Staking, NominationPools, FastUnstake, DelegatedStaking) - This change is fully backwards compatible - external runtimes and tools (like try-runtime-cli) do not need to update their code --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…exclusion list (#10300) - Added `AllExcept` variant in `Select` enum to exclude try-runtime checks for a given list of pallets - Added `TryRuntimeUpgradeConfig` struct for extensible configuration of runtime upgrade testing - Added `Executive::try_runtime_upgrade_with_config()` for control over which pallets' try_state hooks to execute - Maintained backwards compatibility: existing `Executive::try_runtime_upgrade(checks)` function continues to work unchanged - Updated Westend runtime to use the new config-based API to exclude staking-related pallets (Staking, NominationPools, FastUnstake, DelegatedStaking) - This change is fully backwards compatible - external runtimes and tools (like try-runtime-cli) do not need to update their code --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> (cherry picked from commit 463ef05)
|
Successfully created backport PR for |
AllExceptvariant inSelectenum to exclude try-runtime checks for a given list of palletsTryRuntimeUpgradeConfigstruct for extensible configuration of runtime upgrade testingExecutive::try_runtime_upgrade_with_config()for control over which pallets' try_state hooks to executeExecutive::try_runtime_upgrade(checks)function continues to work unchanged