diff options
author | zeripath <art27@cantab.net> | 2020-10-29 21:41:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 17:41:49 -0400 |
commit | 5b2096dd5f6d9ceb10662d9ca880e7f0d8bf55cf (patch) | |
tree | c847f206140cea8aee05b01e315a04ad4dfa2ae3 /modules | |
parent | 55801cf4eb9daeae43c828e54cd94ad841578cb6 (diff) | |
download | gitea-5b2096dd5f6d9ceb10662d9ca880e7f0d8bf55cf.tar.gz gitea-5b2096dd5f6d9ceb10662d9ca880e7f0d8bf55cf.zip |
Migrations should not fail for comment reactions (#13352)
An extension to #13444 - where we now ensure that comment reaction failures do not cause migrations failure
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/migrations/gitea_downloader.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/migrations/gitea_downloader.go b/modules/migrations/gitea_downloader.go index e30c92a2fc..0509c708bf 100644 --- a/modules/migrations/gitea_downloader.go +++ b/modules/migrations/gitea_downloader.go @@ -457,7 +457,11 @@ func (g *GiteaDownloader) GetComments(index int64) ([]*base.Comment, error) { for _, comment := range comments { reactions, err := g.getCommentReactions(comment.ID) if err != nil { - return nil, fmt.Errorf("error while listing reactions for comment %d in issue #%d. Error: %v", comment.ID, index, err) + log.Warn("Unable to load comment reactions during migrating issue #%d for comment %d to %s/%s. Error: %v", index, comment.ID, g.repoOwner, g.repoName, err) + if err2 := models.CreateRepositoryNotice( + fmt.Sprintf("Unable to load reactions during migrating issue #%d for comment %d to %s/%s. Error: %v", index, comment.ID, g.repoOwner, g.repoName, err)); err2 != nil { + log.Error("create repository notice failed: ", err2) + } } allComments = append(allComments, &base.Comment{ |