diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-06-07 16:04:46 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-06-10 13:40:18 +0300 |
commit | 30d4fd427fc63daef560f1608b3833b827ab54ac (patch) | |
tree | e2c4eedee6495a2701e782fa0049720cba0963be /ruby/proto | |
parent | bdd33f61948e5fa22da595f9b87e7d5032c19c26 (diff) |
operations: Use structured errors in UserDeleteBranchpks-user-delete-branch-structured-errors
UserDeleteBranch is returning successfully in some error cases. This is
a pattern we want to get rid of, so let's convert the RPC to instead use
the structured errors via the new `UserDeleteBranchError` message type.
This fixes some cases where we know to create replication jobs because
the `UserDeleteBranch` RPC returns successfully, but didn't cast a
single vote.
Changelog: fixed
Diffstat (limited to 'ruby/proto')
-rw-r--r-- | ruby/proto/gitaly/operations_services_pb.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ruby/proto/gitaly/operations_services_pb.rb b/ruby/proto/gitaly/operations_services_pb.rb index b71684ee1..c7e22ac03 100644 --- a/ruby/proto/gitaly/operations_services_pb.rb +++ b/ruby/proto/gitaly/operations_services_pb.rb @@ -28,9 +28,14 @@ module Gitaly # # - Returns `InvalidArgument` in case either the branch name or user are not set. # - Returns `FailedPrecondition` in case the branch does not exist. - # - Returns `OK` with a `PreReceiveError` in case custom hooks refused the update. - # - Returns `FailedPrecondition` in case updating the reference fails because of a concurrent - # write to the same reference. + # - Returns `OK` with a `PreReceiveError` in case custom hooks refused the update. If the + # `gitaly_user_delete_branch_structured_errors` feature flag is enabled this error case will + # instead return `PermissionDenied` with either a `CustomHook` or AccessCheck` structured + # error. + # - Returns `FailedPrecondition` in case updating the reference fails because + # of a concurrent write to the same reference. If the + # `gitaly_user_delete_branch_structured_errors` feature flag is set this error case will + # instead return `FailedPrecondition` with a `ReferenceUpdate` structured error. rpc :UserDeleteBranch, ::Gitaly::UserDeleteBranchRequest, ::Gitaly::UserDeleteBranchResponse # UserCreateTag creates a new tag. rpc :UserCreateTag, ::Gitaly::UserCreateTagRequest, ::Gitaly::UserCreateTagResponse |