From bead28d4dd8c6fa0166d4490fe479dca78c51bc7 Mon Sep 17 00:00:00 2001 From: James Liu Date: Thu, 14 Dec 2023 11:55:36 +1100 Subject: proto: Deprecate RemoveAll Now that we've adjusted the restore mechanism to delete individual repos as needed, this RPC is no longer required. See the following issues for more context: - https://gitlab.com/gitlab-org/gitaly/-/issues/5357 - https://gitlab.com/gitlab-org/gitaly/-/issues/5269 Changelog: deprecated --- internal/gitaly/service/repository/remove_all_test.go | 1 + internal/praefect/remove_all.go | 1 + internal/praefect/remove_all_test.go | 1 + 3 files changed, 3 insertions(+) (limited to 'internal') diff --git a/internal/gitaly/service/repository/remove_all_test.go b/internal/gitaly/service/repository/remove_all_test.go index 785f54b01..fd913523a 100644 --- a/internal/gitaly/service/repository/remove_all_test.go +++ b/internal/gitaly/service/repository/remove_all_test.go @@ -28,6 +28,7 @@ Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/5269`) require.DirExists(t, repo1Path) require.DirExists(t, repo1Path) + //nolint:staticcheck _, err := client.RemoveAll(ctx, &gitalypb.RemoveAllRequest{ StorageName: cfg.Storages[0].Name, }) diff --git a/internal/praefect/remove_all.go b/internal/praefect/remove_all.go index 9fa08206f..9c383cd0e 100644 --- a/internal/praefect/remove_all.go +++ b/internal/praefect/remove_all.go @@ -32,6 +32,7 @@ func RemoveAllHandler(rs datastore.RepositoryStore, conns Connections) grpc.Stre conn := conn group.Go(func() error { + //nolint:staticcheck _, err := gitalypb.NewRepositoryServiceClient(conn).RemoveAll(ctx, &gitalypb.RemoveAllRequest{ StorageName: rewrittenStorage, }) diff --git a/internal/praefect/remove_all_test.go b/internal/praefect/remove_all_test.go index 965ffb95b..6b5e6f848 100644 --- a/internal/praefect/remove_all_test.go +++ b/internal/praefect/remove_all_test.go @@ -96,6 +96,7 @@ Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/5269`) _, err = client.RepositorySize(ctx, &gitalypb.RepositorySizeRequest{Repository: &gitalypb.Repository{}}) testhelper.RequireGrpcError(t, errServedByGitaly, err) + //nolint:staticcheck resp, err := client.RemoveAll(ctx, &gitalypb.RemoveAllRequest{StorageName: virtualStorage}) require.NoError(t, err) -- cgit v1.2.3