pallet-migrations: fix index access for singluar migrations#5695
Merged
pallet-migrations: fix index access for singluar migrations#5695
Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
ggwpez
commented
Sep 12, 2024
| } | ||
|
|
||
| fn nth_id(_n: u32) -> Option<Vec<u8>> { | ||
| Some(T::id().encode()) |
Member
Author
There was a problem hiding this comment.
This was the actual issue
Contributor
There was a problem hiding this comment.
Oh and this was not overwritten for a single migration that's not part of a tuple, right?
Member
Author
|
/cmd prdoc --pr 5695 --bump patch --audience "Runtime Dev" |
georgepisaltu
approved these changes
Sep 12, 2024
| } | ||
|
|
||
| fn nth_id(_n: u32) -> Option<Vec<u8>> { | ||
| Some(T::id().encode()) |
Contributor
There was a problem hiding this comment.
Oh and this was not overwritten for a single migration that's not part of a tuple, right?
bkchr
approved these changes
Sep 12, 2024
claravanstaden
approved these changes
Sep 13, 2024
seadanda
approved these changes
Sep 13, 2024
github-actions bot
pushed a commit
that referenced
this pull request
Sep 13, 2024
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: ggwpez <ggwpez@users.noreply.github.com> (cherry picked from commit 0136463)
github-actions bot
pushed a commit
that referenced
this pull request
Sep 13, 2024
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: ggwpez <ggwpez@users.noreply.github.com> (cherry picked from commit 0136463)
github-actions bot
pushed a commit
that referenced
this pull request
Sep 16, 2024
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: ggwpez <ggwpez@users.noreply.github.com> (cherry picked from commit 0136463)
Contributor
|
Git push to origin failed for stable2407 with exitcode 1 |
github-actions bot
pushed a commit
that referenced
this pull request
Sep 16, 2024
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: ggwpez <ggwpez@users.noreply.github.com> (cherry picked from commit 0136463)
Contributor
|
Successfully created backport PR for |
github-actions bot
pushed a commit
that referenced
this pull request
Sep 16, 2024
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90. It only occurs when a single MBM is configured - hence it did not happen when Ajuna Network tried it... Changes: - Check len of the tuple before accessing its nth_id - Make nth_id return `None` on unary tuples and n>0 --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: ggwpez <ggwpez@users.noreply.github.com> (cherry picked from commit 0136463)
Contributor
|
Successfully created backport PR for |
Contributor
|
Git push to origin failed for stable2409 with exitcode 1 |
ggwpez
added a commit
that referenced
this pull request
Sep 16, 2024
Backport #5695 into `stable2409` from ggwpez. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
ggwpez
added a commit
that referenced
this pull request
Sep 17, 2024
Backport #5695 into `stable2407` from ggwpez. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This was referenced Sep 24, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Discovered a bug in the migrations pallet while debugging paritytech/try-runtime-cli#90.
🚨 This can lead to your chain getting stuck. It happens when a single MBM is configured. Having no or more than one MBM will circumvent the issue.
Changes:
Noneon unary tuples and n>0