diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2023-01-31 14:49:01 +0300 |
---|---|---|
committer | Christian Couder <chriscool@tuxfamily.org> | 2023-01-31 14:49:01 +0300 |
commit | 7a16bb54b449522f4ab9189d28a81b6ab6d376ce (patch) | |
tree | fe0263efb618fe3c9bbc7a7198ee31206b1a4a34 | |
parent | 9b870362c6aaf6c38ae4835e915ab05d5a6eb0ad (diff) | |
parent | 27abba61db658e7c9e6befc3ba550d3885b1e591 (diff) |
Merge branch 'deprecate_full_path' into 'master'
Deprecate FullPath and SetFulPath RPCs
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5293
Merged-by: Christian Couder <chriscool@tuxfamily.org>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: Christian Couder <chriscool@tuxfamily.org>
Co-authored-by: James Fargher <jfargher@gitlab.com>
-rw-r--r-- | internal/gitaly/service/repository/fullpath_test.go | 2 | ||||
-rw-r--r-- | proto/go/gitalypb/repository.pb.go | 23 | ||||
-rw-r--r-- | proto/go/gitalypb/repository_grpc.pb.go | 6 | ||||
-rw-r--r-- | proto/repository.proto | 2 |
4 files changed, 22 insertions, 11 deletions
diff --git a/internal/gitaly/service/repository/fullpath_test.go b/internal/gitaly/service/repository/fullpath_test.go index 999bfec1a..85a67f584 100644 --- a/internal/gitaly/service/repository/fullpath_test.go +++ b/internal/gitaly/service/repository/fullpath_test.go @@ -16,6 +16,7 @@ import ( "google.golang.org/grpc/codes" ) +//nolint:staticcheck func TestSetFullPath(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) @@ -146,6 +147,7 @@ func TestSetFullPath(t *testing.T) { }) } +//nolint:staticcheck func TestFullPath(t *testing.T) { t.Parallel() ctx := testhelper.Context(t) diff --git a/proto/go/gitalypb/repository.pb.go b/proto/go/gitalypb/repository.pb.go index 4606befdc..109776e0a 100644 --- a/proto/go/gitalypb/repository.pb.go +++ b/proto/go/gitalypb/repository.pb.go @@ -5555,7 +5555,7 @@ var file_repository_proto_rawDesc = []byte{ 0x72, 0x79, 0x42, 0x04, 0x98, 0xc6, 0x2c, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x26, 0x0a, 0x10, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x32, 0xe3, 0x1e, 0x0a, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x32, 0xe9, 0x1e, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, @@ -5792,20 +5792,21 @@ var file_repository_proto_rawDesc = []byte{ 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x4e, 0x0a, 0x0b, 0x53, + 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x03, 0x12, 0x51, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x45, 0x0a, 0x08, 0x46, - 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, - 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, - 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, - 0x08, 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, - 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x35, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, - 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x73, 0x65, 0x22, 0x09, 0x88, 0x02, 0x01, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x48, + 0x0a, 0x08, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x17, 0x2e, 0x67, 0x69, 0x74, + 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x75, 0x6c, + 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x88, + 0x02, 0x01, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x02, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x6c, + 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2d, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2f, 0x76, 0x31, 0x35, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/go/gitalypb/repository_grpc.pb.go b/proto/go/gitalypb/repository_grpc.pb.go index 84cd90f3f..07cec846d 100644 --- a/proto/go/gitalypb/repository_grpc.pb.go +++ b/proto/go/gitalypb/repository_grpc.pb.go @@ -133,11 +133,13 @@ type RepositoryServiceClient interface { // To make proper use of this RPC you thus need to call OptimizeRepository, // wait 30 minutes, and then call PruneUnreachableObjects. PruneUnreachableObjects(ctx context.Context, in *PruneUnreachableObjectsRequest, opts ...grpc.CallOption) (*PruneUnreachableObjectsResponse, error) + // Deprecated: Do not use. // SetFullPath writes the "gitlab.fullpath" configuration into the // repository's gitconfig. This is mainly to help debugging purposes in case // an admin inspects the repository's gitconfig such that he can easily see // what the repository name is. SetFullPath(ctx context.Context, in *SetFullPathRequest, opts ...grpc.CallOption) (*SetFullPathResponse, error) + // Deprecated: Do not use. // FullPath reads the "gitlab.fullpath" configuration from the repository's // gitconfig. Returns an error in case the full path has not been configured. FullPath(ctx context.Context, in *FullPathRequest, opts ...grpc.CallOption) (*FullPathResponse, error) @@ -821,6 +823,7 @@ func (c *repositoryServiceClient) PruneUnreachableObjects(ctx context.Context, i return out, nil } +// Deprecated: Do not use. func (c *repositoryServiceClient) SetFullPath(ctx context.Context, in *SetFullPathRequest, opts ...grpc.CallOption) (*SetFullPathResponse, error) { out := new(SetFullPathResponse) err := c.cc.Invoke(ctx, "/gitaly.RepositoryService/SetFullPath", in, out, opts...) @@ -830,6 +833,7 @@ func (c *repositoryServiceClient) SetFullPath(ctx context.Context, in *SetFullPa return out, nil } +// Deprecated: Do not use. func (c *repositoryServiceClient) FullPath(ctx context.Context, in *FullPathRequest, opts ...grpc.CallOption) (*FullPathResponse, error) { out := new(FullPathResponse) err := c.cc.Invoke(ctx, "/gitaly.RepositoryService/FullPath", in, out, opts...) @@ -954,11 +958,13 @@ type RepositoryServiceServer interface { // To make proper use of this RPC you thus need to call OptimizeRepository, // wait 30 minutes, and then call PruneUnreachableObjects. PruneUnreachableObjects(context.Context, *PruneUnreachableObjectsRequest) (*PruneUnreachableObjectsResponse, error) + // Deprecated: Do not use. // SetFullPath writes the "gitlab.fullpath" configuration into the // repository's gitconfig. This is mainly to help debugging purposes in case // an admin inspects the repository's gitconfig such that he can easily see // what the repository name is. SetFullPath(context.Context, *SetFullPathRequest) (*SetFullPathResponse, error) + // Deprecated: Do not use. // FullPath reads the "gitlab.fullpath" configuration from the repository's // gitconfig. Returns an error in case the full path has not been configured. FullPath(context.Context, *FullPathRequest) (*FullPathResponse, error) diff --git a/proto/repository.proto b/proto/repository.proto index 869c9c2f7..048738b15 100644 --- a/proto/repository.proto +++ b/proto/repository.proto @@ -326,6 +326,7 @@ service RepositoryService { // an admin inspects the repository's gitconfig such that he can easily see // what the repository name is. rpc SetFullPath(SetFullPathRequest) returns (SetFullPathResponse) { + option deprecated = true; option (op_type) = { op: MUTATOR }; @@ -334,6 +335,7 @@ service RepositoryService { // FullPath reads the "gitlab.fullpath" configuration from the repository's // gitconfig. Returns an error in case the full path has not been configured. rpc FullPath(FullPathRequest) returns (FullPathResponse) { + option deprecated = true; option (op_type) = { op: ACCESSOR }; |