Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2022-11-10 11:45:50 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2022-11-10 16:24:10 +0300
commit53be9e4d59675e4d4b590ee731c8bd15bfdea8ce (patch)
treee9ee09f7abf2695abd5269dfc9ce764774912a7e
parent4714f98d21479261f1d0e1bd68d7c4787d69d080 (diff)
remote: Standardize errors creationps-operations-fix
The error rate is tracked in the Sentry and if there are context that is always different for the same error case these errors won't be aggregated all together and won't create a precedent to investigate. Those we change error text to be same no matter what data is under processing. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/4471
-rw-r--r--internal/gitaly/service/remote/update_remote_mirror.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/gitaly/service/remote/update_remote_mirror.go b/internal/gitaly/service/remote/update_remote_mirror.go
index a6558d8e4..8919a2516 100644
--- a/internal/gitaly/service/remote/update_remote_mirror.go
+++ b/internal/gitaly/service/remote/update_remote_mirror.go
@@ -163,7 +163,7 @@ func (s *server) updateRemoteMirror(stream gitalypb.RemoteService_UpdateRemoteMi
if firstRequest.GetKeepDivergentRefs() {
isAncestor, err := repo.IsAncestor(ctx, git.Revision(remoteTarget), git.Revision(localRef.Target))
if err != nil && !errors.Is(err, localrepo.InvalidCommitError(remoteTarget)) {
- return fmt.Errorf("is %q an ancestor of %q: %w", remoteTarget, localRef.Target, err)
+ return fmt.Errorf("checking for ancestry: %w", err)
}
if !isAncestor {
@@ -193,7 +193,7 @@ func (s *server) updateRemoteMirror(stream gitalypb.RemoteService_UpdateRemoteMi
for remoteRef, remoteCommitOID := range toDelete {
isAncestor, err := repo.IsAncestor(ctx, git.Revision(remoteCommitOID), git.Revision(defaultBranch))
if err != nil && !errors.Is(err, localrepo.InvalidCommitError(remoteCommitOID)) {
- return fmt.Errorf("is %q an ancestor of %q: %w", remoteCommitOID, defaultBranch, err)
+ return fmt.Errorf("checking for ancestry: %w", err)
}
if isAncestor {