diff options
author | Justin Tobler <jtobler@gitlab.com> | 2023-02-13 22:10:36 +0300 |
---|---|---|
committer | Justin Tobler <jtobler@gitlab.com> | 2023-02-15 20:56:04 +0300 |
commit | 4d6a0089467ef2fada2ecacb28bedd4e88285c41 (patch) | |
tree | 6c4f86ea674cdd05232fc0401019dfb7a0d5e0c6 /internal | |
parent | ebc3336284d9ef5f2242e47d433aa94e4093ec2a (diff) |
proto: Deprecate `BackupCustomHooks` RPC
Now with the `GetCustomHooks` RPC implemented, `BackupCustomHooks` is
redundant and can be deprecated. This change deprecates the RPC and
updates callsites.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/backup/backup.go | 2 | ||||
-rw-r--r-- | internal/gitaly/service/repository/get_custom_hooks.go (renamed from internal/gitaly/service/repository/backup_custom_hooks.go) | 0 | ||||
-rw-r--r-- | internal/gitaly/service/repository/get_custom_hooks_test.go (renamed from internal/gitaly/service/repository/backup_custom_hooks_test.go) | 4 |
3 files changed, 5 insertions, 1 deletions
diff --git a/internal/backup/backup.go b/internal/backup/backup.go index 4917e21ab..843df0663 100644 --- a/internal/backup/backup.go +++ b/internal/backup/backup.go @@ -421,7 +421,7 @@ func (mgr *Manager) writeCustomHooks(ctx context.Context, path string, server st if err != nil { return err } - stream, err := repoClient.BackupCustomHooks(ctx, &gitalypb.BackupCustomHooksRequest{Repository: repo}) + stream, err := repoClient.GetCustomHooks(ctx, &gitalypb.GetCustomHooksRequest{Repository: repo}) if err != nil { return err } diff --git a/internal/gitaly/service/repository/backup_custom_hooks.go b/internal/gitaly/service/repository/get_custom_hooks.go index 991b478ab..991b478ab 100644 --- a/internal/gitaly/service/repository/backup_custom_hooks.go +++ b/internal/gitaly/service/repository/get_custom_hooks.go diff --git a/internal/gitaly/service/repository/backup_custom_hooks_test.go b/internal/gitaly/service/repository/get_custom_hooks_test.go index 600daa1f0..93de4f3d1 100644 --- a/internal/gitaly/service/repository/backup_custom_hooks_test.go +++ b/internal/gitaly/service/repository/get_custom_hooks_test.go @@ -46,6 +46,7 @@ func TestGetCustomHooks_successful(t *testing.T) { desc: "BackupCustomHooks", streamReader: func(t *testing.T, ctx context.Context, repo *gitalypb.Repository, client gitalypb.RepositoryServiceClient) *tar.Reader { request := &gitalypb.BackupCustomHooksRequest{Repository: repo} + //nolint:staticcheck stream, err := client.BackupCustomHooks(ctx, request) require.NoError(t, err) @@ -112,6 +113,7 @@ func TestGetCustomHooks_symlink(t *testing.T) { desc: "BackupCustomHooks", streamReader: func(t *testing.T, ctx context.Context, repo *gitalypb.Repository, client gitalypb.RepositoryServiceClient) *tar.Reader { request := &gitalypb.BackupCustomHooksRequest{Repository: repo} + //nolint:staticcheck stream, err := client.BackupCustomHooks(ctx, request) require.NoError(t, err) @@ -169,6 +171,7 @@ func TestGetCustomHooks_nonexistentHooks(t *testing.T) { desc: "BackupCustomHooks", streamReader: func(t *testing.T, ctx context.Context, repo *gitalypb.Repository, client gitalypb.RepositoryServiceClient) *tar.Reader { request := &gitalypb.BackupCustomHooksRequest{Repository: repo} + //nolint:staticcheck stream, err := client.BackupCustomHooks(ctx, request) require.NoError(t, err) @@ -245,6 +248,7 @@ func TestBackupCustomHooks_validate(t *testing.T) { }, } { t.Run(tc.desc, func(t *testing.T) { + //nolint:staticcheck stream, err := client.BackupCustomHooks(ctx, tc.req) require.NoError(t, err) _, err = stream.Recv() |