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:
authorJustin Tobler <jtobler@gitlab.com>2023-11-15 01:45:13 +0300
committerJustin Tobler <jtobler@gitlab.com>2023-11-15 01:48:09 +0300
commite664bf6123efcfec828de676381628068d2bd549 (patch)
tree29cc0920021ecd0dd90a4ece042c21493a8c8355
parent3dc612b6741b132d13b54b8516e5666142f02e63 (diff)
praefect: Update `CreateBranchRequest` and `CreateBranchResponse` usage
The `CreateBranch` RPC has been removed and there is no longer a need for its associated request and response messages. Update call sites to now use `UserCreateBranch` messages.
-rw-r--r--internal/grpc/backchannel/backchannel_example_test.go6
-rw-r--r--internal/praefect/server_test.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/grpc/backchannel/backchannel_example_test.go b/internal/grpc/backchannel/backchannel_example_test.go
index 3373a8249..791da3730 100644
--- a/internal/grpc/backchannel/backchannel_example_test.go
+++ b/internal/grpc/backchannel/backchannel_example_test.go
@@ -52,7 +52,7 @@ func Example() {
// Praefect, so no need to perform voting. The client could be for example
// GitLab calling Gitaly directly.
fmt.Println("Gitaly responding to a non-multiplexed client")
- return stream.SendMsg(&gitalypb.CreateBranchResponse{})
+ return stream.SendMsg(&gitalypb.UserCreateBranchResponse{})
} else if err != nil {
return fmt.Errorf("get peer id: %w", err)
}
@@ -72,7 +72,7 @@ func Example() {
fmt.Println("Gitaly received vote response via backchannel")
fmt.Println("Gitaly responding to the transactional mutator")
- return stream.SendMsg(&gitalypb.CreateBranchResponse{})
+ return stream.SendMsg(&gitalypb.UserCreateBranchResponse{})
}),
)
defer srv.Stop()
@@ -135,7 +135,7 @@ func invokeWithOpts(address string, opts ...grpc.DialOption) error {
return fmt.Errorf("dial server: %w", err)
}
- if err := clientConn.Invoke(context.Background(), "/Gitaly/Mutator", &gitalypb.CreateBranchRequest{}, &gitalypb.CreateBranchResponse{}); err != nil {
+ if err := clientConn.Invoke(context.Background(), "/Gitaly/Mutator", &gitalypb.UserCreateBranchRequest{}, &gitalypb.UserCreateBranchResponse{}); err != nil {
return fmt.Errorf("call server: %w", err)
}
diff --git a/internal/praefect/server_test.go b/internal/praefect/server_test.go
index 16b51b084..9d39560f9 100644
--- a/internal/praefect/server_test.go
+++ b/internal/praefect/server_test.go
@@ -110,7 +110,7 @@ func TestNewBackchannelServerFactory(t *testing.T) {
clientConn := nodeSet["default"]["gitaly-1"].Connection
testhelper.RequireGrpcError(t,
status.Error(codes.NotFound, "transaction not found: 0"),
- clientConn.Invoke(ctx, "/Service/Method", &gitalypb.CreateBranchRequest{}, &gitalypb.CreateBranchResponse{}),
+ clientConn.Invoke(ctx, "/Service/Method", &gitalypb.UserCreateBranchRequest{}, &gitalypb.UserCreateBranchResponse{}),
)
}