diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2021-05-06 13:28:17 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2021-05-12 11:34:13 +0300 |
commit | 8d64c83a437bad4b3548b1b7f23fa5439c393ae0 (patch) | |
tree | 087bbe294bcb2e2f78a9e8638b504419906a1777 | |
parent | 8d525bfb986a26ee6c1c6d0ec976fa2614928cf8 (diff) |
wiki: Remove FindFile RPC
The FindFile RPC has been replaced by the Rails client to use GetBlob
and thus this RPC will no longer be called. See also:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56491.
This RPC has been completely removed by this change to clean it up on
the Gitaly side too.
Changelog: removed
-rw-r--r-- | changelogs/unreleased/zj-remove-wiki-find-file.yml | 5 | ||||
-rw-r--r-- | internal/gitaly/service/wiki/find_file.go | 46 | ||||
-rw-r--r-- | internal/gitaly/service/wiki/find_file_test.go | 233 | ||||
-rw-r--r-- | internal/gitaly/service/wiki/testhelper_test.go | 2 | ||||
-rw-r--r-- | internal/praefect/protoregistry/protoregistry_test.go | 1 | ||||
-rw-r--r-- | proto/go/gitalypb/wiki.pb.go | 333 | ||||
-rw-r--r-- | proto/wiki.proto | 20 | ||||
-rw-r--r-- | ruby/lib/gitaly_server/wiki_service.rb | 28 | ||||
-rw-r--r-- | ruby/lib/gitlab/git/wiki.rb | 12 | ||||
-rw-r--r-- | ruby/lib/gitlab/git/wiki_file.rb | 20 | ||||
-rw-r--r-- | ruby/proto/gitaly/wiki_pb.rb | 13 | ||||
-rw-r--r-- | ruby/proto/gitaly/wiki_services_pb.rb | 1 |
12 files changed, 77 insertions, 637 deletions
diff --git a/changelogs/unreleased/zj-remove-wiki-find-file.yml b/changelogs/unreleased/zj-remove-wiki-find-file.yml new file mode 100644 index 000000000..3465c2f1c --- /dev/null +++ b/changelogs/unreleased/zj-remove-wiki-find-file.yml @@ -0,0 +1,5 @@ +--- +title: 'wiki: Remove FindFile RPC' +merge_request: 3454 +author: +type: removed diff --git a/internal/gitaly/service/wiki/find_file.go b/internal/gitaly/service/wiki/find_file.go deleted file mode 100644 index 3e9a28719..000000000 --- a/internal/gitaly/service/wiki/find_file.go +++ /dev/null @@ -1,46 +0,0 @@ -package wiki - -import ( - "gitlab.com/gitlab-org/gitaly/internal/git" - "gitlab.com/gitlab-org/gitaly/internal/gitaly/rubyserver" - "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (s *server) WikiFindFile(request *gitalypb.WikiFindFileRequest, stream gitalypb.WikiService_WikiFindFileServer) error { - ctx := stream.Context() - - if err := git.ValidateRevisionAllowEmpty(request.Revision); err != nil { - return status.Errorf(codes.InvalidArgument, "WikiFindFile: %s", err) - } - - if len(request.GetName()) == 0 { - return status.Errorf(codes.InvalidArgument, "WikiFindFile: Empty Name") - } - - client, err := s.ruby.WikiServiceClient(ctx) - if err != nil { - return err - } - - clientCtx, err := rubyserver.SetHeaders(ctx, s.locator, request.GetRepository()) - if err != nil { - return err - } - - rubyStream, err := client.WikiFindFile(clientCtx, request) - if err != nil { - return err - } - - return rubyserver.Proxy(func() error { - resp, err := rubyStream.Recv() - if err != nil { - md := rubyStream.Trailer() - stream.SetTrailer(md) - return err - } - return stream.Send(resp) - }) -} diff --git a/internal/gitaly/service/wiki/find_file_test.go b/internal/gitaly/service/wiki/find_file_test.go deleted file mode 100644 index 371c39f75..000000000 --- a/internal/gitaly/service/wiki/find_file_test.go +++ /dev/null @@ -1,233 +0,0 @@ -package wiki - -import ( - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "testing" - - "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly/internal/git/gittest" - "gitlab.com/gitlab-org/gitaly/internal/gitaly/config" - "gitlab.com/gitlab-org/gitaly/internal/gitaly/rubyserver" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" - "google.golang.org/grpc/codes" -) - -func testSuccessfulWikiFindFileRequest(t *testing.T, cfg config.Cfg, rubySrv *rubyserver.Server) { - _, wikiRepoPath, cleanupFunc := setupWikiRepo(t, cfg) - defer cleanupFunc() - - client := setupWikiService(t, cfg, rubySrv) - - committerName := "Scrooge McDuck" - committerEmail := "scrooge@mcduck.com" - sandboxWikiPath := filepath.Join(cfg.Storages[0].Path, "find-file-sandbox") - - gittest.Exec(t, cfg, "clone", wikiRepoPath, sandboxWikiPath) - defer os.RemoveAll(sandboxWikiPath) - - sandboxWiki := &gitalypb.Repository{ - StorageName: "default", - RelativePath: "find-file-sandbox/.git", - } - - content, err := ioutil.ReadFile("testdata/clouds.png") - require.NoError(t, err) - - err = ioutil.WriteFile(filepath.Join(sandboxWikiPath, "cloúds.png"), content, 0644) - require.NoError(t, err) - - err = ioutil.WriteFile(filepath.Join(sandboxWikiPath, "no_content.png"), nil, 0644) - require.NoError(t, err) - - // Sandbox wiki is empty, so we create a commit to be used later - gittest.Exec(t, cfg, "-C", sandboxWikiPath, - "-c", fmt.Sprintf("user.name=%s", committerName), - "-c", fmt.Sprintf("user.email=%s", committerEmail), - "commit", "--allow-empty", "-m", "Adding an empty commit") - oldHeadID := gittest.Exec(t, cfg, "-C", sandboxWikiPath, "show", "--format=format:%H", "--no-patch", "HEAD") - - gittest.Exec(t, cfg, "-C", sandboxWikiPath, "add", ".") - gittest.Exec(t, cfg, "-C", sandboxWikiPath, - "-c", fmt.Sprintf("user.name=%s", committerName), - "-c", fmt.Sprintf("user.email=%s", committerEmail), - "commit", "-m", "Adding an image") - - newHeadID := gittest.Exec(t, cfg, "-C", sandboxWikiPath, "show", "--format=format:%H", "--no-patch", "HEAD") - - response := &gitalypb.WikiFindFileResponse{ - Name: []byte("cloúds.png"), - MimeType: "image/png", - Path: []byte("cloúds.png"), - } - - testCases := []struct { - desc string - request *gitalypb.WikiFindFileRequest - response *gitalypb.WikiFindFileResponse - expectedContent []byte - }{ - { - desc: "name only", - request: &gitalypb.WikiFindFileRequest{ - Repository: sandboxWiki, - Name: []byte("cloúds.png"), - }, - response: response, - expectedContent: content, - }, - { - desc: "name + revision that includes the file", - request: &gitalypb.WikiFindFileRequest{ - Repository: sandboxWiki, - Name: []byte("cloúds.png"), - Revision: newHeadID, - }, - response: response, - expectedContent: content, - }, - { - desc: "name + revision that does not include the file", - request: &gitalypb.WikiFindFileRequest{ - Repository: sandboxWiki, - Name: []byte("cloúds.png"), - Revision: oldHeadID, - }, - response: &gitalypb.WikiFindFileResponse{}, - expectedContent: content, - }, - { - desc: "non-existent name", - request: &gitalypb.WikiFindFileRequest{ - Repository: sandboxWiki, - Name: []byte("moar-clouds.png"), - }, - response: &gitalypb.WikiFindFileResponse{}, - expectedContent: content, - }, - { - desc: "file with no content", - request: &gitalypb.WikiFindFileRequest{ - Repository: sandboxWiki, - Name: []byte("no_content.png"), - }, - response: &gitalypb.WikiFindFileResponse{ - Name: []byte("no_content.png"), - MimeType: "image/png", - Path: []byte("no_content.png"), - }, - expectedContent: nil, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.desc, func(t *testing.T) { - ctx, cancel := testhelper.Context() - defer cancel() - - c, err := client.WikiFindFile(ctx, testCase.request) - require.NoError(t, err) - - expectedResponse := testCase.response - receivedResponse := readFullResponseFromWikiFindFileClient(t, c) - - // require.Equal doesn't display a proper diff when either expected/actual has a field - // with large data (RawData in our case), so we compare file attributes and content separately. - receivedContent := receivedResponse.GetRawData() - if receivedResponse != nil { - receivedResponse.RawData = nil - } - - testhelper.ProtoEqual(t, expectedResponse, receivedResponse) - if len(expectedResponse.Name) > 0 { - require.Equal(t, testCase.expectedContent, receivedContent, "mismatched content") - } - }) - } -} - -func testFailedWikiFindFileDueToValidation(t *testing.T, cfg config.Cfg, rubySrv *rubyserver.Server) { - wikiRepo, _, cleanupFunc := setupWikiRepo(t, cfg) - defer cleanupFunc() - - client := setupWikiService(t, cfg, rubySrv) - - testCases := []struct { - desc string - name string - revision string - code codes.Code - }{ - { - desc: "empty file path", - name: "", - revision: "master", - code: codes.InvalidArgument, - }, - { - desc: "invalid revision", - name: "image.jpg", - revision: "deadfacedeadfacedeadfacedeadfacedeadface", - code: codes.Unknown, - }, - { - desc: "dangerously invalid revision", - name: "image.jpg", - revision: "--output=/meow", - code: codes.InvalidArgument, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.desc, func(t *testing.T) { - ctx, cancel := testhelper.Context() - defer cancel() - - request := &gitalypb.WikiFindFileRequest{ - Repository: wikiRepo, - Name: []byte(testCase.name), - Revision: []byte(testCase.revision), - } - - c, err := client.WikiFindFile(ctx, request) - require.NoError(t, err) - - err = drainWikiFindFileResponse(c) - testhelper.RequireGrpcError(t, err, testCase.code) - }) - } -} - -func drainWikiFindFileResponse(c gitalypb.WikiService_WikiFindFileClient) error { - for { - _, err := c.Recv() - if err != nil { - return err - } - } -} - -func readFullResponseFromWikiFindFileClient(t *testing.T, c gitalypb.WikiService_WikiFindFileClient) (fullResponse *gitalypb.WikiFindFileResponse) { - t.Helper() - - for { - resp, err := c.Recv() - if err == io.EOF { - break - } else if err != nil { - t.Fatal(err) - } - - if fullResponse == nil { - fullResponse = resp - } else { - fullResponse.RawData = append(fullResponse.RawData, resp.GetRawData()...) - } - } - - return fullResponse -} diff --git a/internal/gitaly/service/wiki/testhelper_test.go b/internal/gitaly/service/wiki/testhelper_test.go index 8c31d7e8d..932a8bb3a 100644 --- a/internal/gitaly/service/wiki/testhelper_test.go +++ b/internal/gitaly/service/wiki/testhelper_test.go @@ -65,8 +65,6 @@ func TestWithRubySidecar(t *testing.T) { fs := []func(t *testing.T, cfg config.Cfg, rubySrv *rubyserver.Server){ testSuccessfulWikiDeletePageRequest, testFailedWikiDeletePageDueToValidations, - testSuccessfulWikiFindFileRequest, - testFailedWikiFindFileDueToValidation, testSuccessfulWikiFindPageRequest, testSuccessfulWikiFindPageSameTitleDifferentPathRequest, testSuccessfulWikiFindPageRequestWithTrailers, diff --git a/internal/praefect/protoregistry/protoregistry_test.go b/internal/praefect/protoregistry/protoregistry_test.go index 60078bd13..f0789bbc0 100644 --- a/internal/praefect/protoregistry/protoregistry_test.go +++ b/internal/praefect/protoregistry/protoregistry_test.go @@ -163,7 +163,6 @@ func TestNewProtoRegistry(t *testing.T) { "WikiUpdatePage": protoregistry.OpMutator, "WikiDeletePage": protoregistry.OpMutator, "WikiFindPage": protoregistry.OpAccessor, - "WikiFindFile": protoregistry.OpAccessor, "WikiGetAllPages": protoregistry.OpAccessor, "WikiListPages": protoregistry.OpAccessor, }, diff --git a/proto/go/gitalypb/wiki.pb.go b/proto/go/gitalypb/wiki.pb.go index da2d12c75..036f46fcc 100644 --- a/proto/go/gitalypb/wiki.pb.go +++ b/proto/go/gitalypb/wiki.pb.go @@ -46,7 +46,7 @@ func (x WikiGetAllPagesRequest_SortBy) String() string { } func (WikiGetAllPagesRequest_SortBy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{15, 0} + return fileDescriptor_5c56f90469cec0af, []int{13, 0} } type WikiListPagesRequest_SortBy int32 @@ -71,7 +71,7 @@ func (x WikiListPagesRequest_SortBy) String() string { } func (WikiListPagesRequest_SortBy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{17, 0} + return fileDescriptor_5c56f90469cec0af, []int{15, 0} } type WikiCommitDetails struct { @@ -814,126 +814,6 @@ func (m *WikiFindPageResponse) GetPage() *WikiPage { return nil } -type WikiFindFileRequest struct { - Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` - Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // Optional: revision - Revision []byte `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WikiFindFileRequest) Reset() { *m = WikiFindFileRequest{} } -func (m *WikiFindFileRequest) String() string { return proto.CompactTextString(m) } -func (*WikiFindFileRequest) ProtoMessage() {} -func (*WikiFindFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{13} -} - -func (m *WikiFindFileRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WikiFindFileRequest.Unmarshal(m, b) -} -func (m *WikiFindFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WikiFindFileRequest.Marshal(b, m, deterministic) -} -func (m *WikiFindFileRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WikiFindFileRequest.Merge(m, src) -} -func (m *WikiFindFileRequest) XXX_Size() int { - return xxx_messageInfo_WikiFindFileRequest.Size(m) -} -func (m *WikiFindFileRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WikiFindFileRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WikiFindFileRequest proto.InternalMessageInfo - -func (m *WikiFindFileRequest) GetRepository() *Repository { - if m != nil { - return m.Repository - } - return nil -} - -func (m *WikiFindFileRequest) GetName() []byte { - if m != nil { - return m.Name - } - return nil -} - -func (m *WikiFindFileRequest) GetRevision() []byte { - if m != nil { - return m.Revision - } - return nil -} - -type WikiFindFileResponse struct { - // If 'name' is empty, the file was not found. - Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` - RawData []byte `protobuf:"bytes,3,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"` - Path []byte `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WikiFindFileResponse) Reset() { *m = WikiFindFileResponse{} } -func (m *WikiFindFileResponse) String() string { return proto.CompactTextString(m) } -func (*WikiFindFileResponse) ProtoMessage() {} -func (*WikiFindFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{14} -} - -func (m *WikiFindFileResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WikiFindFileResponse.Unmarshal(m, b) -} -func (m *WikiFindFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WikiFindFileResponse.Marshal(b, m, deterministic) -} -func (m *WikiFindFileResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WikiFindFileResponse.Merge(m, src) -} -func (m *WikiFindFileResponse) XXX_Size() int { - return xxx_messageInfo_WikiFindFileResponse.Size(m) -} -func (m *WikiFindFileResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WikiFindFileResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WikiFindFileResponse proto.InternalMessageInfo - -func (m *WikiFindFileResponse) GetName() []byte { - if m != nil { - return m.Name - } - return nil -} - -func (m *WikiFindFileResponse) GetMimeType() string { - if m != nil { - return m.MimeType - } - return "" -} - -func (m *WikiFindFileResponse) GetRawData() []byte { - if m != nil { - return m.RawData - } - return nil -} - -func (m *WikiFindFileResponse) GetPath() []byte { - if m != nil { - return m.Path - } - return nil -} - type WikiGetAllPagesRequest struct { Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` // Passing 0 means no limit is applied @@ -949,7 +829,7 @@ func (m *WikiGetAllPagesRequest) Reset() { *m = WikiGetAllPagesRequest{} func (m *WikiGetAllPagesRequest) String() string { return proto.CompactTextString(m) } func (*WikiGetAllPagesRequest) ProtoMessage() {} func (*WikiGetAllPagesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{15} + return fileDescriptor_5c56f90469cec0af, []int{13} } func (m *WikiGetAllPagesRequest) XXX_Unmarshal(b []byte) error { @@ -1012,7 +892,7 @@ func (m *WikiGetAllPagesResponse) Reset() { *m = WikiGetAllPagesResponse func (m *WikiGetAllPagesResponse) String() string { return proto.CompactTextString(m) } func (*WikiGetAllPagesResponse) ProtoMessage() {} func (*WikiGetAllPagesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{16} + return fileDescriptor_5c56f90469cec0af, []int{14} } func (m *WikiGetAllPagesResponse) XXX_Unmarshal(b []byte) error { @@ -1063,7 +943,7 @@ func (m *WikiListPagesRequest) Reset() { *m = WikiListPagesRequest{} } func (m *WikiListPagesRequest) String() string { return proto.CompactTextString(m) } func (*WikiListPagesRequest) ProtoMessage() {} func (*WikiListPagesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{17} + return fileDescriptor_5c56f90469cec0af, []int{15} } func (m *WikiListPagesRequest) XXX_Unmarshal(b []byte) error { @@ -1131,7 +1011,7 @@ func (m *WikiListPagesResponse) Reset() { *m = WikiListPagesResponse{} } func (m *WikiListPagesResponse) String() string { return proto.CompactTextString(m) } func (*WikiListPagesResponse) ProtoMessage() {} func (*WikiListPagesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{18} + return fileDescriptor_5c56f90469cec0af, []int{16} } func (m *WikiListPagesResponse) XXX_Unmarshal(b []byte) error { @@ -1175,8 +1055,6 @@ func init() { proto.RegisterType((*WikiDeletePageResponse)(nil), "gitaly.WikiDeletePageResponse") proto.RegisterType((*WikiFindPageRequest)(nil), "gitaly.WikiFindPageRequest") proto.RegisterType((*WikiFindPageResponse)(nil), "gitaly.WikiFindPageResponse") - proto.RegisterType((*WikiFindFileRequest)(nil), "gitaly.WikiFindFileRequest") - proto.RegisterType((*WikiFindFileResponse)(nil), "gitaly.WikiFindFileResponse") proto.RegisterType((*WikiGetAllPagesRequest)(nil), "gitaly.WikiGetAllPagesRequest") proto.RegisterType((*WikiGetAllPagesResponse)(nil), "gitaly.WikiGetAllPagesResponse") proto.RegisterType((*WikiListPagesRequest)(nil), "gitaly.WikiListPagesRequest") @@ -1186,75 +1064,71 @@ func init() { func init() { proto.RegisterFile("wiki.proto", fileDescriptor_5c56f90469cec0af) } var fileDescriptor_5c56f90469cec0af = []byte{ - // 1085 bytes of a gzipped FileDescriptorProto + // 1014 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0x67, 0x1d, 0xff, 0x59, 0xbf, 0x34, 0x6e, 0x3a, 0x94, 0x66, 0xeb, 0x84, 0x10, 0x6d, 0xa8, - 0x08, 0x12, 0x38, 0x25, 0x3d, 0x00, 0x12, 0x48, 0x4d, 0x9a, 0x34, 0xaa, 0x54, 0x41, 0xb5, 0x31, - 0x8d, 0x40, 0x48, 0xab, 0xc9, 0xee, 0xc4, 0x1e, 0x75, 0xff, 0x31, 0x3b, 0x4e, 0xe4, 0x13, 0x07, - 0xce, 0x9c, 0xe1, 0x86, 0xc4, 0x27, 0xe0, 0x53, 0xf0, 0x19, 0xb8, 0x73, 0xe2, 0xc4, 0x15, 0x71, - 0x42, 0x33, 0xb3, 0xf6, 0xce, 0xee, 0xda, 0x86, 0x40, 0x40, 0xdc, 0xf6, 0xbd, 0x37, 0xf3, 0xe6, - 0xfd, 0x7e, 0xef, 0x9f, 0x0d, 0x70, 0x49, 0x5f, 0xd0, 0x5e, 0xc2, 0x62, 0x1e, 0xa3, 0xe6, 0x80, - 0x72, 0x1c, 0x8c, 0xbb, 0x10, 0xd0, 0x88, 0x2b, 0x5d, 0xf7, 0x46, 0x3a, 0xc4, 0x8c, 0xf8, 0x4a, - 0xb2, 0xbf, 0x36, 0xe0, 0xd6, 0x29, 0x7d, 0x41, 0x1f, 0xc5, 0x61, 0x48, 0xf9, 0x21, 0xe1, 0x98, - 0x06, 0x29, 0x42, 0x50, 0x8f, 0x70, 0x48, 0x2c, 0x63, 0xcb, 0xd8, 0xb9, 0xe1, 0xc8, 0x6f, 0x74, - 0x1b, 0x1a, 0x24, 0xc4, 0x34, 0xb0, 0x6a, 0x52, 0xa9, 0x04, 0x64, 0x41, 0x2b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 0x62, 0x8e, 0xed, 0xef, 0x0d, 0xe8, 0x0a, 0x20, 0xc7, 0x84, 0x6b, 0x58, 0x52, - 0x87, 0x7c, 0x31, 0x22, 0x29, 0x47, 0xef, 0x01, 0x30, 0x92, 0xc4, 0x29, 0xe5, 0x31, 0x1b, 0x67, - 0x04, 0xa0, 0x09, 0x01, 0xce, 0xd4, 0x72, 0x50, 0xff, 0xf6, 0xc7, 0xb7, 0x0c, 0x47, 0x3b, 0x2b, - 0xf2, 0x96, 0xe0, 0x01, 0x51, 0xb8, 0x54, 0x11, 0x98, 0x42, 0x91, 0x03, 0xcb, 0x8a, 0xa0, 0xe1, - 0xc8, 0x6f, 0x11, 0x64, 0x42, 0x98, 0x2b, 0xf5, 0xaa, 0x04, 0x5a, 0x09, 0x61, 0x22, 0x28, 0xdb, - 0x81, 0xf5, 0x99, 0x31, 0xa6, 0x49, 0x1c, 0xa5, 0x04, 0x3d, 0x00, 0x33, 0xa3, 0x3e, 0xb5, 0x8c, - 0xad, 0xa5, 0x45, 0x39, 0x9a, 0x1e, 0xb4, 0x7f, 0x32, 0xe0, 0xb6, 0xb0, 0x9e, 0x32, 0xca, 0x89, - 0x38, 0xf2, 0xcf, 0x21, 0x4f, 0x52, 0x53, 0xd3, 0x52, 0x93, 0xd7, 0xc2, 0x52, 0xa1, 0x16, 0x1e, - 0x42, 0x47, 0x55, 0xa1, 0xeb, 0xab, 0x2e, 0x92, 0x98, 0x97, 0xf7, 0xee, 0xea, 0x91, 0x17, 0xda, - 0xcc, 0x59, 0xf1, 0x0a, 0x5d, 0x67, 0x41, 0xcb, 0x8b, 0x23, 0x4e, 0x22, 0x9e, 0xd5, 0xc7, 0x44, - 0xb4, 0x1f, 0xc2, 0x2b, 0x25, 0x64, 0x19, 0x51, 0x6f, 0xc0, 0x4d, 0x7f, 0x94, 0x04, 0xd4, 0xc3, - 0x9c, 0xb8, 0x84, 0xb1, 0x98, 0x65, 0x3d, 0xdb, 0x99, 0xaa, 0x8f, 0x84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, 0x1d, 0xff, 0x59, 0xbf, 0xc4, 0x6e, 0x3a, 0x94, 0x66, 0xeb, 0x84, 0x10, 0x6d, 0xa8, + 0x30, 0x12, 0x38, 0x25, 0x3d, 0x00, 0x12, 0x48, 0x4d, 0xea, 0x10, 0x55, 0xaa, 0xa0, 0xda, 0x98, + 0x46, 0x20, 0xa4, 0xd5, 0x64, 0x77, 0x6c, 0x8f, 0xba, 0xde, 0x59, 0x66, 0xc6, 0x89, 0x72, 0xe6, + 0x0c, 0x57, 0xb8, 0x21, 0xf1, 0x09, 0xf8, 0x14, 0x7c, 0x06, 0xbe, 0x02, 0x27, 0xae, 0x88, 0x13, + 0x9a, 0x99, 0xb5, 0xbd, 0xbb, 0xb6, 0x03, 0x81, 0x08, 0xf5, 0xb6, 0xef, 0xcf, 0xbc, 0x79, 0xbf, + 0xdf, 0xfb, 0x33, 0x36, 0xc0, 0x05, 0x7d, 0x41, 0x3b, 0x09, 0x67, 0x92, 0xa1, 0xea, 0x80, 0x4a, + 0x1c, 0x5d, 0xb6, 0x20, 0xa2, 0xb1, 0x34, 0xba, 0xd6, 0x9a, 0x18, 0x62, 0x4e, 0x42, 0x23, 0xb9, + 0xdf, 0x5a, 0x70, 0xfb, 0x94, 0xbe, 0xa0, 0x8f, 0xd9, 0x68, 0x44, 0x65, 0x97, 0x48, 0x4c, 0x23, + 0x81, 0x10, 0x94, 0x63, 0x3c, 0x22, 0x8e, 0xb5, 0x63, 0xb5, 0xd7, 0x3c, 0xfd, 0x8d, 0xee, 0x40, + 0x85, 0x8c, 0x30, 0x8d, 0x9c, 0x92, 0x56, 0x1a, 0x01, 0x39, 0x50, 0x1b, 0x11, 0x21, 0xf0, 0x80, + 0x38, 0x2b, 0x5a, 0x3f, 0x11, 0xd1, 0x06, 0xd4, 0xc6, 0x82, 0x70, 0x9f, 0x86, 0x4e, 0x79, 0xc7, + 0x6a, 0x57, 0xbc, 0xaa, 0x12, 0x9f, 0x84, 0x68, 0x13, 0xea, 0xda, 0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, 0x22, 0x4f, 0xd9, 0x53, 0x2b, 0x2d, 0xc3, + 0x99, 0x11, 0xdc, 0x9f, 0x53, 0xaa, 0xba, 0x24, 0x22, 0xff, 0x0b, 0x55, 0xf3, 0xe0, 0x57, 0xae, + 0x07, 0xde, 0x75, 0x0c, 0xc4, 0x6c, 0xc6, 0x06, 0xa2, 0xfb, 0xa3, 0x05, 0xaf, 0x2a, 0xd3, 0x27, + 0x34, 0x0e, 0x6f, 0x06, 0xca, 0xb4, 0xb0, 0xa5, 0x6c, 0x61, 0x5b, 0x60, 0x73, 0x72, 0x4e, 0xf5, + 0x56, 0x35, 0x15, 0x9f, 0xca, 0x68, 0x0b, 0xea, 0x21, 0xe5, 0x24, 0xd0, 0x57, 0x95, 0xb5, 0x71, + 0xa6, 0x70, 0x3f, 0x32, 0x53, 0x3b, 0x4b, 0x30, 0x2d, 0xce, 0x9b, 0xe9, 0x46, 0x31, 0xb9, 0xad, + 0x17, 0xe7, 0xdf, 0xec, 0x18, 0xf7, 0x77, 0xcb, 0x40, 0x3f, 0x26, 0xf2, 0x20, 0x8a, 0x94, 0x41, + 0xdc, 0x08, 0xc4, 0x88, 0xaa, 0x07, 0x47, 0x41, 0x6c, 0x78, 0x46, 0x40, 0xf7, 0xa1, 0x69, 0xb2, + 0xa6, 0x2c, 0xf6, 0x43, 0x22, 0x02, 0x0d, 0xd4, 0xf6, 0x1a, 0x53, 0x6d, 0x97, 0x88, 0x00, 0x7d, + 0x08, 0x65, 0xc1, 0xb8, 0x69, 0xf0, 0xe6, 0xfe, 0xfd, 0x6c, 0xde, 0xf3, 0x49, 0x76, 0x4e, 0x18, + 0x97, 0x87, 0x97, 0x9e, 0x3e, 0xe2, 0xee, 0x42, 0xd5, 0xc8, 0xa8, 0x0e, 0x95, 0xde, 0x93, 0xde, + 0xd3, 0xa3, 0xf5, 0x57, 0x50, 0x13, 0xe0, 0xb1, 0x77, 0x74, 0xd0, 0x3b, 0xea, 0xfa, 0x07, 0xbd, + 0x75,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 0x36, 0xce, 0x11, 0xfc, 0x95, 0xf9, 0x89, 0x9a, 0x19, 0x40, 0xb4, 0x7d, + 0xf5, 0x94, 0xb7, 0xde, 0x58, 0x6a, 0x5f, 0x56, 0xbe, 0x69, 0xdf, 0xe5, 0xcb, 0x57, 0x6c, 0xf8, + 0x7c, 0xf9, 0xe6, 0x9a, 0x75, 0x16, 0xf7, 0xf0, 0xc1, 0x97, 0xca, 0x33, 0xc2, 0x67, 0x9d, 0x80, + 0x8d, 0xf6, 0xcc, 0xe7, 0xbb, 0x8c, 0x0f, 0xf6, 0xcc, 0xf9, 0x3d, 0xfd, 0x77, 0x60, 0x6f, 0xc0, + 0x52, 0x39, 0x39, 0x3b, 0xab, 0x6a, 0xd5, 0xc3, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x29, 0xb1, + 0x3b, 0xcf, 0x51, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1275,7 +1149,6 @@ type WikiServiceClient interface { WikiDeletePage(ctx context.Context, in *WikiDeletePageRequest, opts ...grpc.CallOption) (*WikiDeletePageResponse, error) // WikiFindPage returns a stream because the page's raw_data field may be arbitrarily large. WikiFindPage(ctx context.Context, in *WikiFindPageRequest, opts ...grpc.CallOption) (WikiService_WikiFindPageClient, error) - WikiFindFile(ctx context.Context, in *WikiFindFileRequest, opts ...grpc.CallOption) (WikiService_WikiFindFileClient, error) WikiGetAllPages(ctx context.Context, in *WikiGetAllPagesRequest, opts ...grpc.CallOption) (WikiService_WikiGetAllPagesClient, error) WikiListPages(ctx context.Context, in *WikiListPagesRequest, opts ...grpc.CallOption) (WikiService_WikiListPagesClient, error) } @@ -1429,40 +1302,8 @@ func (x *wikiServiceWikiFindPageClient) Recv() (*WikiFindPageResponse, error) { return m, nil } -func (c *wikiServiceClient) WikiFindFile(ctx context.Context, in *WikiFindFileRequest, opts ...grpc.CallOption) (WikiService_WikiFindFileClient, error) { - stream, err := c.cc.NewStream(ctx, &_WikiService_serviceDesc.Streams[4], "/gitaly.WikiService/WikiFindFile", opts...) - if err != nil { - return nil, err - } - x := &wikiServiceWikiFindFileClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type WikiService_WikiFindFileClient interface { - Recv() (*WikiFindFileResponse, error) - grpc.ClientStream -} - -type wikiServiceWikiFindFileClient struct { - grpc.ClientStream -} - -func (x *wikiServiceWikiFindFileClient) Recv() (*WikiFindFileResponse, error) { - m := new(WikiFindFileResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - func (c *wikiServiceClient) WikiGetAllPages(ctx context.Context, in *WikiGetAllPagesRequest, opts ...grpc.CallOption) (WikiService_WikiGetAllPagesClient, error) { - stream, err := c.cc.NewStream(ctx, &_WikiService_serviceDesc.Streams[5], "/gitaly.WikiService/WikiGetAllPages", opts...) + stream, err := c.cc.NewStream(ctx, &_WikiService_serviceDesc.Streams[4], "/gitaly.WikiService/WikiGetAllPages", opts...) if err != nil { return nil, err } @@ -1494,7 +1335,7 @@ func (x *wikiServiceWikiGetAllPagesClient) Recv() (*WikiGetAllPagesResponse, err } func (c *wikiServiceClient) WikiListPages(ctx context.Context, in *WikiListPagesRequest, opts ...grpc.CallOption) (WikiService_WikiListPagesClient, error) { - stream, err := c.cc.NewStream(ctx, &_WikiService_serviceDesc.Streams[6], "/gitaly.WikiService/WikiListPages", opts...) + stream, err := c.cc.NewStream(ctx, &_WikiService_serviceDesc.Streams[5], "/gitaly.WikiService/WikiListPages", opts...) if err != nil { return nil, err } @@ -1533,7 +1374,6 @@ type WikiServiceServer interface { WikiDeletePage(context.Context, *WikiDeletePageRequest) (*WikiDeletePageResponse, error) // WikiFindPage returns a stream because the page's raw_data field may be arbitrarily large. WikiFindPage(*WikiFindPageRequest, WikiService_WikiFindPageServer) error - WikiFindFile(*WikiFindFileRequest, WikiService_WikiFindFileServer) error WikiGetAllPages(*WikiGetAllPagesRequest, WikiService_WikiGetAllPagesServer) error WikiListPages(*WikiListPagesRequest, WikiService_WikiListPagesServer) error } @@ -1557,9 +1397,6 @@ func (*UnimplementedWikiServiceServer) WikiDeletePage(ctx context.Context, req * func (*UnimplementedWikiServiceServer) WikiFindPage(req *WikiFindPageRequest, srv WikiService_WikiFindPageServer) error { return status.Errorf(codes.Unimplemented, "method WikiFindPage not implemented") } -func (*UnimplementedWikiServiceServer) WikiFindFile(req *WikiFindFileRequest, srv WikiService_WikiFindFileServer) error { - return status.Errorf(codes.Unimplemented, "method WikiFindFile not implemented") -} func (*UnimplementedWikiServiceServer) WikiGetAllPages(req *WikiGetAllPagesRequest, srv WikiService_WikiGetAllPagesServer) error { return status.Errorf(codes.Unimplemented, "method WikiGetAllPages not implemented") } @@ -1683,27 +1520,6 @@ func (x *wikiServiceWikiFindPageServer) Send(m *WikiFindPageResponse) error { return x.ServerStream.SendMsg(m) } -func _WikiService_WikiFindFile_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(WikiFindFileRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(WikiServiceServer).WikiFindFile(m, &wikiServiceWikiFindFileServer{stream}) -} - -type WikiService_WikiFindFileServer interface { - Send(*WikiFindFileResponse) error - grpc.ServerStream -} - -type wikiServiceWikiFindFileServer struct { - grpc.ServerStream -} - -func (x *wikiServiceWikiFindFileServer) Send(m *WikiFindFileResponse) error { - return x.ServerStream.SendMsg(m) -} - func _WikiService_WikiGetAllPages_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(WikiGetAllPagesRequest) if err := stream.RecvMsg(m); err != nil { @@ -1777,11 +1593,6 @@ var _WikiService_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, { - StreamName: "WikiFindFile", - Handler: _WikiService_WikiFindFile_Handler, - ServerStreams: true, - }, - { StreamName: "WikiGetAllPages", Handler: _WikiService_WikiGetAllPages_Handler, ServerStreams: true, diff --git a/proto/wiki.proto b/proto/wiki.proto index 011c228ec..453920fc6 100644 --- a/proto/wiki.proto +++ b/proto/wiki.proto @@ -34,11 +34,6 @@ service WikiService { op: ACCESSOR }; } - rpc WikiFindFile(WikiFindFileRequest) returns (stream WikiFindFileResponse) { - option (op_type) = { - op: ACCESSOR - }; - } rpc WikiGetAllPages(WikiGetAllPagesRequest) returns (stream WikiGetAllPagesResponse) { option (op_type) = { op: ACCESSOR @@ -144,21 +139,6 @@ message WikiFindPageResponse { WikiPage page = 1; } -message WikiFindFileRequest { - Repository repository = 1 [(target_repository)=true]; - bytes name = 2; - // Optional: revision - bytes revision = 3; -} - -message WikiFindFileResponse { - // If 'name' is empty, the file was not found. - bytes name = 1; - string mime_type = 2; - bytes raw_data = 3; - bytes path = 4; -} - message WikiGetAllPagesRequest { Repository repository = 1 [(target_repository)=true]; // Passing 0 means no limit is applied diff --git a/ruby/lib/gitaly_server/wiki_service.rb b/ruby/lib/gitaly_server/wiki_service.rb index 57c934988..ebc2012cc 100644 --- a/ruby/lib/gitaly_server/wiki_service.rb +++ b/ruby/lib/gitaly_server/wiki_service.rb @@ -97,34 +97,6 @@ module GitalyServer end end - def wiki_find_file(request, call) - repo = Gitlab::Git::Repository.from_gitaly(request.repository, call) - wiki = Gitlab::Git::Wiki.new(repo) - - file = wiki.file(set_utf8!(request.name), request.revision.presence) - - unless file - return Enumerator.new do |y| - y.yield Gitaly::WikiFindFileResponse.new - end - end - - response = Gitaly::WikiFindFileResponse.new( - name: file.name.b, - mime_type: file.mime_type, - path: file.path.b - ) - - Enumerator.new do |y| - y.yield response - - io = StringIO.new(file.raw_data) - while chunk = io.read(Gitlab.config.git.write_buffer_size) - y.yield Gitaly::WikiFindFileResponse.new(raw_data: chunk) - end - end - end - def wiki_get_page_versions(request, call) repo = Gitlab::Git::Repository.from_gitaly(request.repository, call) wiki = Gollum::Wiki.new(repo.path) diff --git a/ruby/lib/gitlab/git/wiki.rb b/ruby/lib/gitlab/git/wiki.rb index 07f3ba52d..445feb0a2 100644 --- a/ruby/lib/gitlab/git/wiki.rb +++ b/ruby/lib/gitlab/git/wiki.rb @@ -47,10 +47,6 @@ module Gitlab gollum_find_page(title: title, version: version, dir: dir) end - def file(name, version) - gollum_find_file(name, version) - end - def count_page_versions(page_path) @repository.count_commits(ref: 'HEAD', path: page_path) end @@ -175,14 +171,6 @@ module Gitlab new_page(gollum_page) end - def gollum_find_file(name, version) - version ||= self.class.default_ref - gollum_file = gollum_wiki.file(name, version) - return unless gollum_file - - Gitlab::Git::WikiFile.new(gollum_file) - end - def gollum_get_all_pages(limit: nil, sort: nil, direction_desc: false) gollum_wiki.pages( limit: limit, sort: sort, direction_desc: direction_desc diff --git a/ruby/lib/gitlab/git/wiki_file.rb b/ruby/lib/gitlab/git/wiki_file.rb deleted file mode 100644 index 84335aca4..000000000 --- a/ruby/lib/gitlab/git/wiki_file.rb +++ /dev/null @@ -1,20 +0,0 @@ -module Gitlab - module Git - class WikiFile - attr_reader :mime_type, :raw_data, :name, :path - - # This class is meant to be serializable so that it can be constructed - # by Gitaly and sent over the network to GitLab. - # - # Because Gollum::File is not serializable we must get all the data from - # 'gollum_file' during initialization, and NOT store it in an instance - # variable. - def initialize(gollum_file) - @mime_type = gollum_file.mime_type - @raw_data = gollum_file.raw_data - @name = gollum_file.name - @path = gollum_file.path - end - end - end -end diff --git a/ruby/proto/gitaly/wiki_pb.rb b/ruby/proto/gitaly/wiki_pb.rb index 145edb038..fd0154fc4 100644 --- a/ruby/proto/gitaly/wiki_pb.rb +++ b/ruby/proto/gitaly/wiki_pb.rb @@ -74,17 +74,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do add_message "gitaly.WikiFindPageResponse" do optional :page, :message, 1, "gitaly.WikiPage" end - add_message "gitaly.WikiFindFileRequest" do - optional :repository, :message, 1, "gitaly.Repository" - optional :name, :bytes, 2 - optional :revision, :bytes, 3 - end - add_message "gitaly.WikiFindFileResponse" do - optional :name, :bytes, 1 - optional :mime_type, :string, 2 - optional :raw_data, :bytes, 3 - optional :path, :bytes, 4 - end add_message "gitaly.WikiGetAllPagesRequest" do optional :repository, :message, 1, "gitaly.Repository" optional :limit, :uint32, 2 @@ -130,8 +119,6 @@ module Gitaly WikiDeletePageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiDeletePageResponse").msgclass WikiFindPageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiFindPageRequest").msgclass WikiFindPageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiFindPageResponse").msgclass - WikiFindFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiFindFileRequest").msgclass - WikiFindFileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiFindFileResponse").msgclass WikiGetAllPagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiGetAllPagesRequest").msgclass WikiGetAllPagesRequest::SortBy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiGetAllPagesRequest.SortBy").enummodule WikiGetAllPagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiGetAllPagesResponse").msgclass diff --git a/ruby/proto/gitaly/wiki_services_pb.rb b/ruby/proto/gitaly/wiki_services_pb.rb index 3ff43eb69..d90970ad9 100644 --- a/ruby/proto/gitaly/wiki_services_pb.rb +++ b/ruby/proto/gitaly/wiki_services_pb.rb @@ -20,7 +20,6 @@ module Gitaly rpc :WikiDeletePage, Gitaly::WikiDeletePageRequest, Gitaly::WikiDeletePageResponse # WikiFindPage returns a stream because the page's raw_data field may be arbitrarily large. rpc :WikiFindPage, Gitaly::WikiFindPageRequest, stream(Gitaly::WikiFindPageResponse) - rpc :WikiFindFile, Gitaly::WikiFindFileRequest, stream(Gitaly::WikiFindFileResponse) rpc :WikiGetAllPages, Gitaly::WikiGetAllPagesRequest, stream(Gitaly::WikiGetAllPagesResponse) rpc :WikiListPages, Gitaly::WikiListPagesRequest, stream(Gitaly::WikiListPagesResponse) end |