This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[Feature] Sequential migration execution for try-runtime #12319
Merged
paritytech-processbot
merged 24 commits into
master
from
ru/feature/try-runtime-sequential
Sep 23, 2022
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
bfce676
[Feature] Sequential migration execution for try-runtime
ruseinov efc3d29
remove unused
ruseinov 5de382e
guards
ruseinov 3f3fdda
reinstate encode/decode
ruseinov 2c4b856
proper feature gate
ruseinov 4c455a8
proper test feature gate
ruseinov 7522aac
Update frame/support/src/traits/hooks.rs
ruseinov 2e13236
Update frame/support/src/traits/hooks.rs
ruseinov 551f04a
fix tests
ruseinov 7bd6c17
redo Tuple tests
ruseinov 7676a47
Update frame/support/src/traits/hooks.rs
ruseinov da7dd03
use parameter_types for testing
ruseinov d2efbba
lint fix
ruseinov 626c5bf
Update frame/support/src/traits/hooks.rs
ruseinov 20c0793
Update frame/support/src/traits/hooks.rs
ruseinov 98fc5a3
Merge remote-tracking branch 'origin/master' into ru/feature/try-runt…
3d2098a
eloquent feature gate
ruseinov d7102dc
redo tests
ruseinov 1537c99
more fixes
ruseinov 6eb790e
properly handle pre/post errors
ruseinov d7d6078
remove some tests and fix the others
ruseinov 57d0f0b
add format import
ruseinov 11c2a6b
import fix
ruseinov 759b851
more import fixes
ruseinov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 test is not quite needed anymore as we don't combine the outputs anymore.
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 mean, it is nice that we're testing
impl_trait_for_tuples
, but I think it should be more meaningful.For example, with the new logic, I would test the following:
feature = try-runtime
, pre-migrate has been run. You can assert this by writing to some static value inpre_migrate
not(feature = try-runtime)
, they don't happen. You can test this by making sure aOnRuntimeUpgrade
that panicspre_upgrade
runs fine innot(feature = try-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.
I don’t see a reason to introduce those tbh. try-runtime methods are feature-gated, so are the tests. We can’t test feature-gated stuff in a non-feature-gated test.
We have assertions in the test implementations of OnRuntimeUpgrade trait and I think it’s totally valid to test all those scenarios to see that things have been executed with nested tuples, for example.