-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Avoid bad database state after failed migration #7040
Conversation
Is there any docs for setting up integration tests locally? I'll add a test case if I can get them running |
I think
|
Thanks. Out of interest, is there a reason we don’t rollback a database transaction here, instead of cleaning up manually? |
It's not in a transaction unfortunately. Keeping it in a transaction would cause the entire database to be locked whilst you're migrating potentially large repositories. |
Codecov Report
@@ Coverage Diff @@
## master #7040 +/- ##
==========================================
- Coverage 41.45% 41.44% -0.01%
==========================================
Files 442 442
Lines 59597 59597
==========================================
- Hits 24703 24701 -2
- Misses 31665 31667 +2
Partials 3229 3229
Continue to review full report at Codecov.
|
@rfwatson good catch. |
Ensure
g.repo
is not nil after a failed migration, this allows the cleanup here to be triggered as expected.Fixes #7039