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>2021-09-15 10:30:22 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-15 10:34:27 +0300
commit50686040de4588533a8a4c8aae03ae373ae041fa (patch)
tree4d988801dfabd6fc6dbf8551c9bf9a97b335a72b
parentccd8ea3e1436d6464ac5f67e6bebd1ae317f4d50 (diff)
objectpool: Deprecate `UnlinkRepositoryFromObjectPool()`
The `UnlinkRepositoryFromObjectPool()` function is supposed to unlink a repository from its object pool. But tall it does is to call `Unlink()`, which in turn only removes the corresponding remote which pointed to the repository from the object pool's repository. In fact, it's not even really doing that given that we never create this remote in the first place. As can be guessed by this no-op action, this RPC call is never executed by anything. Deprecate the RPC such that we can remove it in release 14.4. Changelog: deprecate
-rw-r--r--internal/gitaly/service/objectpool/link_test.go3
-rw-r--r--proto/go/gitalypb/objectpool.pb.go66
-rw-r--r--proto/go/gitalypb/objectpool_grpc.pb.go23
-rw-r--r--proto/objectpool.proto12
-rw-r--r--ruby/proto/gitaly/objectpool_services_pb.rb10
5 files changed, 81 insertions, 33 deletions
diff --git a/internal/gitaly/service/objectpool/link_test.go b/internal/gitaly/service/objectpool/link_test.go
index fc65861fd..eca407e20 100644
--- a/internal/gitaly/service/objectpool/link_test.go
+++ b/internal/gitaly/service/objectpool/link_test.go
@@ -266,6 +266,7 @@ func TestUnlink(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.desc, func(t *testing.T) {
+ //nolint:staticcheck
_, err := client.UnlinkRepositoryFromObjectPool(ctx, tc.req)
if tc.code != codes.OK {
@@ -300,9 +301,11 @@ func TestUnlinkIdempotent(t *testing.T) {
ObjectPool: pool.ToProto(),
}
+ //nolint:staticcheck
_, err = client.UnlinkRepositoryFromObjectPool(ctx, request)
require.NoError(t, err)
+ //nolint:staticcheck
_, err = client.UnlinkRepositoryFromObjectPool(ctx, request)
require.NoError(t, err)
}
diff --git a/proto/go/gitalypb/objectpool.pb.go b/proto/go/gitalypb/objectpool.pb.go
index c769b9d61..582e65746 100644
--- a/proto/go/gitalypb/objectpool.pb.go
+++ b/proto/go/gitalypb/objectpool.pb.go
@@ -841,7 +841,7 @@ var file_objectpool_proto_rawDesc = []byte{
0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x4f, 0x62, 0x6a, 0x65,
0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f,
- 0x6f, 0x6c, 0x32, 0xf8, 0x06, 0x0a, 0x11, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f,
+ 0x6f, 0x6c, 0x32, 0xfb, 0x06, 0x0a, 0x11, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f,
0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1f, 0x2e, 0x67,
0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x62, 0x6a, 0x65,
@@ -862,7 +862,7 @@ var file_objectpool_proto_rawDesc = []byte{
0x2a, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x70,
0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50,
0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28,
- 0x02, 0x08, 0x01, 0x12, 0x87, 0x01, 0x0a, 0x1e, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65,
+ 0x02, 0x08, 0x01, 0x12, 0x8a, 0x01, 0x0a, 0x1e, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65,
0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x4f, 0x62, 0x6a, 0x65,
0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x2d, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
@@ -870,37 +870,37 @@ var file_objectpool_proto_rawDesc = []byte{
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x55,
0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x46,
0x72, 0x6f, 0x6d, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x6c, 0x0a,
- 0x15, 0x52, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f,
- 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
- 0x52, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73,
- 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x67,
- 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
- 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x72, 0x0a, 0x17, 0x44,
- 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x47, 0x69, 0x74, 0x41, 0x6c, 0x74, 0x65,
- 0x72, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
- 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x47, 0x69, 0x74, 0x41, 0x6c, 0x74,
- 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27,
- 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x47, 0x69, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x52,
- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12,
- 0x66, 0x0a, 0x13, 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x6f, 0x4f, 0x62, 0x6a, 0x65,
- 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
- 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x6f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50,
- 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x69, 0x74,
- 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x6f, 0x4f, 0x62, 0x6a,
- 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
- 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x54, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4f, 0x62,
- 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c,
- 0x79, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e,
- 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 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,
- 0x34, 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,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x09, 0x88, 0x02, 0x01, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01,
+ 0x12, 0x6c, 0x0a, 0x15, 0x52, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x61,
+ 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x25, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x72,
+ 0x0a, 0x17, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x47, 0x69, 0x74, 0x41,
+ 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x61,
+ 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x47, 0x69, 0x74,
+ 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x47, 0x69, 0x74, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02,
+ 0x08, 0x01, 0x12, 0x66, 0x0a, 0x13, 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x6f, 0x4f,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x61,
+ 0x6c, 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x6f, 0x4f, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
+ 0x67, 0x69, 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x74, 0x6f,
+ 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x06, 0xfa, 0x97, 0x28, 0x02, 0x08, 0x01, 0x12, 0x54, 0x0a, 0x0d, 0x47, 0x65,
+ 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1c, 0x2e, 0x67, 0x69,
+ 0x74, 0x61, 0x6c, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f,
+ 0x6f, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x61,
+ 0x6c, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x6f, 0x6c,
+ 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, 0x34, 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/objectpool_grpc.pb.go b/proto/go/gitalypb/objectpool_grpc.pb.go
index ad358e18f..56f258484 100644
--- a/proto/go/gitalypb/objectpool_grpc.pb.go
+++ b/proto/go/gitalypb/objectpool_grpc.pb.go
@@ -22,6 +22,17 @@ type ObjectPoolServiceClient interface {
DeleteObjectPool(ctx context.Context, in *DeleteObjectPoolRequest, opts ...grpc.CallOption) (*DeleteObjectPoolResponse, error)
// Repositories are assumed to be stored on the same disk
LinkRepositoryToObjectPool(ctx context.Context, in *LinkRepositoryToObjectPoolRequest, opts ...grpc.CallOption) (*LinkRepositoryToObjectPoolResponse, error)
+ // Deprecated: Do not use.
+ // UnlinkRepositoryFromObjectPool does not unlink the repository from the
+ // object pool as you'd think, but all it really does is to remove the object
+ // pool's remote pointing to the repository. And even this is a no-op given
+ // that we'd try to remove the remote by the repository's `GlRepository()`
+ // name, which we never create in the first place. To unlink repositories
+ // from an object pool, you'd really want to execute DisconnectGitAlternates
+ // to remove the repository's link to the pool's object database.
+ //
+ // This function is never called by anyone and highly misleading. It's thus
+ // deprecated and will be removed in v14.4.
UnlinkRepositoryFromObjectPool(ctx context.Context, in *UnlinkRepositoryFromObjectPoolRequest, opts ...grpc.CallOption) (*UnlinkRepositoryFromObjectPoolResponse, error)
ReduplicateRepository(ctx context.Context, in *ReduplicateRepositoryRequest, opts ...grpc.CallOption) (*ReduplicateRepositoryResponse, error)
DisconnectGitAlternates(ctx context.Context, in *DisconnectGitAlternatesRequest, opts ...grpc.CallOption) (*DisconnectGitAlternatesResponse, error)
@@ -64,6 +75,7 @@ func (c *objectPoolServiceClient) LinkRepositoryToObjectPool(ctx context.Context
return out, nil
}
+// Deprecated: Do not use.
func (c *objectPoolServiceClient) UnlinkRepositoryFromObjectPool(ctx context.Context, in *UnlinkRepositoryFromObjectPoolRequest, opts ...grpc.CallOption) (*UnlinkRepositoryFromObjectPoolResponse, error) {
out := new(UnlinkRepositoryFromObjectPoolResponse)
err := c.cc.Invoke(ctx, "/gitaly.ObjectPoolService/UnlinkRepositoryFromObjectPool", in, out, opts...)
@@ -117,6 +129,17 @@ type ObjectPoolServiceServer interface {
DeleteObjectPool(context.Context, *DeleteObjectPoolRequest) (*DeleteObjectPoolResponse, error)
// Repositories are assumed to be stored on the same disk
LinkRepositoryToObjectPool(context.Context, *LinkRepositoryToObjectPoolRequest) (*LinkRepositoryToObjectPoolResponse, error)
+ // Deprecated: Do not use.
+ // UnlinkRepositoryFromObjectPool does not unlink the repository from the
+ // object pool as you'd think, but all it really does is to remove the object
+ // pool's remote pointing to the repository. And even this is a no-op given
+ // that we'd try to remove the remote by the repository's `GlRepository()`
+ // name, which we never create in the first place. To unlink repositories
+ // from an object pool, you'd really want to execute DisconnectGitAlternates
+ // to remove the repository's link to the pool's object database.
+ //
+ // This function is never called by anyone and highly misleading. It's thus
+ // deprecated and will be removed in v14.4.
UnlinkRepositoryFromObjectPool(context.Context, *UnlinkRepositoryFromObjectPoolRequest) (*UnlinkRepositoryFromObjectPoolResponse, error)
ReduplicateRepository(context.Context, *ReduplicateRepositoryRequest) (*ReduplicateRepositoryResponse, error)
DisconnectGitAlternates(context.Context, *DisconnectGitAlternatesRequest) (*DisconnectGitAlternatesResponse, error)
diff --git a/proto/objectpool.proto b/proto/objectpool.proto
index 569ef8aab..dcbfb9a9d 100644
--- a/proto/objectpool.proto
+++ b/proto/objectpool.proto
@@ -25,7 +25,19 @@ service ObjectPoolService {
op: MUTATOR
};
}
+
+ // UnlinkRepositoryFromObjectPool does not unlink the repository from the
+ // object pool as you'd think, but all it really does is to remove the object
+ // pool's remote pointing to the repository. And even this is a no-op given
+ // that we'd try to remove the remote by the repository's `GlRepository()`
+ // name, which we never create in the first place. To unlink repositories
+ // from an object pool, you'd really want to execute DisconnectGitAlternates
+ // to remove the repository's link to the pool's object database.
+ //
+ // This function is never called by anyone and highly misleading. It's thus
+ // deprecated and will be removed in v14.4.
rpc UnlinkRepositoryFromObjectPool(UnlinkRepositoryFromObjectPoolRequest) returns (UnlinkRepositoryFromObjectPoolResponse) {
+ option deprecated = true;
option (op_type) = {
op: MUTATOR
};
diff --git a/ruby/proto/gitaly/objectpool_services_pb.rb b/ruby/proto/gitaly/objectpool_services_pb.rb
index a621571e3..e8c932bfd 100644
--- a/ruby/proto/gitaly/objectpool_services_pb.rb
+++ b/ruby/proto/gitaly/objectpool_services_pb.rb
@@ -18,6 +18,16 @@ module Gitaly
rpc :DeleteObjectPool, Gitaly::DeleteObjectPoolRequest, Gitaly::DeleteObjectPoolResponse
# Repositories are assumed to be stored on the same disk
rpc :LinkRepositoryToObjectPool, Gitaly::LinkRepositoryToObjectPoolRequest, Gitaly::LinkRepositoryToObjectPoolResponse
+ # UnlinkRepositoryFromObjectPool does not unlink the repository from the
+ # object pool as you'd think, but all it really does is to remove the object
+ # pool's remote pointing to the repository. And even this is a no-op given
+ # that we'd try to remove the remote by the repository's `GlRepository()`
+ # name, which we never create in the first place. To unlink repositories
+ # from an object pool, you'd really want to execute DisconnectGitAlternates
+ # to remove the repository's link to the pool's object database.
+ #
+ # This function is never called by anyone and highly misleading. It's thus
+ # deprecated and will be removed in v14.4.
rpc :UnlinkRepositoryFromObjectPool, Gitaly::UnlinkRepositoryFromObjectPoolRequest, Gitaly::UnlinkRepositoryFromObjectPoolResponse
rpc :ReduplicateRepository, Gitaly::ReduplicateRepositoryRequest, Gitaly::ReduplicateRepositoryResponse
rpc :DisconnectGitAlternates, Gitaly::DisconnectGitAlternatesRequest, Gitaly::DisconnectGitAlternatesResponse