-
Notifications
You must be signed in to change notification settings - Fork 179
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] Optionally check atree storage health before migration #5591
[Cadence 1.0] Optionally check atree storage health before migration #5591
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/stable-cadence #5591 +/- ##
==========================================================
+ Coverage 55.91% 57.30% +1.39%
==========================================================
Files 1049 817 -232
Lines 103170 83085 -20085
==========================================================
- Hits 57686 47614 -10072
+ Misses 41096 31726 -9370
+ Partials 4388 3745 -643
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This feature can be very useful for troubleshooting.
I left some comments. The before-migration storage health check needs to happen before migration.MigrateAccount()
.
Co-authored-by: Faye Amacker <33205765+fxamacker@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
accountBasedMigration := migrationConstructor( | ||
// Only check storage health before the first migration | ||
checkStorageHealthBeforeMigration && index == 0, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice ! 👍
Work towards onflow/cadence#3192
The atree storage health check after the migration might error because the input was already unhealthy.
Optionally check the health before the migration, and do not error if the output is unhealthy when the input was already unhealthy.