Skip to content

Commit 5ed17d9

Browse files
lunnywxiaoguang
andauthored
Ignore the linux anchor point to avoid linux migrate failure (#29295)
Fix #28843 This PR will bypass the pushUpdateTag to database failure when syncAllTags. An error log will be recorded. --------- Co-authored-by: wxiaoguang <[email protected]>
1 parent eaede2d commit 5ed17d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/repository/repo.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@ func SyncReleasesWithTags(ctx context.Context, repo *repo_model.Repository, gitR
352352
}
353353

354354
if err := PushUpdateAddTag(ctx, repo, gitRepo, tagName, sha1, refname); err != nil {
355-
return fmt.Errorf("unable to PushUpdateAddTag: %q to Repo[%d:%s/%s]: %w", tagName, repo.ID, repo.OwnerName, repo.Name, err)
355+
// sometimes, some tags will be sync failed. i.e. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tag/?h=v2.6.11
356+
// this is a tree object, not a tag object which created before git
357+
log.Error("unable to PushUpdateAddTag: %q to Repo[%d:%s/%s]: %v", tagName, repo.ID, repo.OwnerName, repo.Name, err)
356358
}
357359

358360
return nil

0 commit comments

Comments
 (0)