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

Move migrations to versioned tuples #2030

Closed
wants to merge 42 commits into from
Closed

Conversation

chevdor
Copy link
Contributor

@chevdor chevdor commented Oct 25, 2023

WIP

Description

Follow up of the work started in paritytech/polkadot#7168 by @ggwpez.

This PR moves all current migrations to versioned tuples.
It allows bringing all runtimes from the SDK repo into a compliant state similar to Polkadot and Kusama.

The introduction of migrations::V1_04_00 migrations::V1_05_00 was not fully required yet but was introduced as placeholder to get things started for the next release after the PR is merged.

When v1.5.0 will be released, all Unreleased migrations can move to migrations::V1_05_00 and free the room in the now empty migrations::Unreleased for the next version.

Check

The PR introduces a new CI check for the formatting of the migrations.

fmt

This PR introduces a few #[rustfmt::skip] to prevent the Migrations from being reformatted to stress on the importance of the migrations' ordering.

#[rustfmt::skip]
pub type Migrations = (
	migrations::V1_04_00,
	migrations::Unreleased
);
Checking migrations in repo: . 
./cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs:
  - ✅ V1_04_00
  - ✅ Unreleased
./cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs:
  - ✅ V0_09_20
  - ✅ V1_04_00
  - ✅ Unreleased
./cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs:
  - ✅ V1_04_00
  - ✅ Unreleased
./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs:
  - ✅ V1_04_00
  - ✅ Unreleased
./cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs:
  - ✅ V1_04_00
  - ✅ Unreleased
./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs:
  - ✅ V1_04_00
  - ✅ Unreleased
./polkadot/runtime/westend/src/lib.rs:
  - ✅ Unreleased
./cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs:
  - ✅ V1_04_00
  - ✅ Unreleased
./polkadot/runtime/rococo/src/lib.rs:
  - ✅ Unreleased
./cumulus/parachains/runtimes/testing/penpal/src/lib.rs:
  - ✅ V1_04_00
  - ✅ Unreleased
./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs:
  - ✅ V1_04_00
  - ✅ Unreleased

Checklist

  • My PR includes a detailed description as outlined in the "Description" section above
  • Fix formatting
  • My PR follows the labeling requirements of this project (at minimum one label for T
    required)

@paritytech-ci paritytech-ci requested review from a team October 25, 2023 15:52
@chevdor chevdor added T4-runtime_API This PR/Issue is related to runtime APIs. T9-cumulus This PR/Issue is related to cumulus. labels Oct 25, 2023
@bkchr bkchr added R0-silent Changes should not be mentioned in any release notes and removed T4-runtime_API This PR/Issue is related to runtime APIs. T9-cumulus This PR/Issue is related to cumulus. labels Oct 25, 2023
prdoc/pr_2030.prdoc Outdated Show resolved Hide resolved
@paritytech-ci paritytech-ci requested review from a team October 25, 2023 21:35
@chevdor chevdor requested review from a team as code owners November 7, 2023 13:33
@chevdor chevdor requested a review from a team December 6, 2023 14:06
@chevdor chevdor requested review from koute and a team as code owners December 6, 2023 14:06
@paritytech-review-bot paritytech-review-bot bot requested a review from a team December 13, 2023 09:01
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4707693

serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Mar 26, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Mar 27, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
bkchr pushed a commit that referenced this pull request Apr 10, 2024
* submit lane unblock transactions from relay

* moved body of select_nonces_to_deliver to the separate select_race_action

* extracted latest_confirmed_nonce_at_source method

* return Option<RaceAction> from select_race_action

* make required_source_header_at_target async

* remove extra argument from required_source_header_at_target

* small fixes in tests

* Revert "return Option<RaceAction> from select_race_action"

This reverts commit 9f13dbfae39a5a45564550e8c89b10a524a68729.

* implement required_source_header_at_target using what-if approach

* fix compilation

* fmt

* clippy

* moved some code to the can_submit_transaction_with
@bkchr bkchr closed this Jul 17, 2024
@bkchr bkchr deleted the wk-231025-version-migrations branch July 17, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants