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:
authorJohn Cai <jcai@gitlab.com>2022-04-21 21:56:44 +0300
committerJohn Cai <jcai@gitlab.com>2022-05-03 17:12:55 +0300
commit44e98aba66779e943a4182b672e2ff4f039abcb5 (patch)
tree03c8cc7e1dfe9d8cf3456391d693d440027d8c5e /proto/operations.proto
parent1b1b95408d11a2532db5a44ffefd5cbab6e0effd (diff)
proto: Add UserCherryPickError type for UserCherryPick structured errors
In UserCherryPick, there are some error conditions where instead of returning an error, we return OK and embed the error in the response. Instead of doing this, we want to return structured errors. This change adds the proto definition for this error.
Diffstat (limited to 'proto/operations.proto')
-rw-r--r--proto/operations.proto21
1 files changed, 21 insertions, 0 deletions
diff --git a/proto/operations.proto b/proto/operations.proto
index bba44db15..20af1cfd8 100644
--- a/proto/operations.proto
+++ b/proto/operations.proto
@@ -394,6 +394,27 @@ message UserCherryPickResponse {
CreateTreeError create_tree_error_code = 5;
}
+// UserCherryPickError is an error returned by the UserCherryPick RPC.
+message UserCherryPickError {
+ oneof error {
+ // CherryPickConflict is returned if there is a conflict when applying the cherry
+ // pick.
+ MergeConflictError cherry_pick_conflict = 1;
+ // TargetBranchDiverged is returned whenever the tip commit of the branch we're
+ // about to apply the new commit on is not a direct ancestor of the newly created
+ // cherry-picked commit. This may happen either due to a race where the reference
+ // is modified while we compute the cherry-picked commit, or alternatively if the
+ // commit fetched from the start branch of the remote repository is not an ancestor
+ // of of the local target branch.
+ NotAncestorError target_branch_diverged = 2;
+ // ChangesAlreadyApplied is returned if the result after applying the cherry pick is empty.
+ ChangesAlreadyAppliedError changes_already_applied = 3;
+ // AccessCheck is returned in case GitLab's `/internal/allowed` endpoint rejected
+ // the change.
+ AccessCheckError access_check = 4;
+ }
+}
+
message UserRevertRequest {
// repository is the repository in which the revert shall be applied.
Repository repository = 1 [(target_repository)=true];