diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-10-20 12:07:39 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-10-20 12:07:39 +0300 |
commit | 68ba81917cca33d24b68bc709e9e05647147e9a8 (patch) | |
tree | 927683a961dda6c9b47fc32992cab247ec373f14 | |
parent | f27e27f915c42b5a921b504501944615b10938ee (diff) |
proto: Reformat Protobuf files
Now that we have fixed our Makefile target to detect out-of-date
Protobuf code, our CI does indeed complain about the generated code. As
it turns out the code is different depending on the Go version that's
used to compile it as Go 1.19 has made changes to gofmt. We're still
using Go 1.18 though.
Reformat the code with Go 1.18 to fix the failing job. While it is
suboptimal to have version-dependent code generation, it is still a lot
better than not having safety-guards around out-of-date code. Engineers
can also work around this by just fetching generated artifacts from the
failing pipeline.
-rw-r--r-- | proto/go/gitalypb/conflicts.pb.go | 2 | ||||
-rw-r--r-- | proto/go/gitalypb/diff.pb.go | 1 | ||||
-rw-r--r-- | proto/go/gitalypb/operations.pb.go | 25 | ||||
-rw-r--r-- | proto/go/gitalypb/operations_grpc.pb.go | 40 | ||||
-rw-r--r-- | proto/go/gitalypb/praefect.pb.go | 2 | ||||
-rw-r--r-- | proto/go/gitalypb/ref.pb.go | 2 | ||||
-rw-r--r-- | proto/go/gitalypb/repository.pb.go | 12 | ||||
-rw-r--r-- | proto/go/gitalypb/server.pb.go | 1 | ||||
-rw-r--r-- | proto/go/gitalypb/transaction_grpc.pb.go | 24 |
9 files changed, 44 insertions, 65 deletions
diff --git a/proto/go/gitalypb/conflicts.pb.go b/proto/go/gitalypb/conflicts.pb.go index ef15a5008..2aca35039 100644 --- a/proto/go/gitalypb/conflicts.pb.go +++ b/proto/go/gitalypb/conflicts.pb.go @@ -191,7 +191,6 @@ type ConflictFile struct { unknownFields protoimpl.UnknownFields // Types that are assignable to ConflictFilePayload: - // // *ConflictFile_Header // *ConflictFile_Content ConflictFilePayload isConflictFile_ConflictFilePayload `protobuf_oneof:"conflict_file_payload"` @@ -456,7 +455,6 @@ type ResolveConflictsRequest struct { // requests must be FilesJson requests. // // Types that are assignable to ResolveConflictsRequestPayload: - // // *ResolveConflictsRequest_Header // *ResolveConflictsRequest_FilesJson ResolveConflictsRequestPayload isResolveConflictsRequest_ResolveConflictsRequestPayload `protobuf_oneof:"resolve_conflicts_request_payload"` diff --git a/proto/go/gitalypb/diff.pb.go b/proto/go/gitalypb/diff.pb.go index ad38fd178..c1ab9d712 100644 --- a/proto/go/gitalypb/diff.pb.go +++ b/proto/go/gitalypb/diff.pb.go @@ -1313,7 +1313,6 @@ type FindChangedPathsRequest_Request struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Type: - // // *FindChangedPathsRequest_Request_TreeRequest_ // *FindChangedPathsRequest_Request_CommitRequest_ Type isFindChangedPathsRequest_Request_Type `protobuf_oneof:"type"` diff --git a/proto/go/gitalypb/operations.pb.go b/proto/go/gitalypb/operations.pb.go index 98569abe3..fb8715ee0 100644 --- a/proto/go/gitalypb/operations.pb.go +++ b/proto/go/gitalypb/operations.pb.go @@ -342,7 +342,6 @@ type UserCreateBranchError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *UserCreateBranchError_CustomHook Error isUserCreateBranchError_Error `protobuf_oneof:"error"` } @@ -671,7 +670,6 @@ type UserDeleteBranchError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *UserDeleteBranchError_AccessCheck // *UserDeleteBranchError_ReferenceUpdate // *UserDeleteBranchError_CustomHook @@ -1065,7 +1063,6 @@ type UserCreateTagError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *UserCreateTagError_AccessCheck // *UserCreateTagError_ReferenceUpdate // *UserCreateTagError_CustomHook @@ -1351,7 +1348,6 @@ type UserMergeBranchError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *UserMergeBranchError_AccessCheck // *UserMergeBranchError_ReferenceUpdate // *UserMergeBranchError_CustomHook @@ -2081,7 +2077,6 @@ type UserCherryPickError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *UserCherryPickError_CherryPickConflict // *UserCherryPickError_TargetBranchDiverged // *UserCherryPickError_ChangesAlreadyApplied @@ -2421,12 +2416,12 @@ type UserCommitFilesActionHeader struct { Action UserCommitFilesActionHeader_ActionType `protobuf:"varint,1,opt,name=action,proto3,enum=gitaly.UserCommitFilesActionHeader_ActionType" json:"action,omitempty"` // file_path refers to the file or directory being modified. The meaning differs for each // action: - // 1. CREATE: path of the file to create - // 2. CREATE_DIR: path of the directory to create - // 3. UPDATE: path of the file to update - // 4. MOVE: the new path of the moved file - // 5. DELETE: path of the file to delete - // 6. CHMOD: path of the file to modify permissions for + // 1. CREATE: path of the file to create + // 2. CREATE_DIR: path of the directory to create + // 3. UPDATE: path of the file to update + // 4. MOVE: the new path of the moved file + // 5. DELETE: path of the file to delete + // 6. CHMOD: path of the file to modify permissions for FilePath []byte `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` // previous_path is used in MOVE action to specify the path of the file to move. PreviousPath []byte `protobuf:"bytes,3,opt,name=previous_path,json=previousPath,proto3" json:"previous_path,omitempty"` @@ -2524,7 +2519,6 @@ type UserCommitFilesAction struct { unknownFields protoimpl.UnknownFields // Types that are assignable to UserCommitFilesActionPayload: - // // *UserCommitFilesAction_Header // *UserCommitFilesAction_Content UserCommitFilesActionPayload isUserCommitFilesAction_UserCommitFilesActionPayload `protobuf_oneof:"user_commit_files_action_payload"` @@ -2758,7 +2752,6 @@ type UserCommitFilesRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to UserCommitFilesRequestPayload: - // // *UserCommitFilesRequest_Header // *UserCommitFilesRequest_Action UserCommitFilesRequestPayload isUserCommitFilesRequest_UserCommitFilesRequestPayload `protobuf_oneof:"user_commit_files_request_payload"` @@ -2912,7 +2905,6 @@ type UserCommitFilesError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *UserCommitFilesError_AccessCheck // *UserCommitFilesError_IndexUpdate // *UserCommitFilesError_CustomHook @@ -3013,7 +3005,6 @@ type UserRebaseConfirmableRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to UserRebaseConfirmableRequestPayload: - // // *UserRebaseConfirmableRequest_Header_ // *UserRebaseConfirmableRequest_Apply UserRebaseConfirmableRequestPayload isUserRebaseConfirmableRequest_UserRebaseConfirmableRequestPayload `protobuf_oneof:"user_rebase_confirmable_request_payload"` @@ -3101,7 +3092,6 @@ type UserRebaseConfirmableResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to UserRebaseConfirmableResponsePayload: - // // *UserRebaseConfirmableResponse_RebaseSha // *UserRebaseConfirmableResponse_RebaseApplied UserRebaseConfirmableResponsePayload isUserRebaseConfirmableResponse_UserRebaseConfirmableResponsePayload `protobuf_oneof:"user_rebase_confirmable_response_payload"` @@ -3364,7 +3354,6 @@ type UserRebaseConfirmableError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *UserRebaseConfirmableError_RebaseConflict // *UserRebaseConfirmableError_AccessCheck Error isUserRebaseConfirmableError_Error `protobuf_oneof:"error"` @@ -3452,7 +3441,6 @@ type UserSquashError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *UserSquashError_ResolveRevision // *UserSquashError_RebaseConflict Error isUserSquashError_Error `protobuf_oneof:"error"` @@ -3538,7 +3526,6 @@ type UserApplyPatchRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to UserApplyPatchRequestPayload: - // // *UserApplyPatchRequest_Header_ // *UserApplyPatchRequest_Patches UserApplyPatchRequestPayload isUserApplyPatchRequest_UserApplyPatchRequestPayload `protobuf_oneof:"user_apply_patch_request_payload"` diff --git a/proto/go/gitalypb/operations_grpc.pb.go b/proto/go/gitalypb/operations_grpc.pb.go index 33ad54215..d85789d8a 100644 --- a/proto/go/gitalypb/operations_grpc.pb.go +++ b/proto/go/gitalypb/operations_grpc.pb.go @@ -30,16 +30,16 @@ type OperationServiceClient interface { // hooks and contacts Rails to verify that the user is indeed allowed to delete that branch. The // following known error conditions may happen: // - // - 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. 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. + // - 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. 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. UserDeleteBranch(ctx context.Context, in *UserDeleteBranchRequest, opts ...grpc.CallOption) (*UserDeleteBranchResponse, error) // UserCreateTag creates a new tag. This RPC knows to create both lightweight and annotated tags // depending on whether a message is set. @@ -346,16 +346,16 @@ type OperationServiceServer interface { // hooks and contacts Rails to verify that the user is indeed allowed to delete that branch. The // following known error conditions may happen: // - // - 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. 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. + // - 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. 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. UserDeleteBranch(context.Context, *UserDeleteBranchRequest) (*UserDeleteBranchResponse, error) // UserCreateTag creates a new tag. This RPC knows to create both lightweight and annotated tags // depending on whether a message is set. diff --git a/proto/go/gitalypb/praefect.pb.go b/proto/go/gitalypb/praefect.pb.go index ef98874ce..3326d5b57 100644 --- a/proto/go/gitalypb/praefect.pb.go +++ b/proto/go/gitalypb/praefect.pb.go @@ -30,7 +30,6 @@ type MarkUnverifiedRequest struct { // selector specifies the replicas which to mark unverified. // // Types that are assignable to Selector: - // // *MarkUnverifiedRequest_RepositoryId // *MarkUnverifiedRequest_VirtualStorage // *MarkUnverifiedRequest_Storage_ @@ -179,7 +178,6 @@ type GetRepositoryMetadataRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Query: - // // *GetRepositoryMetadataRequest_RepositoryId // *GetRepositoryMetadataRequest_Path_ Query isGetRepositoryMetadataRequest_Query `protobuf_oneof:"query"` diff --git a/proto/go/gitalypb/ref.pb.go b/proto/go/gitalypb/ref.pb.go index 508fce608..c17d820ed 100644 --- a/proto/go/gitalypb/ref.pb.go +++ b/proto/go/gitalypb/ref.pb.go @@ -1072,7 +1072,6 @@ type FindTagError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *FindTagError_TagNotFound Error isFindTagError_Error `protobuf_oneof:"error"` } @@ -1812,7 +1811,6 @@ type DeleteRefsError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: - // // *DeleteRefsError_InvalidFormat // *DeleteRefsError_ReferencesLocked Error isDeleteRefsError_Error `protobuf_oneof:"error"` diff --git a/proto/go/gitalypb/repository.pb.go b/proto/go/gitalypb/repository.pb.go index b773fc3f5..299f1575c 100644 --- a/proto/go/gitalypb/repository.pb.go +++ b/proto/go/gitalypb/repository.pb.go @@ -3958,12 +3958,12 @@ type Remote struct { // mirror_refmaps contains the refspecs which shall be fetched. Some special // refspecs are accepted: // - // - "all_refs" gets translated to "+refs/*:refs/*", which mirrors all - // references of the source repository. - // - "heads" gets translated to "+refs/heads/*:refs/heads/*", which mirrors - // all branches of the source repository. - // - "tags" gets translated to "+refs/tags/*:refs/tags/*", which mirrors all - // tags of the source repository. + // - "all_refs" gets translated to "+refs/*:refs/*", which mirrors all + // references of the source repository. + // - "heads" gets translated to "+refs/heads/*:refs/heads/*", which mirrors + // all branches of the source repository. + // - "tags" gets translated to "+refs/tags/*:refs/tags/*", which mirrors all + // tags of the source repository. // // If no refspecs are given, this defaults to "all_refs". MirrorRefmaps []string `protobuf:"bytes,4,rep,name=mirror_refmaps,json=mirrorRefmaps,proto3" json:"mirror_refmaps,omitempty"` diff --git a/proto/go/gitalypb/server.pb.go b/proto/go/gitalypb/server.pb.go index ce8f37994..534b30af7 100644 --- a/proto/go/gitalypb/server.pb.go +++ b/proto/go/gitalypb/server.pb.go @@ -380,7 +380,6 @@ type ReadinessCheckResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Result: - // // *ReadinessCheckResponse_OkResponse // *ReadinessCheckResponse_FailureResponse Result isReadinessCheckResponse_Result `protobuf_oneof:"Result"` diff --git a/proto/go/gitalypb/transaction_grpc.pb.go b/proto/go/gitalypb/transaction_grpc.pb.go index 5d9f9f299..5664e70d8 100644 --- a/proto/go/gitalypb/transaction_grpc.pb.go +++ b/proto/go/gitalypb/transaction_grpc.pb.go @@ -29,9 +29,9 @@ type RefTransactionClient interface { // // This RPC may return one of the following error codes: // - // - `NotFound` in case the transaction could not be found. - // - `Canceled` in case the transaction has been canceled before quorum was - // reached. + // - `NotFound` in case the transaction could not be found. + // - `Canceled` in case the transaction has been canceled before quorum was + // reached. VoteTransaction(ctx context.Context, in *VoteTransactionRequest, opts ...grpc.CallOption) (*VoteTransactionResponse, error) // StopTransaction gracefully stops a transaction. This RPC can be used if // only a subset of nodes executes specific code which may cause the @@ -41,9 +41,9 @@ type RefTransactionClient interface { // // This RPC may return one of the following error codes: // - // - `NotFound` in case the transaction could not be found. - // - `Canceled` in case the transaction has been canceled before quorum was - // reached. + // - `NotFound` in case the transaction could not be found. + // - `Canceled` in case the transaction has been canceled before quorum was + // reached. StopTransaction(ctx context.Context, in *StopTransactionRequest, opts ...grpc.CallOption) (*StopTransactionResponse, error) } @@ -84,9 +84,9 @@ type RefTransactionServer interface { // // This RPC may return one of the following error codes: // - // - `NotFound` in case the transaction could not be found. - // - `Canceled` in case the transaction has been canceled before quorum was - // reached. + // - `NotFound` in case the transaction could not be found. + // - `Canceled` in case the transaction has been canceled before quorum was + // reached. VoteTransaction(context.Context, *VoteTransactionRequest) (*VoteTransactionResponse, error) // StopTransaction gracefully stops a transaction. This RPC can be used if // only a subset of nodes executes specific code which may cause the @@ -96,9 +96,9 @@ type RefTransactionServer interface { // // This RPC may return one of the following error codes: // - // - `NotFound` in case the transaction could not be found. - // - `Canceled` in case the transaction has been canceled before quorum was - // reached. + // - `NotFound` in case the transaction could not be found. + // - `Canceled` in case the transaction has been canceled before quorum was + // reached. StopTransaction(context.Context, *StopTransactionRequest) (*StopTransactionResponse, error) mustEmbedUnimplementedRefTransactionServer() } |