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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-06-09 09:28:18 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-06-09 09:44:53 +0300
commitc3fcec8771c028119c085c181064b521e796b56b (patch)
tree172a9c0e37abb3c7620432d8fb03a91f174a3f8e
parentc9d246d1ba1fbe194c2b3c45470094d9fe028896 (diff)
operations: Remove deprecated GitError field from UserSquashpks-proto-remove-deprecated-operation-error-fields
The `GitError` field of the `UserSquash` response has been deprecated in e8413304d (operations: Always use structured errors for UserSquash, 2022-03-21) and is never set anymore. Let's remove it.
-rw-r--r--internal/gitaly/service/operations/squash_test.go16
-rw-r--r--proto/go/gitalypb/operations.pb.go23
-rw-r--r--proto/operations.proto4
-rw-r--r--ruby/proto/gitaly/operations_pb.rb1
4 files changed, 9 insertions, 35 deletions
diff --git a/internal/gitaly/service/operations/squash_test.go b/internal/gitaly/service/operations/squash_test.go
index 42e6f3a92..f19df0470 100644
--- a/internal/gitaly/service/operations/squash_test.go
+++ b/internal/gitaly/service/operations/squash_test.go
@@ -74,8 +74,6 @@ func TestUserSquash_successful(t *testing.T) {
response, err := client.UserSquash(ctx, request)
require.NoError(t, err)
- //nolint:staticcheck
- require.Empty(t, response.GetGitError())
commit, err := repo.ReadCommit(ctx, git.Revision(response.SquashSha))
require.NoError(t, err)
@@ -227,8 +225,6 @@ func TestUserSquash_stableID(t *testing.T) {
Timestamp: &timestamppb.Timestamp{Seconds: 1234512345},
})
require.NoError(t, err)
- //nolint:staticcheck
- require.Empty(t, response.GetGitError())
commit, err := repo.ReadCommit(ctx, git.Revision(response.SquashSha))
require.NoError(t, err)
@@ -288,8 +284,6 @@ func TestUserSquash_threeWayMerge(t *testing.T) {
response, err := client.UserSquash(ctx, request)
require.NoError(t, err)
- //nolint:staticcheck
- require.Empty(t, response.GetGitError())
commit, err := repo.ReadCommit(ctx, git.Revision(response.SquashSha))
require.NoError(t, err)
@@ -320,10 +314,8 @@ func TestUserSquash_splitIndex(t *testing.T) {
EndSha: endSha,
}
- response, err := client.UserSquash(ctx, request)
+ _, err := client.UserSquash(ctx, request)
require.NoError(t, err)
- //nolint:staticcheck
- require.Empty(t, response.GetGitError())
require.False(t, ensureSplitIndexExists(t, cfg, repoPath))
}
@@ -372,8 +364,6 @@ func TestUserSquash_renames(t *testing.T) {
response, err := client.UserSquash(ctx, request)
require.NoError(t, err)
- //nolint:staticcheck
- require.Empty(t, response.GetGitError())
commit, err := repo.ReadCommit(ctx, git.Revision(response.SquashSha))
require.NoError(t, err)
@@ -404,10 +394,8 @@ func TestUserSquash_missingFileOnTargetBranch(t *testing.T) {
EndSha: endSha,
}
- response, err := client.UserSquash(ctx, request)
+ _, err := client.UserSquash(ctx, request)
require.NoError(t, err)
- //nolint:staticcheck
- require.Empty(t, response.GetGitError())
}
func TestUserSquash_emptyCommit(t *testing.T) {
diff --git a/proto/go/gitalypb/operations.pb.go b/proto/go/gitalypb/operations.pb.go
index 99b1331e9..45b0eee1b 100644
--- a/proto/go/gitalypb/operations.pb.go
+++ b/proto/go/gitalypb/operations.pb.go
@@ -2973,12 +2973,6 @@ type UserSquashResponse struct {
// squash_sha is the object ID of the squashed commit.
SquashSha string `protobuf:"bytes,1,opt,name=squash_sha,json=squashSha,proto3" json:"squash_sha,omitempty"`
- // GitError is not used anymore. Instead, this RPC always returns a real
- // error with an optional UserRebaseConfirmableError, which may be set on
- // special errors.
- //
- // Deprecated: Do not use.
- GitError string `protobuf:"bytes,3,opt,name=git_error,json=gitError,proto3" json:"git_error,omitempty"`
}
func (x *UserSquashResponse) Reset() {
@@ -3020,14 +3014,6 @@ func (x *UserSquashResponse) GetSquashSha() string {
return ""
}
-// Deprecated: Do not use.
-func (x *UserSquashResponse) GetGitError() string {
- if x != nil {
- return x.GitError
- }
- return ""
-}
-
// This comment is left unintentionally blank.
type UserRebaseConfirmableError struct {
state protoimpl.MessageState
@@ -4202,13 +4188,12 @@ var file_operations_proto_rawDesc = []byte{
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4a, 0x04, 0x08,
0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x52, 0x09, 0x73, 0x71, 0x75, 0x61, 0x73,
- 0x68, 0x5f, 0x69, 0x64, 0x22, 0x6d, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x53, 0x71, 0x75, 0x61,
+ 0x68, 0x5f, 0x69, 0x64, 0x22, 0x5d, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x53, 0x71, 0x75, 0x61,
0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x71,
0x75, 0x61, 0x73, 0x68, 0x5f, 0x73, 0x68, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
- 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x53, 0x68, 0x61, 0x12, 0x1f, 0x0a, 0x09, 0x67, 0x69, 0x74,
- 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01,
- 0x52, 0x08, 0x67, 0x69, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03,
- 0x52, 0x11, 0x70, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x72,
+ 0x73, 0x71, 0x75, 0x61, 0x73, 0x68, 0x53, 0x68, 0x61, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a,
+ 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x11, 0x70, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69,
+ 0x76, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x09, 0x67, 0x69, 0x74, 0x5f, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x22, 0xab, 0x01, 0x0a, 0x1a, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x62, 0x61,
0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x72,
0x6f, 0x72, 0x12, 0x45, 0x0a, 0x0f, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
diff --git a/proto/operations.proto b/proto/operations.proto
index 4a763d31a..6dbf02448 100644
--- a/proto/operations.proto
+++ b/proto/operations.proto
@@ -758,6 +758,7 @@ message UserSquashRequest {
message UserSquashResponse {
// squash_sha is the object ID of the squashed commit.
string squash_sha = 1;
+
// DEPRECATED: https://gitlab.com/gitlab-org/gitaly/proto/merge_requests/161
reserved 2;
reserved "pre_receive_error";
@@ -765,7 +766,8 @@ message UserSquashResponse {
// GitError is not used anymore. Instead, this RPC always returns a real
// error with an optional UserRebaseConfirmableError, which may be set on
// special errors.
- string git_error = 3 [deprecated=true];
+ reserved 3;
+ reserved "git_error";
}
// This comment is left unintentionally blank.
diff --git a/ruby/proto/gitaly/operations_pb.rb b/ruby/proto/gitaly/operations_pb.rb
index 4b2e6a20c..6671a0e4c 100644
--- a/ruby/proto/gitaly/operations_pb.rb
+++ b/ruby/proto/gitaly/operations_pb.rb
@@ -250,7 +250,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
end
add_message "gitaly.UserSquashResponse" do
optional :squash_sha, :string, 1
- optional :git_error, :string, 3
end
add_message "gitaly.UserRebaseConfirmableError" do
oneof :error do