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

fix: undecodable ForeignInvestmentInfo on Demo #1819

Merged
merged 5 commits into from
Apr 19, 2024

Conversation

wischli
Copy link
Contributor

@wischli wischli commented Apr 19, 2024

Description

  • Bumps Demo spec version to 1047
  • Adds two new utility functions for migrations which enable counting and removing undecodable storage entries
  • Removes one undecodable ForeignInvestmentInfo entry for dev runtime on Demo

Dev Logs

[2024-04-19T10:42:41Z INFO  development_runtime::migrations::cleanup_foreign_investments] CleanupForeignInvestments Initiating removal of undecodable keys
[2024-04-19T10:42:41Z INFO  development_runtime::migrations::cleanup_foreign_investments] CleanupForeignInvestments Removed 0 undecodable keys

Demo Logs

[2024-04-19T10:40:42Z INFO  development_runtime::migrations::cleanup_foreign_investments] CleanupForeignInvestments Failed to decode 1 keys, cleanup necessary
[2024-04-19T10:40:42Z INFO  development_runtime::migrations::cleanup_foreign_investments] CleanupForeignInvestments pre_upgrade done!
[2024-04-19T10:40:42Z INFO  development_runtime::migrations::cleanup_foreign_investments] CleanupForeignInvestments Initiating removal of undecodable keys
[2024-04-19T10:40:42Z ERROR runtime::storage] Corrupted state at `[70, 74, 237, 145, 57, 25, 186, 185, 47, 121, 243, 199, 183, 157, 40, 247, 239, 186, 193, 94, 147, 243, 120, 17, 137, 94, 38, 6, 5, 205, 196, 135, 164, 245, 206, 214, 102, 137, 87, 187, 42, 154, 149, 78, 126, 80, 245, 181, 4, 0, 0, 0, 0, 0, 0, 0]: Error`
[2024-04-19T10:40:42Z INFO  development_runtime::migrations::cleanup_foreign_investments] CleanupForeignInvestments Removed 1 undecodable keys
[2024-04-19T10:40:42Z INFO  development_runtime::migrations::cleanup_foreign_investments] CleanupForeignInvestments post_upgrade done with 4 remaining storage keys!

Checklist:

  • I have added Rust doc comments to structs, enums, traits and functions
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works

@wischli wischli added the I3-annoyance The code behaves as expected, but "expected" is an issue. label Apr 19, 2024
@wischli wischli self-assigned this Apr 19, 2024
@wischli wischli requested a review from lemunozm April 19, 2024 10:43
Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Really cool migration!

One question. Do we know why this storage was undecodable?

runtime/development/Cargo.toml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 48.56%. Comparing base (97cb823) to head (4dd6bd0).

Files Patch % Lines
runtime/common/src/migrations/mod.rs 0.00% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1819      +/-   ##
==========================================
- Coverage   48.66%   48.56%   -0.10%     
==========================================
  Files         167      168       +1     
  Lines       13318    13344      +26     
==========================================
  Hits         6481     6481              
- Misses       6837     6863      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wischli wischli enabled auto-merge (squash) April 19, 2024 14:13
@wischli wischli requested a review from lemunozm April 19, 2024 14:13
Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for this! 🙌🏻

@wischli wischli merged commit 66624fd into main Apr 19, 2024
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I3-annoyance The code behaves as expected, but "expected" is an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants