aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-11-13 11:28:50 +0000
committerGitHub <noreply@github.com>2021-11-13 19:28:50 +0800
commitbab95c3a86f63f521311a77e516be5b6c521e0a4 (patch)
tree2b77de81f4985b5f899c8769cfa1616dbf4285f7 /templates
parent47448083a1b88201dcfa00ec06fb748f5ac18040 (diff)
downloadgitea-bab95c3a86f63f521311a77e516be5b6c521e0a4.tar.gz
gitea-bab95c3a86f63f521311a77e516be5b6c521e0a4.zip
Correctly handle failed migrations (#17575)
* 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>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/migrate/migrating.tmpl6
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/repo/migrate/migrating.tmpl b/templates/repo/migrate/migrating.tmpl
index cc12243205..6df7f0a65d 100644
--- a/templates/repo/migrate/migrating.tmpl
+++ b/templates/repo/migrate/migrating.tmpl
@@ -25,7 +25,11 @@
<p id="repo_migrating_progress_message"></p>
</div>
<div id="repo_migrating_failed" hidden>
- <p>{{.i18n.Tr "repo.migrate.migrating_failed" .CloneAddr | Safe}}</p>
+ {{if .CloneAddr}}
+ <p>{{.i18n.Tr "repo.migrate.migrating_failed" .CloneAddr | Safe}}</p>
+ {{else}}
+ <p>{{.i18n.Tr "repo.migrate.migrating_failed_no_addr" | Safe}}</p>
+ {{end}}
<p id="repo_migrating_failed_error"></p>
</div>
{{if and .Failed .Permission.IsAdmin}}