Skip to content

Conversation

@sigurpol
Copy link
Contributor

@sigurpol sigurpol commented Nov 12, 2025

  • 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

@sigurpol sigurpol requested review from a team as code owners November 12, 2025 11:33
@sigurpol
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump patch

@sigurpol sigurpol added the R0-no-crate-publish-required The change does not require any crates to be re-published. label Nov 12, 2025
@sigurpol sigurpol marked this pull request as draft November 12, 2025 12:48
@sigurpol sigurpol marked this pull request as ready for review November 12, 2025 13:20
#( (<Tuple as crate::traits::PalletInfoAccess>::name(), Tuple::try_state) ),*
)];

excluded_pallet_names.iter().for_each(|excluded_name| {
Copy link
Member

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.

Copy link
Contributor Author

@sigurpol sigurpol Nov 13, 2025

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

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/19325287152
Failed job name: check-runtime-migration

Copy link
Contributor

@kianenigma kianenigma left a 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.

@sigurpol
Copy link
Contributor Author

Both westend (skipping staking-related pallets, proper cleanup will be done in #9442) and WAH (manually fixing on-chain via rebag the missing nominator in VoterList) migrations are now successful see https://github.com/paritytech/polkadot-sdk/actions/runs/19311023621/job/55286291294?pr=10300

@bkchr bkchr added this pull request to the merge queue Nov 13, 2025
Merged via the queue into master with commit 463ef05 Nov 13, 2025
273 of 276 checks passed
@bkchr bkchr deleted the sigurpol-try-runtime-allexcept branch November 13, 2025 17:57
0xRVE pushed a commit that referenced this pull request Nov 18, 2025
…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>
@sigurpol sigurpol added the A4-backport-stable2512 Pull request must be backported to the stable2512 release branch label Jan 22, 2026
paritytech-release-backport-bot bot pushed a commit that referenced this pull request Jan 22, 2026
…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)
@paritytech-release-backport-bot

Successfully created backport PR for stable2512:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-stable2512 Pull request must be backported to the stable2512 release branch R0-no-crate-publish-required The change does not require any crates to be re-published.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants