Skip to content
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

[feature]Pallet migration wildsearch #64

Open
flipchan opened this issue Jul 20, 2023 · 6 comments
Open

[feature]Pallet migration wildsearch #64

flipchan opened this issue Jul 20, 2023 · 6 comments
Assignees

Comments

@flipchan
Copy link
Collaborator

Goal of this is to try to auto detect migrations that already exists in pallets.

Ideas:
Git clone and do a wildsearch for "migrations" or "migrate"

Problem:
No naming standard for storage migrations

@flipchan
Copy link
Collaborator Author

pallet migration search feature from usage future:

Pallet migration search

Now that we know that a new version of pallet "Scheduler" has been rolled out in the runtime upgrade, we want to see if the new version of the pallet comes with built in migrations:

$ uptest --migration-search Scheduler --migration-branch "polkadot-v0.9.32"
[debug] Searching for pallet Scheduler in https://github.com/paritytech/substrate/ branch polkadot-v0.9.32  
[debug] Found Pallet Scheduler Version: 4.0.0-dev
[debug] Pallet Scheduler contains migration.rs
Uptest found migrations v3 to v4 in Pallet Scheduler```

@flipchan
Copy link
Collaborator Author

spider is wip, will be pushed monday/tuesday

@flipchan
Copy link
Collaborator Author

https://github.com/uptest-sc/uptest/tree/migration_search, todo clean up and create tests

@flipchan
Copy link
Collaborator Author

flipchan commented Jul 25, 2023

$ cargo run -p uptest-examples --example migration_search_test

Starting search, looking for pallet-balances
Found crate: "pallet-balances"
Crates version is: 21.0.0
Downloading crate: "pallet-balances" version: "21.0.0"
crate downloaded ok
crate saved as pallet-balances-21.0.0.gzip
unziping file
file downloaded
Glob search with pallet-balances-21.0.0
found match: "fn migrate_v0_to_v1<T: Config<I>, I: 'static>(" in file: pallet-balances-21.0.0/src/migration.rs
All done

@flipchan flipchan linked a pull request Jul 25, 2023 that will close this issue
@flipchan
Copy link
Collaborator Author

#66

@flipchan
Copy link
Collaborator Author

flipchan commented Sep 4, 2023

merged but not documented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant