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:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2019-10-16 17:45:05 +0300
committerjramsay <jcai@gitlab.com>2019-10-18 03:04:23 +0300
commit87230c01f37109dde8fe4568af83dc3820139969 (patch)
tree15509fd90d01a19e0b494b60c1c0cf5c557a7aec
parent4105a3e5a1c471ad3a18315822f18b83cbb7e1f1 (diff)
Remove the Storage service from Gitaly
This change can be made after each of the RPCs are removed from the clients[1]. The storage service was node scoped, and it's easier if this is not the case, which is why the service was phased out. Closes: https://gitlab.com/gitlab-org/gitaly/issues/1923 [1]: https://gitlab.com/gitlab-org/gitlab/merge_requests/18390
-rw-r--r--changelogs/unreleased/jc-remove-list-directories.yml2
-rw-r--r--internal/praefect/protoregistry/protoregistry_test.go7
-rw-r--r--internal/service/register.go2
-rw-r--r--internal/service/storage/.gitignore1
-rw-r--r--internal/service/storage/deleteall.go69
-rw-r--r--internal/service/storage/deleteall_test.go133
-rw-r--r--internal/service/storage/server.go12
-rw-r--r--internal/service/storage/testhelper_test.go69
-rw-r--r--proto/go/gitalypb/protolist.go1
-rw-r--r--proto/go/gitalypb/storage.pb.go200
-rw-r--r--proto/storage.proto22
-rw-r--r--ruby/proto/gitaly.rb2
-rw-r--r--ruby/proto/gitaly/storage_pb.rb18
-rw-r--r--ruby/proto/gitaly/storage_services_pb.rb22
14 files changed, 1 insertions, 559 deletions
diff --git a/changelogs/unreleased/jc-remove-list-directories.yml b/changelogs/unreleased/jc-remove-list-directories.yml
index 13cf32eac..c15cfefcc 100644
--- a/changelogs/unreleased/jc-remove-list-directories.yml
+++ b/changelogs/unreleased/jc-remove-list-directories.yml
@@ -1,5 +1,5 @@
---
-title: Remove ListDirectories RPC
+title: Remove StorageService
merge_request: 1544
author:
type: deprecated
diff --git a/internal/praefect/protoregistry/protoregistry_test.go b/internal/praefect/protoregistry/protoregistry_test.go
index eb21fcce1..56ee4139d 100644
--- a/internal/praefect/protoregistry/protoregistry_test.go
+++ b/internal/praefect/protoregistry/protoregistry_test.go
@@ -170,9 +170,6 @@ func TestPopulatesProtoRegistry(t *testing.T) {
"SSHReceivePack": protoregistry.OpMutator,
"SSHUploadArchive": protoregistry.OpMutator,
},
- "StorageService": map[string]protoregistry.OpType{
- "DeleteAllRepositories": protoregistry.OpMutator,
- },
"WikiService": map[string]protoregistry.OpType{
"WikiGetPageVersions": protoregistry.OpAccessor,
"WikiWritePage": protoregistry.OpMutator,
@@ -221,10 +218,6 @@ func TestMethodInfoScope(t *testing.T) {
scope: protoregistry.ScopeRepository,
},
{
- method: "/gitaly.StorageService/DeleteAllRepositories",
- scope: protoregistry.ScopeStorage,
- },
- {
method: "/gitaly.ServerService/ServerInfo",
scope: protoregistry.ScopeServer,
},
diff --git a/internal/service/register.go b/internal/service/register.go
index aa1466e14..f12215e56 100644
--- a/internal/service/register.go
+++ b/internal/service/register.go
@@ -16,7 +16,6 @@ import (
"gitlab.com/gitlab-org/gitaly/internal/service/server"
"gitlab.com/gitlab-org/gitaly/internal/service/smarthttp"
"gitlab.com/gitlab-org/gitaly/internal/service/ssh"
- "gitlab.com/gitlab-org/gitaly/internal/service/storage"
"gitlab.com/gitlab-org/gitaly/internal/service/wiki"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"google.golang.org/grpc"
@@ -41,7 +40,6 @@ func RegisterAll(grpcServer *grpc.Server, rubyServer *rubyserver.Server) {
gitalypb.RegisterConflictsServiceServer(grpcServer, conflicts.NewServer(rubyServer))
gitalypb.RegisterRemoteServiceServer(grpcServer, remote.NewServer(rubyServer))
gitalypb.RegisterServerServiceServer(grpcServer, server.NewServer())
- gitalypb.RegisterStorageServiceServer(grpcServer, storage.NewServer())
gitalypb.RegisterObjectPoolServiceServer(grpcServer, objectpool.NewServer())
healthpb.RegisterHealthServer(grpcServer, health.NewServer())
diff --git a/internal/service/storage/.gitignore b/internal/service/storage/.gitignore
deleted file mode 100644
index 2743e47ce..000000000
--- a/internal/service/storage/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/testdata/repositories
diff --git a/internal/service/storage/deleteall.go b/internal/service/storage/deleteall.go
deleted file mode 100644
index f560b0d16..000000000
--- a/internal/service/storage/deleteall.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package storage
-
-import (
- "context"
- "io"
- "os"
- "path"
-
- grpc_logrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus"
- log "github.com/sirupsen/logrus"
- "gitlab.com/gitlab-org/gitaly/internal/helper"
- "gitlab.com/gitlab-org/gitaly/internal/tempdir"
- "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
-)
-
-func (s *server) DeleteAllRepositories(ctx context.Context, req *gitalypb.DeleteAllRepositoriesRequest) (*gitalypb.DeleteAllRepositoriesResponse, error) {
- storageDir, err := helper.GetStorageByName(req.StorageName)
- if err != nil {
- return nil, status.Errorf(codes.InvalidArgument, "storage lookup failed: %v", err)
- }
-
- trashDir, err := tempdir.ForDeleteAllRepositories(req.StorageName)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "create trash dir: %v", err)
- }
-
- dir, err := os.Open(storageDir)
- if err != nil {
- return nil, status.Errorf(codes.Internal, "open storage dir: %v", err)
- }
- defer dir.Close()
-
- grpc_logrus.Extract(ctx).WithFields(log.Fields{
- "trashDir": trashDir,
- "storage": req.StorageName,
- }).Warn("moving all repositories in storage to trash")
-
- count := 0
- for done := false; !done; {
- dirents, err := dir.Readdir(100)
- if err == io.EOF {
- done = true
- } else if err != nil {
- return nil, status.Errorf(codes.Internal, "read storage dir: %v", err)
- }
-
- for _, d := range dirents {
- if d.Name() == tempdir.GitalyDataPrefix {
- continue
- }
-
- count++
-
- if err := os.Rename(path.Join(storageDir, d.Name()), path.Join(trashDir, d.Name())); err != nil {
- return nil, status.Errorf(codes.Internal, "move dir: %v", err)
- }
- }
- }
-
- grpc_logrus.Extract(ctx).WithFields(log.Fields{
- "trashDir": trashDir,
- "storage": req.StorageName,
- "numDirectories": count,
- }).Warn("directories moved to trash")
-
- return &gitalypb.DeleteAllRepositoriesResponse{}, nil
-}
diff --git a/internal/service/storage/deleteall_test.go b/internal/service/storage/deleteall_test.go
deleted file mode 100644
index be0814a81..000000000
--- a/internal/service/storage/deleteall_test.go
+++ /dev/null
@@ -1,133 +0,0 @@
-package storage
-
-import (
- "fmt"
- "io/ioutil"
- "os"
- "os/exec"
- "path"
- "testing"
-
- "github.com/stretchr/testify/require"
- "gitlab.com/gitlab-org/gitaly/internal/config"
- "gitlab.com/gitlab-org/gitaly/internal/tempdir"
- "gitlab.com/gitlab-org/gitaly/internal/testhelper"
- "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
-)
-
-func TestDeleteAllSuccess(t *testing.T) {
- require.NoError(t, os.RemoveAll(testStorage.Path))
-
- gitalyDataFile := path.Join(testStorage.Path, tempdir.GitalyDataPrefix+"/foobar")
- require.NoError(t, os.MkdirAll(path.Dir(gitalyDataFile), 0755))
- require.NoError(t, ioutil.WriteFile(gitalyDataFile, nil, 0644))
-
- repoPaths := []string{
- "foo/bar1.git",
- "foo/bar2.git",
- "baz/foo/qux3.git",
- "baz/foo/bar1.git",
- }
-
- for _, p := range repoPaths {
- fullPath := path.Join(testStorage.Path, p)
- require.NoError(t, os.MkdirAll(fullPath, 0755))
- require.NoError(t, exec.Command("git", "init", "--bare", fullPath).Run())
- }
-
- dirents := storageDirents(t, testStorage)
- expectedNames := []string{"+gitaly", "baz", "foo"}
- require.Len(t, dirents, len(expectedNames))
- for i, expected := range expectedNames {
- require.Equal(t, expected, dirents[i].Name())
- }
-
- server, socketPath := runStorageServer(t)
- defer server.Stop()
-
- client, conn := newStorageClient(t, socketPath)
- defer conn.Close()
-
- ctx, cancel := testhelper.Context()
- defer cancel()
- _, err := client.DeleteAllRepositories(ctx, &gitalypb.DeleteAllRepositoriesRequest{StorageName: testStorage.Name})
- require.NoError(t, err)
-
- dirents = storageDirents(t, testStorage)
- require.Len(t, dirents, 1)
- require.Equal(t, "+gitaly", dirents[0].Name())
-
- _, err = os.Stat(gitalyDataFile)
- require.NoError(t, err, "unrelated data file should still exist")
-}
-
-func storageDirents(t *testing.T, st config.Storage) []os.FileInfo {
- dirents, err := ioutil.ReadDir(st.Path)
- require.NoError(t, err)
- return dirents
-}
-
-func TestDeleteAllFail(t *testing.T) {
- server, socketPath := runStorageServer(t)
- defer server.Stop()
-
- client, conn := newStorageClient(t, socketPath)
- defer conn.Close()
-
- ctx, cancel := testhelper.Context()
- defer cancel()
-
- testCases := []struct {
- desc string
- req *gitalypb.DeleteAllRepositoriesRequest
- setup func(t *testing.T)
- code codes.Code
- }{
- {
- desc: "empty storage name",
- req: &gitalypb.DeleteAllRepositoriesRequest{},
- code: codes.InvalidArgument,
- },
- {
- desc: "unknown storage name",
- req: &gitalypb.DeleteAllRepositoriesRequest{StorageName: "does not exist"},
- code: codes.InvalidArgument,
- },
- {
- desc: "cannot create trash dir",
- req: &gitalypb.DeleteAllRepositoriesRequest{StorageName: testStorage.Name},
- setup: func(t *testing.T) {
- dataDir := path.Join(testStorage.Path, tempdir.GitalyDataPrefix)
- require.NoError(t, os.RemoveAll(dataDir))
- require.NoError(t, ioutil.WriteFile(dataDir, nil, 0644), "write file where there should be a directory")
-
- lsOut, err := exec.Command("ls", "-l", testStorage.Path).CombinedOutput()
- require.NoError(t, err)
- fmt.Printf("%s\n", lsOut)
- },
- code: codes.Internal,
- },
- }
-
- for _, tc := range testCases {
- t.Run(tc.desc, func(t *testing.T) {
- require.NoError(t, os.RemoveAll(testStorage.Path))
- require.NoError(t, os.MkdirAll(testStorage.Path, 0755))
-
- repoPath := path.Join(testStorage.Path, "foobar.git")
- require.NoError(t, exec.Command("git", "init", "--bare", repoPath).Run())
-
- if tc.setup != nil {
- tc.setup(t)
- }
-
- _, err := client.DeleteAllRepositories(ctx, tc.req)
- require.Equal(t, tc.code, status.Code(err), "expected grpc status code")
-
- _, err = os.Stat(repoPath)
- require.NoError(t, err, "repo must still exist")
- })
- }
-}
diff --git a/internal/service/storage/server.go b/internal/service/storage/server.go
deleted file mode 100644
index 84cf4fdc4..000000000
--- a/internal/service/storage/server.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package storage
-
-import "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
-
-type server struct {
- gitalypb.UnimplementedStorageServiceServer
-}
-
-// NewServer creates a new instance of a gRPC storage server
-func NewServer() gitalypb.StorageServiceServer {
- return &server{}
-}
diff --git a/internal/service/storage/testhelper_test.go b/internal/service/storage/testhelper_test.go
deleted file mode 100644
index 63da71a65..000000000
--- a/internal/service/storage/testhelper_test.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package storage
-
-import (
- "net"
- "os"
- "path/filepath"
- "testing"
-
- "gitlab.com/gitlab-org/gitaly/internal/config"
- "gitlab.com/gitlab-org/gitaly/internal/testhelper"
- "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
- "google.golang.org/grpc"
- "google.golang.org/grpc/reflection"
-)
-
-var testStorage config.Storage
-
-func TestMain(m *testing.M) {
- configureTestStorage()
- os.Exit(m.Run())
-}
-
-func configureTestStorage() {
- storagePath, err := filepath.Abs("testdata/repositories/storage1")
- if err != nil {
- panic(err)
- }
-
- if err := os.RemoveAll(storagePath); err != nil {
- panic(err)
- }
-
- if err := os.MkdirAll(storagePath, 0755); err != nil {
- panic(err)
- }
-
- testStorage = config.Storage{Name: "storage-will-be-deleted", Path: storagePath}
-
- config.Config.Storages = []config.Storage{testStorage}
-}
-
-func runStorageServer(t *testing.T) (*grpc.Server, string) {
- server := testhelper.NewTestGrpcServer(t, nil, nil)
- serverSocketPath := testhelper.GetTemporaryGitalySocketFileName()
-
- listener, err := net.Listen("unix", serverSocketPath)
- if err != nil {
- t.Fatal(err)
- }
-
- gitalypb.RegisterStorageServiceServer(server, NewServer())
- reflection.Register(server)
-
- go server.Serve(listener)
-
- return server, "unix://" + serverSocketPath
-}
-
-func newStorageClient(t *testing.T, serverSocketPath string) (gitalypb.StorageServiceClient, *grpc.ClientConn) {
- connOpts := []grpc.DialOption{
- grpc.WithInsecure(),
- }
- conn, err := grpc.Dial(serverSocketPath, connOpts...)
- if err != nil {
- t.Fatal(err)
- }
-
- return gitalypb.NewStorageServiceClient(conn), conn
-}
diff --git a/proto/go/gitalypb/protolist.go b/proto/go/gitalypb/protolist.go
index c85049d62..8e400d0df 100644
--- a/proto/go/gitalypb/protolist.go
+++ b/proto/go/gitalypb/protolist.go
@@ -19,6 +19,5 @@ var GitalyProtos = []string{
"shared.proto",
"smarthttp.proto",
"ssh.proto",
- "storage.proto",
"wiki.proto",
}
diff --git a/proto/go/gitalypb/storage.pb.go b/proto/go/gitalypb/storage.pb.go
deleted file mode 100644
index 5269b5563..000000000
--- a/proto/go/gitalypb/storage.pb.go
+++ /dev/null
@@ -1,200 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: storage.proto
-
-package gitalypb
-
-import (
- context "context"
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- math "math"
-)
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
-
-type DeleteAllRepositoriesRequest struct {
- StorageName string `protobuf:"bytes,1,opt,name=storage_name,json=storageName,proto3" json:"storage_name,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DeleteAllRepositoriesRequest) Reset() { *m = DeleteAllRepositoriesRequest{} }
-func (m *DeleteAllRepositoriesRequest) String() string { return proto.CompactTextString(m) }
-func (*DeleteAllRepositoriesRequest) ProtoMessage() {}
-func (*DeleteAllRepositoriesRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_0d2c4ccf1453ffdb, []int{0}
-}
-
-func (m *DeleteAllRepositoriesRequest) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DeleteAllRepositoriesRequest.Unmarshal(m, b)
-}
-func (m *DeleteAllRepositoriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DeleteAllRepositoriesRequest.Marshal(b, m, deterministic)
-}
-func (m *DeleteAllRepositoriesRequest) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeleteAllRepositoriesRequest.Merge(m, src)
-}
-func (m *DeleteAllRepositoriesRequest) XXX_Size() int {
- return xxx_messageInfo_DeleteAllRepositoriesRequest.Size(m)
-}
-func (m *DeleteAllRepositoriesRequest) XXX_DiscardUnknown() {
- xxx_messageInfo_DeleteAllRepositoriesRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeleteAllRepositoriesRequest proto.InternalMessageInfo
-
-func (m *DeleteAllRepositoriesRequest) GetStorageName() string {
- if m != nil {
- return m.StorageName
- }
- return ""
-}
-
-type DeleteAllRepositoriesResponse struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *DeleteAllRepositoriesResponse) Reset() { *m = DeleteAllRepositoriesResponse{} }
-func (m *DeleteAllRepositoriesResponse) String() string { return proto.CompactTextString(m) }
-func (*DeleteAllRepositoriesResponse) ProtoMessage() {}
-func (*DeleteAllRepositoriesResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_0d2c4ccf1453ffdb, []int{1}
-}
-
-func (m *DeleteAllRepositoriesResponse) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DeleteAllRepositoriesResponse.Unmarshal(m, b)
-}
-func (m *DeleteAllRepositoriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DeleteAllRepositoriesResponse.Marshal(b, m, deterministic)
-}
-func (m *DeleteAllRepositoriesResponse) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DeleteAllRepositoriesResponse.Merge(m, src)
-}
-func (m *DeleteAllRepositoriesResponse) XXX_Size() int {
- return xxx_messageInfo_DeleteAllRepositoriesResponse.Size(m)
-}
-func (m *DeleteAllRepositoriesResponse) XXX_DiscardUnknown() {
- xxx_messageInfo_DeleteAllRepositoriesResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeleteAllRepositoriesResponse proto.InternalMessageInfo
-
-func init() {
- proto.RegisterType((*DeleteAllRepositoriesRequest)(nil), "gitaly.DeleteAllRepositoriesRequest")
- proto.RegisterType((*DeleteAllRepositoriesResponse)(nil), "gitaly.DeleteAllRepositoriesResponse")
-}
-
-func init() { proto.RegisterFile("storage.proto", fileDescriptor_0d2c4ccf1453ffdb) }
-
-var fileDescriptor_0d2c4ccf1453ffdb = []byte{
- // 210 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x2e, 0xc9, 0x2f,
- 0x4a, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4b, 0xcf, 0x2c, 0x49, 0xcc,
- 0xa9, 0x94, 0xe2, 0x29, 0xce, 0x48, 0x2c, 0x4a, 0x4d, 0x81, 0x88, 0x2a, 0x39, 0x72, 0xc9, 0xb8,
- 0xa4, 0xe6, 0xa4, 0x96, 0xa4, 0x3a, 0xe6, 0xe4, 0x04, 0xa5, 0x16, 0xe4, 0x17, 0x67, 0x96, 0xe4,
- 0x17, 0x65, 0xa6, 0x16, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x29, 0x72, 0xf1, 0x40,
- 0x8d, 0x89, 0xcf, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, 0x86, 0x8a,
- 0xf9, 0x25, 0xe6, 0xa6, 0x2a, 0xc9, 0x73, 0xc9, 0xe2, 0x30, 0xa2, 0xb8, 0x20, 0x3f, 0xaf, 0x38,
- 0xd5, 0xa8, 0x81, 0x91, 0x8b, 0x2f, 0x18, 0xa2, 0x21, 0x38, 0xb5, 0xa8, 0x2c, 0x33, 0x39, 0x55,
- 0x28, 0x8f, 0x4b, 0x14, 0xab, 0x1e, 0x21, 0x15, 0x3d, 0x88, 0x33, 0xf5, 0xf0, 0xb9, 0x4a, 0x4a,
- 0x95, 0x80, 0x2a, 0x88, 0xc5, 0x4a, 0x1c, 0xbf, 0xa6, 0x6b, 0xb0, 0x70, 0x30, 0x0a, 0x30, 0x39,
- 0x19, 0x44, 0x81, 0x74, 0xe4, 0x24, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0x98, 0xba, 0xf9,
- 0x45, 0xe9, 0xfa, 0x10, 0x73, 0xf4, 0xc1, 0x81, 0xa1, 0x9f, 0x9e, 0x0f, 0xe5, 0x17, 0x24, 0x25,
- 0xb1, 0x81, 0x85, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x04, 0x69, 0x1d, 0xd3, 0x46, 0x01,
- 0x00, 0x00,
-}
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConn
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion4
-
-// StorageServiceClient is the client API for StorageService service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type StorageServiceClient interface {
- DeleteAllRepositories(ctx context.Context, in *DeleteAllRepositoriesRequest, opts ...grpc.CallOption) (*DeleteAllRepositoriesResponse, error)
-}
-
-type storageServiceClient struct {
- cc *grpc.ClientConn
-}
-
-func NewStorageServiceClient(cc *grpc.ClientConn) StorageServiceClient {
- return &storageServiceClient{cc}
-}
-
-func (c *storageServiceClient) DeleteAllRepositories(ctx context.Context, in *DeleteAllRepositoriesRequest, opts ...grpc.CallOption) (*DeleteAllRepositoriesResponse, error) {
- out := new(DeleteAllRepositoriesResponse)
- err := c.cc.Invoke(ctx, "/gitaly.StorageService/DeleteAllRepositories", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// StorageServiceServer is the server API for StorageService service.
-type StorageServiceServer interface {
- DeleteAllRepositories(context.Context, *DeleteAllRepositoriesRequest) (*DeleteAllRepositoriesResponse, error)
-}
-
-// UnimplementedStorageServiceServer can be embedded to have forward compatible implementations.
-type UnimplementedStorageServiceServer struct {
-}
-
-func (*UnimplementedStorageServiceServer) DeleteAllRepositories(ctx context.Context, req *DeleteAllRepositoriesRequest) (*DeleteAllRepositoriesResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method DeleteAllRepositories not implemented")
-}
-
-func RegisterStorageServiceServer(s *grpc.Server, srv StorageServiceServer) {
- s.RegisterService(&_StorageService_serviceDesc, srv)
-}
-
-func _StorageService_DeleteAllRepositories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DeleteAllRepositoriesRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StorageServiceServer).DeleteAllRepositories(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/gitaly.StorageService/DeleteAllRepositories",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StorageServiceServer).DeleteAllRepositories(ctx, req.(*DeleteAllRepositoriesRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-var _StorageService_serviceDesc = grpc.ServiceDesc{
- ServiceName: "gitaly.StorageService",
- HandlerType: (*StorageServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "DeleteAllRepositories",
- Handler: _StorageService_DeleteAllRepositories_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "storage.proto",
-}
diff --git a/proto/storage.proto b/proto/storage.proto
deleted file mode 100644
index 6baef9a55..000000000
--- a/proto/storage.proto
+++ /dev/null
@@ -1,22 +0,0 @@
-syntax = "proto3";
-
-package gitaly;
-
-option go_package = "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb";
-
-import "shared.proto";
-
-service StorageService {
- rpc DeleteAllRepositories(DeleteAllRepositoriesRequest) returns (DeleteAllRepositoriesResponse) {
- option (op_type) = {
- op: MUTATOR,
- scope_level: STORAGE,
- };
- }
-}
-
-message DeleteAllRepositoriesRequest {
- string storage_name = 1;
-}
-
-message DeleteAllRepositoriesResponse {}
diff --git a/ruby/proto/gitaly.rb b/ruby/proto/gitaly.rb
index c35bc6e06..6347a6fbe 100644
--- a/ruby/proto/gitaly.rb
+++ b/ruby/proto/gitaly.rb
@@ -31,7 +31,5 @@ require 'gitaly/smarthttp_services_pb'
require 'gitaly/ssh_services_pb'
-require 'gitaly/storage_services_pb'
-
require 'gitaly/wiki_services_pb'
diff --git a/ruby/proto/gitaly/storage_pb.rb b/ruby/proto/gitaly/storage_pb.rb
deleted file mode 100644
index eb45843e5..000000000
--- a/ruby/proto/gitaly/storage_pb.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: storage.proto
-
-require 'google/protobuf'
-
-require 'shared_pb'
-Google::Protobuf::DescriptorPool.generated_pool.build do
- add_message "gitaly.DeleteAllRepositoriesRequest" do
- optional :storage_name, :string, 1
- end
- add_message "gitaly.DeleteAllRepositoriesResponse" do
- end
-end
-
-module Gitaly
- DeleteAllRepositoriesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.DeleteAllRepositoriesRequest").msgclass
- DeleteAllRepositoriesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.DeleteAllRepositoriesResponse").msgclass
-end
diff --git a/ruby/proto/gitaly/storage_services_pb.rb b/ruby/proto/gitaly/storage_services_pb.rb
deleted file mode 100644
index 4d631880f..000000000
--- a/ruby/proto/gitaly/storage_services_pb.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# Source: storage.proto for package 'gitaly'
-
-require 'grpc'
-require 'storage_pb'
-
-module Gitaly
- module StorageService
- class Service
-
- include GRPC::GenericService
-
- self.marshal_class_method = :encode
- self.unmarshal_class_method = :decode
- self.service_name = 'gitaly.StorageService'
-
- rpc :DeleteAllRepositories, DeleteAllRepositoriesRequest, DeleteAllRepositoriesResponse
- end
-
- Stub = Service.rpc_stub_class
- end
-end