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

[Cadence 1.0] Fix and improve state migration #5618

Merged
merged 4 commits into from
Apr 4, 2024

Conversation

turbolent
Copy link
Member

@turbolent turbolent commented Apr 2, 2024

Work towards onflow/cadence#3192

  • switch contract update problems from failures to logged errors: Do not fail the whole migration, just because some contracts could not be updated. This is especially annoying during development and debugging with a subset of the full state (e.g. the state is missing the system accounts). Replace the error with a structured log
  • fix storage health check: There was a mix-up in storage health check configuration, which brings us to:
  • clean up options: Prevent mixing up parameters. There are a lot of options, bundle them, and prevent mixing due to incorrect parameter order

@turbolent turbolent requested review from a team April 2, 2024 23:58
@turbolent turbolent self-assigned this Apr 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

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

Project coverage is 55.90%. Comparing base (33c1de0) to head (ba4c5f2).

Files Patch % Lines
cmd/util/ledger/migrations/cadence.go 83.87% 3 Missing and 2 partials ⚠️
...util/ledger/migrations/cadence_values_migration.go 66.66% 0 Missing and 3 partials ⚠️
cmd/util/cmd/execution-state-extract/cmd.go 93.75% 1 Missing ⚠️
...execution-state-extract/execution_state_extract.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##           feature/stable-cadence    #5618   +/-   ##
=======================================================
  Coverage                   55.89%   55.90%           
=======================================================
  Files                        1049     1049           
  Lines                      103244   103203   -41     
=======================================================
- Hits                        57713    57700   -13     
+ Misses                      41136    41112   -24     
+ Partials                     4395     4391    -4     
Flag Coverage Δ
unittests 55.90% <86.66%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@janezpodhostnik janezpodhostnik left a comment

Choose a reason for hiding this comment

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

Nice changes!

@turbolent turbolent merged commit 2a63347 into feature/stable-cadence Apr 4, 2024
55 checks passed
@turbolent turbolent deleted the bastian/improve-migration-3 branch April 4, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants