-
-
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
Correctly handle failed migrations #17575
Correctly handle failed migrations #17575
Conversation
There is a bug in handling failed migrations whereby the migration task gets decoupled from the migration repository. This leads to a failure of the task to get deleted with the repository and also leads to the migration failed page resulting in a ISE. This PR removes the zeroing out of the task id from the migration but also makes the migration handler tolerate missing tasks much nicer. Fix go-gitea#17571 Signed-off-by: Andrew Thornton <art27@cantab.net>
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## main #17575 +/- ##
==========================================
+ Coverage 45.49% 45.53% +0.04%
==========================================
Files 793 793
Lines 88811 88822 +11
==========================================
+ Hits 40401 40449 +48
+ Misses 41897 41857 -40
- Partials 6513 6516 +3
Continue to review full report at Codecov.
|
Now as a follow-up to this we need to make the UI for the user to view their tasks. |
Co-authored-by: Gusted <williamzijl7@hotmail.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Correctly handle failed migrations There is a bug in handling failed migrations whereby the migration task gets decoupled from the migration repository. This leads to a failure of the task to get deleted with the repository and also leads to the migration failed page resulting in a ISE. This PR removes the zeroing out of the task id from the migration but also makes the migration handler tolerate missing tasks much nicer. Fix go-gitea#17571 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Correctly handle failed migrations There is a bug in handling failed migrations whereby the migration task gets decoupled from the migration repository. This leads to a failure of the task to get deleted with the repository and also leads to the migration failed page resulting in a ISE. This PR removes the zeroing out of the task id from the migration but also makes the migration handler tolerate missing tasks much nicer. Fix #17571 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* BUGFIXES * Revert "Fix delete u2f keys bug (go-gitea#18042)" (go-gitea#18107) * Migrating wiki don't require token, so we should move it out of the require form (go-gitea#17645) (go-gitea#18104) * Prevent NPE if gitea uploader fails to open url (go-gitea#18080) (go-gitea#18101) * Reset locale on login (go-gitea#17734) (go-gitea#18100) * Correctly handle failed migrations (go-gitea#17575) (go-gitea#18099) * Instead of using routerCtx just escape the url before routing (go-gitea#18086) (go-gitea#18098) * Quote references to the user table in consistency checks (go-gitea#18072) (go-gitea#18073) * Add NotFound handler (go-gitea#18062) (go-gitea#18067) * Ensure that git repository is closed before transfer (go-gitea#18049) (go-gitea#18057) * Use common sessioner for API and web routes (go-gitea#18114) * TRANSLATION * Fix code search result hint on zh-CN (go-gitea#18053) Signed-off-by: Andrew Thornton <art27@cantab.net>
* BUGFIXES * Revert "Fix delete u2f keys bug (#18042)" (#18107) * Migrating wiki don't require token, so we should move it out of the require form (#17645) (#18104) * Prevent NPE if gitea uploader fails to open url (#18080) (#18101) * Reset locale on login (#17734) (#18100) * Correctly handle failed migrations (#17575) (#18099) * Instead of using routerCtx just escape the url before routing (#18086) (#18098) * Quote references to the user table in consistency checks (#18072) (#18073) * Add NotFound handler (#18062) (#18067) * Ensure that git repository is closed before transfer (#18049) (#18057) * Use common sessioner for API and web routes (#18114) * TRANSLATION * Fix code search result hint on zh-CN (#18053) Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Correctly handle failed migrations There is a bug in handling failed migrations whereby the migration task gets decoupled from the migration repository. This leads to a failure of the task to get deleted with the repository and also leads to the migration failed page resulting in a ISE. This PR removes the zeroing out of the task id from the migration but also makes the migration handler tolerate missing tasks much nicer. Fix go-gitea#17571 Signed-off-by: Andrew Thornton <art27@cantab.net>
There is a bug in handling failed migrations whereby the migration task gets decoupled
from the migration repository. This leads to a failure of the task to get deleted with
the repository and also leads to the migration failed page resulting in a ISE.
This PR reloads the repo before the zeroing out of the repo id from the migration task. This should mean that the repo is much more likely to get deleted but we also make
the migration handler tolerate missing tasks much nicer.
Fix #17571
Signed-off-by: Andrew Thornton art27@cantab.net