diff options
author | John Cai <jcai@gitlab.com> | 2019-11-07 01:24:01 +0300 |
---|---|---|
committer | John Cai <jcai@gitlab.com> | 2019-11-07 01:24:01 +0300 |
commit | 8f7de19a0bb9515baa2b695a5aa1f7bce060854c (patch) | |
tree | 1d2827d3f176de2ac750343bdf4210cc894dd914 | |
parent | c339f6274584361df5cdb572cfcc8de1f06fd80e (diff) | |
parent | f2970437e28400807607311d8ab1176e60d670a7 (diff) |
Merge branch 'zj-remove-get-formatted-data' into 'master'
Remove unused GetFormattedData RPC
Closes #2137
See merge request gitlab-org/gitaly!1600
-rw-r--r-- | internal/praefect/protoregistry/protoregistry_test.go | 17 | ||||
-rw-r--r-- | internal/service/wiki/formatted_data.go | 46 | ||||
-rw-r--r-- | internal/service/wiki/formatted_data_test.go | 183 | ||||
-rw-r--r-- | proto/go/gitalypb/wiki.pb.go | 312 | ||||
-rw-r--r-- | proto/wiki.proto | 17 | ||||
-rw-r--r-- | ruby/lib/gitaly_server/wiki_service.rb | 20 | ||||
-rw-r--r-- | ruby/proto/gitaly/wiki_pb.rb | 11 | ||||
-rw-r--r-- | ruby/proto/gitaly/wiki_services_pb.rb | 1 |
8 files changed, 79 insertions, 528 deletions
diff --git a/internal/praefect/protoregistry/protoregistry_test.go b/internal/praefect/protoregistry/protoregistry_test.go index 21f8830a8..6ef10bc43 100644 --- a/internal/praefect/protoregistry/protoregistry_test.go +++ b/internal/praefect/protoregistry/protoregistry_test.go @@ -169,15 +169,14 @@ func TestPopulatesProtoRegistry(t *testing.T) { "SSHUploadArchive": protoregistry.OpMutator, }, "WikiService": map[string]protoregistry.OpType{ - "WikiGetPageVersions": protoregistry.OpAccessor, - "WikiWritePage": protoregistry.OpMutator, - "WikiUpdatePage": protoregistry.OpMutator, - "WikiDeletePage": protoregistry.OpMutator, - "WikiFindPage": protoregistry.OpAccessor, - "WikiFindFile": protoregistry.OpAccessor, - "WikiGetAllPages": protoregistry.OpAccessor, - "WikiListPages": protoregistry.OpAccessor, - "WikiGetFormattedData": protoregistry.OpAccessor, + "WikiGetPageVersions": protoregistry.OpAccessor, + "WikiWritePage": protoregistry.OpMutator, + "WikiUpdatePage": protoregistry.OpMutator, + "WikiDeletePage": protoregistry.OpMutator, + "WikiFindPage": protoregistry.OpAccessor, + "WikiFindFile": protoregistry.OpAccessor, + "WikiGetAllPages": protoregistry.OpAccessor, + "WikiListPages": protoregistry.OpAccessor, }, } diff --git a/internal/service/wiki/formatted_data.go b/internal/service/wiki/formatted_data.go deleted file mode 100644 index f79f3663e..000000000 --- a/internal/service/wiki/formatted_data.go +++ /dev/null @@ -1,46 +0,0 @@ -package wiki - -import ( - "gitlab.com/gitlab-org/gitaly/internal/git" - "gitlab.com/gitlab-org/gitaly/internal/rubyserver" - "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -func (s *server) WikiGetFormattedData(request *gitalypb.WikiGetFormattedDataRequest, stream gitalypb.WikiService_WikiGetFormattedDataServer) error { - if err := git.ValidateRevisionAllowEmpty(request.Revision); err != nil { - return status.Errorf(codes.InvalidArgument, "WikiGetFormattedData: %s", err) - } - - ctx := stream.Context() - - if len(request.GetTitle()) == 0 { - return status.Errorf(codes.InvalidArgument, "WikiGetFormattedData: Empty Title") - } - - client, err := s.ruby.WikiServiceClient(ctx) - if err != nil { - return err - } - - clientCtx, err := rubyserver.SetHeaders(ctx, request.GetRepository()) - if err != nil { - return err - } - - rubyStream, err := client.WikiGetFormattedData(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/service/wiki/formatted_data_test.go b/internal/service/wiki/formatted_data_test.go deleted file mode 100644 index d14513fa1..000000000 --- a/internal/service/wiki/formatted_data_test.go +++ /dev/null @@ -1,183 +0,0 @@ -package wiki - -import ( - "bytes" - "io" - "testing" - - "github.com/stretchr/testify/require" - "gitlab.com/gitlab-org/gitaly/internal/testhelper" - "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" - "google.golang.org/grpc/codes" -) - -func TestSuccessfulWikiGetFormattedDataRequest(t *testing.T) { - wikiRepo, _, cleanupFunc := setupWikiRepo(t) - defer cleanupFunc() - - server, serverSocketPath := runWikiServiceServer(t) - defer server.Stop() - - client, conn := newWikiClient(t, serverSocketPath) - defer conn.Close() - - format := "rdoc" - content := bytes.Repeat([]byte("*bold*\n\n"), 10000) - expectedContent := bytes.Repeat([]byte("\n<p><strong>bold</strong></p>\n"), 10000) - page1Name := "Home Pagé" - page2Name := "Instálling/Step 133-b" - page3Name := "Installing/Step 133-c" - page4Name := "Empty file" - page1Commit := createTestWikiPage(t, client, wikiRepo, createWikiPageOpts{title: page1Name, format: format, content: content}) - createTestWikiPage(t, client, wikiRepo, createWikiPageOpts{title: page2Name, format: format, content: content}) - createTestWikiPage(t, client, wikiRepo, createWikiPageOpts{title: page3Name, format: format, content: content}) - createTestWikiPage(t, client, wikiRepo, createWikiPageOpts{title: page4Name, format: format, forceContentEmpty: true}) - - testCases := []struct { - desc string - request *gitalypb.WikiGetFormattedDataRequest - expectedContent []byte - }{ - { - desc: "title only", - request: &gitalypb.WikiGetFormattedDataRequest{ - Repository: wikiRepo, - Title: []byte(page1Name), - }, - expectedContent: expectedContent, - }, - { - desc: "title + revision that includes the page", - request: &gitalypb.WikiGetFormattedDataRequest{ - Repository: wikiRepo, - Title: []byte(page1Name), - Revision: []byte(page1Commit.Id), - }, - expectedContent: expectedContent, - }, - { - desc: "title + directory that includes the page", - request: &gitalypb.WikiGetFormattedDataRequest{ - Repository: wikiRepo, - Title: []byte("Step 133-b"), - Directory: []byte("Instálling"), - }, - expectedContent: expectedContent, - }, - { - desc: "title for file with empty content", - request: &gitalypb.WikiGetFormattedDataRequest{ - Repository: wikiRepo, - Title: []byte("Empty file"), - }, - expectedContent: nil, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.desc, func(t *testing.T) { - ctx, cancel := testhelper.Context() - defer cancel() - - c, err := client.WikiGetFormattedData(ctx, testCase.request) - require.NoError(t, err) - - receivedData := readFullDataFromWikiGetFormattedDataClient(t, c) - require.Equal(t, testCase.expectedContent, receivedData) - }) - } -} - -func TestFailedWikiGetFormattedDataDueToValidation(t *testing.T) { - wikiRepo, _, cleanupFunc := setupWikiRepo(t) - defer cleanupFunc() - - server, serverSocketPath := runWikiServiceServer(t) - defer server.Stop() - - client, conn := newWikiClient(t, serverSocketPath) - defer conn.Close() - - testCases := []struct { - desc string - title string - code codes.Code - }{ - { - desc: "empty page path", - title: "", - code: codes.InvalidArgument, - }, - { - desc: "non-existent page", - title: "i-do-not-exist", - code: codes.NotFound, - }, - } - - for _, testCase := range testCases { - t.Run(testCase.desc, func(t *testing.T) { - ctx, cancel := testhelper.Context() - defer cancel() - - request := &gitalypb.WikiGetFormattedDataRequest{ - Repository: wikiRepo, - Title: []byte(testCase.title), - } - - c, err := client.WikiGetFormattedData(ctx, request) - require.NoError(t, err) - - err = drainWikiGetFormattedDataResponse(c) - testhelper.RequireGrpcError(t, err, testCase.code) - }) - } -} - -func drainWikiGetFormattedDataResponse(c gitalypb.WikiService_WikiGetFormattedDataClient) error { - for { - _, err := c.Recv() - if err != nil { - return err - } - } -} - -func readFullDataFromWikiGetFormattedDataClient(t *testing.T, c gitalypb.WikiService_WikiGetFormattedDataClient) (data []byte) { - for { - resp, err := c.Recv() - if err == io.EOF { - break - } else if err != nil { - t.Fatal(err) - } - - data = append(data, resp.GetData()...) - } - - return -} - -func TestInvalidWikiGetFormattedDataRequestRevision(t *testing.T) { - wikiRepo, _, cleanupFunc := setupWikiRepo(t) - defer cleanupFunc() - - server, serverSocketPath := runWikiServiceServer(t) - defer server.Stop() - - client, conn := newWikiClient(t, serverSocketPath) - defer conn.Close() - - ctx, cancel := testhelper.Context() - defer cancel() - - stream, err := client.WikiGetFormattedData(ctx, &gitalypb.WikiGetFormattedDataRequest{ - Repository: wikiRepo, - Title: []byte("Home Pagé"), - Revision: []byte("--output=/meow"), - }) - require.NoError(t, err) - - _, err = stream.Recv() - testhelper.RequireGrpcError(t, err, codes.InvalidArgument) -} diff --git a/proto/go/gitalypb/wiki.pb.go b/proto/go/gitalypb/wiki.pb.go index 920317a39..a126785ba 100644 --- a/proto/go/gitalypb/wiki.pb.go +++ b/proto/go/gitalypb/wiki.pb.go @@ -71,7 +71,7 @@ func (x WikiListPagesRequest_SortBy) String() string { } func (WikiListPagesRequest_SortBy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{19, 0} + return fileDescriptor_5c56f90469cec0af, []int{17, 0} } type WikiCommitDetails struct { @@ -1047,108 +1047,6 @@ func (m *WikiGetAllPagesResponse) GetEndOfPage() bool { return false } -type WikiGetFormattedDataRequest struct { - Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` - Title []byte `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Revision []byte `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` - Directory []byte `protobuf:"bytes,4,opt,name=directory,proto3" json:"directory,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WikiGetFormattedDataRequest) Reset() { *m = WikiGetFormattedDataRequest{} } -func (m *WikiGetFormattedDataRequest) String() string { return proto.CompactTextString(m) } -func (*WikiGetFormattedDataRequest) ProtoMessage() {} -func (*WikiGetFormattedDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{17} -} - -func (m *WikiGetFormattedDataRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WikiGetFormattedDataRequest.Unmarshal(m, b) -} -func (m *WikiGetFormattedDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WikiGetFormattedDataRequest.Marshal(b, m, deterministic) -} -func (m *WikiGetFormattedDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WikiGetFormattedDataRequest.Merge(m, src) -} -func (m *WikiGetFormattedDataRequest) XXX_Size() int { - return xxx_messageInfo_WikiGetFormattedDataRequest.Size(m) -} -func (m *WikiGetFormattedDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WikiGetFormattedDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WikiGetFormattedDataRequest proto.InternalMessageInfo - -func (m *WikiGetFormattedDataRequest) GetRepository() *Repository { - if m != nil { - return m.Repository - } - return nil -} - -func (m *WikiGetFormattedDataRequest) GetTitle() []byte { - if m != nil { - return m.Title - } - return nil -} - -func (m *WikiGetFormattedDataRequest) GetRevision() []byte { - if m != nil { - return m.Revision - } - return nil -} - -func (m *WikiGetFormattedDataRequest) GetDirectory() []byte { - if m != nil { - return m.Directory - } - return nil -} - -type WikiGetFormattedDataResponse struct { - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WikiGetFormattedDataResponse) Reset() { *m = WikiGetFormattedDataResponse{} } -func (m *WikiGetFormattedDataResponse) String() string { return proto.CompactTextString(m) } -func (*WikiGetFormattedDataResponse) ProtoMessage() {} -func (*WikiGetFormattedDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c56f90469cec0af, []int{18} -} - -func (m *WikiGetFormattedDataResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WikiGetFormattedDataResponse.Unmarshal(m, b) -} -func (m *WikiGetFormattedDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WikiGetFormattedDataResponse.Marshal(b, m, deterministic) -} -func (m *WikiGetFormattedDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WikiGetFormattedDataResponse.Merge(m, src) -} -func (m *WikiGetFormattedDataResponse) XXX_Size() int { - return xxx_messageInfo_WikiGetFormattedDataResponse.Size(m) -} -func (m *WikiGetFormattedDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WikiGetFormattedDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WikiGetFormattedDataResponse proto.InternalMessageInfo - -func (m *WikiGetFormattedDataResponse) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - type WikiListPagesRequest struct { Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` // Passing 0 means no limit is applied @@ -1165,7 +1063,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{19} + return fileDescriptor_5c56f90469cec0af, []int{17} } func (m *WikiListPagesRequest) XXX_Unmarshal(b []byte) error { @@ -1233,7 +1131,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{20} + return fileDescriptor_5c56f90469cec0af, []int{18} } func (m *WikiListPagesResponse) XXX_Unmarshal(b []byte) error { @@ -1281,8 +1179,6 @@ func init() { proto.RegisterType((*WikiFindFileResponse)(nil), "gitaly.WikiFindFileResponse") proto.RegisterType((*WikiGetAllPagesRequest)(nil), "gitaly.WikiGetAllPagesRequest") proto.RegisterType((*WikiGetAllPagesResponse)(nil), "gitaly.WikiGetAllPagesResponse") - proto.RegisterType((*WikiGetFormattedDataRequest)(nil), "gitaly.WikiGetFormattedDataRequest") - proto.RegisterType((*WikiGetFormattedDataResponse)(nil), "gitaly.WikiGetFormattedDataResponse") proto.RegisterType((*WikiListPagesRequest)(nil), "gitaly.WikiListPagesRequest") proto.RegisterType((*WikiListPagesResponse)(nil), "gitaly.WikiListPagesResponse") } @@ -1290,77 +1186,74 @@ func init() { func init() { proto.RegisterFile("wiki.proto", fileDescriptor_5c56f90469cec0af) } var fileDescriptor_5c56f90469cec0af = []byte{ - // 1119 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4b, 0x6f, 0x1c, 0x45, - 0x10, 0x66, 0xec, 0x7d, 0xcc, 0x96, 0xed, 0x8d, 0xd3, 0x04, 0x7b, 0x33, 0x36, 0xc6, 0x1a, 0x27, - 0xc2, 0x1c, 0x58, 0xc7, 0x9b, 0x03, 0x42, 0x02, 0x29, 0x4e, 0x6c, 0x47, 0x91, 0x22, 0x88, 0x26, - 0x4b, 0x22, 0x22, 0xa4, 0x51, 0x7b, 0xa6, 0xbd, 0x6e, 0x79, 0x5e, 0xf4, 0xf4, 0xda, 0xda, 0x1f, - 0xc1, 0x19, 0x21, 0x71, 0xe1, 0xca, 0xcf, 0xe1, 0x5f, 0x20, 0x6e, 0x1c, 0x91, 0x90, 0x50, 0x3f, - 0x76, 0x5e, 0x3b, 0x5e, 0x30, 0x06, 0xc1, 0xad, 0xab, 0xba, 0xbb, 0xba, 0xea, 0xab, 0xc7, 0x37, - 0x03, 0x70, 0x49, 0xcf, 0x69, 0x3f, 0x61, 0x31, 0x8f, 0x51, 0x6b, 0x44, 0x39, 0x0e, 0x26, 0xd6, - 0x72, 0x7a, 0x86, 0x19, 0xf1, 0x95, 0xd6, 0xfe, 0xc6, 0x80, 0xdb, 0xaf, 0xe9, 0x39, 0x7d, 0x12, - 0x87, 0x21, 0xe5, 0x87, 0x84, 0x63, 0x1a, 0xa4, 0x08, 0x41, 0x23, 0xc2, 0x21, 0xe9, 0x19, 0xdb, - 0xc6, 0xee, 0xb2, 0x23, 0xd7, 0xe8, 0x0e, 0x34, 0x49, 0x88, 0x69, 0xd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 0x7d, 0x24, 0xb4, 0xf6, 0xaf, 0x86, - 0x32, 0xf1, 0x45, 0xe2, 0xe3, 0x9b, 0xe3, 0x32, 0xb7, 0x08, 0xea, 0x1b, 0x21, 0x87, 0xad, 0xf1, - 0x27, 0xb0, 0x35, 0xff, 0x3e, 0x6c, 0xad, 0x32, 0x6c, 0x7d, 0x58, 0xab, 0xc6, 0xac, 0x71, 0x13, - 0x03, 0xac, 0x80, 0x96, 0x12, 0xec, 0x1f, 0x35, 0x48, 0x87, 0x24, 0x20, 0xff, 0x32, 0x48, 0xb3, - 0x61, 0x2f, 0x5e, 0x2f, 0x6c, 0xbb, 0xa7, 0x82, 0x2b, 0xfa, 0xaa, 0x82, 0xb3, 0xbf, 0x33, 0xe0, - 0x6d, 0xb1, 0x75, 0x4c, 0x23, 0xff, 0xa6, 0x41, 0x64, 0xc9, 0x5c, 0x28, 0x26, 0xd3, 0x02, 0x93, - 0x91, 0x0b, 0x2a, 0xe7, 0xa6, 0xca, 0x72, 0x26, 0xa3, 0x4d, 0xe8, 0xf8, 0x94, 0x11, 0x4f, 0x3e, - 0xd2, 0x90, 0x9b, 0xb9, 0xc2, 0xfe, 0x44, 0x75, 0x67, 0xee, 0x9a, 0x4e, 0xc8, 0x3d, 0x3d, 0x39, - 0x94, 0x57, 0xab, 0xd5, 0x3e, 0x57, 0xb3, 0xc4, 0x9e, 0xe4, 0x81, 0x1d, 0xd3, 0xe0, 0x1f, 0x6f, - 0xed, 0x39, 0x61, 0xd9, 0x17, 0xb9, 0xe3, 0xea, 0x69, 0xed, 0x78, 0x1d, 0x3d, 0x6e, 0x40, 0x27, - 0xa4, 0x21, 0x71, 0xf9, 0x24, 0x21, 0x9a, 0x25, 0x4c, 0xa1, 0x18, 0x4e, 0x12, 0x52, 0x1a, 0xd7, - 0x8b, 0xa5, 0x71, 0x9d, 0x31, 0x42, 0x23, 0x67, 0x04, 0x41, 0x57, 0x6b, 0x7a, 0x48, 0x1e, 0x04, - 0x81, 0xc0, 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0xaa, 0x79, 0xef, - 0xf1, 0x83, 0x37, 0xe2, 0x4e, 0x80, 0x4f, 0xfa, 0x5e, 0x1c, 0xee, 0xa9, 0xe5, 0x87, 0x31, 0x1b, - 0xed, 0x29, 0x4b, 0x7b, 0xf2, 0x67, 0x74, 0x6f, 0x14, 0x6b, 0x39, 0x39, 0x39, 0x69, 0x49, 0xd5, - 0xc3, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xe3, 0x08, 0xf8, 0xc3, 0x0e, 0x00, 0x00, + // 1069 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xdd, 0x6e, 0x1b, 0x45, + 0x14, 0x66, 0xe3, 0xbf, 0xf5, 0x49, 0xec, 0xa6, 0x43, 0x49, 0xb6, 0x9b, 0x10, 0xa2, 0x0d, 0x15, + 0xe6, 0x02, 0xa7, 0x71, 0x2f, 0x10, 0x12, 0x48, 0x4d, 0xeb, 0xb4, 0xaa, 0x54, 0x41, 0xb5, 0x35, + 0xad, 0xa8, 0x90, 0x56, 0x93, 0xdd, 0xb1, 0x33, 0xca, 0xae, 0x77, 0x99, 0x1d, 0x27, 0xf2, 0x43, + 0x70, 0x8d, 0x90, 0x78, 0x02, 0x1e, 0x87, 0xb7, 0xe0, 0x96, 0x4b, 0x10, 0x12, 0x9a, 0x1f, 0x7b, + 0x7f, 0xec, 0x18, 0x42, 0x40, 0xbd, 0xdb, 0x73, 0x66, 0xe6, 0x9b, 0xf3, 0x7d, 0x67, 0xce, 0x39, + 0x36, 0xc0, 0x25, 0x3d, 0xa7, 0xdd, 0x84, 0xc5, 0x3c, 0x46, 0xf5, 0x11, 0xe5, 0x38, 0x9c, 0xda, + 0x1b, 0xe9, 0x19, 0x66, 0x24, 0x50, 0x5e, 0xe7, 0x7b, 0x03, 0x6e, 0xbf, 0xa6, 0xe7, 0xf4, 0x71, + 0x1c, 0x45, 0x94, 0xf7, 0x09, 0xc7, 0x34, 0x4c, 0x11, 0x82, 0xea, 0x18, 0x47, 0xc4, 0x32, 0xf6, + 0x8d, 0xce, 0x86, 0x2b, 0xbf, 0xd1, 0x1d, 0xa8, 0x91, 0x08, 0xd3, 0xd0, 0x5a, 0x93, 0x4e, 0x65, + 0x20, 0x0b, 0x1a, 0x11, 0x49, 0x53, 0x3c, 0x22, 0x56, 0x45, 0xfa, 0x67, 0x26, 0xda, 0x86, 0xc6, + 0x24, 0x25, 0xcc, 0xa3, 0x81, 0x55, 0xdd, 0x37, 0x3a, 0x35, 0xb7, 0x2e, 0xcc, 0x67, 0x01, 0xda, + 0x81, 0xa6, 0x5c, 0x90, 0x37, 0xd4, 0xe4, 0x21, 0x53, 0x38, 0xbe, 0xc4, 0x11, 0x71, 0x06, 0x70, + 0x4b, 0x84, 0xf3, 0x02, 0x8f, 0xc8, 0x2b, 0xc2, 0x52, 0x1a, 0x8f, 0xd1, 0xc7, 0x50, 0xf7, 0x65, + 0x74, 0x32, 0x9c, 0xf5, 0xde, 0xed, 0xae, 0x62, 0xd2, 0x7d, 0x4a, 0xb9, 0x0a, 0xdb, 0xd5, 0x1b, + 0xd0, 0x16, 0xd4, 0x87, 0x31, 0x8b, 0x30, 0x97, 0x41, 0x36, 0x5d, 0x6d, 0x39, 0xbf, 0x1a, 0x60, + 0xce, 0x60, 0xd1, 0x11, 0x34, 0x2e, 0x14, 0xb4, 0x06, 0xdc, 0x9e, 0x01, 0x96, 0x6e, 0x76, 0x67, + 0xfb, 0xae, 0xc2, 0x15, 0x9a, 0x70, 0xca, 0xc3, 0x19, 0x77, 0x65, 0xa0, 0xbb, 0x60, 0x4e, 0x58, + 0xe8, 0x25, 0x98, 0x9f, 0x49, 0xea, 0x4d, 0xb7, 0x31, 0x61, 0xe1, 0x0b, 0xcc, 0xcf, 0x84, 0xb0, + 0xd2, 0xad, 0x68, 0xcb, 0xef, 0xb9, 0xd8, 0xf5, 0x9c, 0xd8, 0x7b,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xa8, 0xc3, 0x51, 0xac, 0xed, 0xe4, 0xf4, 0xb4, 0x2e, 0x5d, 0x0f, 0xfe, + 0x0a, 0x00, 0x00, 0xff, 0xff, 0xfe, 0x72, 0x04, 0x22, 0x7b, 0x0d, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1384,7 +1277,6 @@ type WikiServiceClient interface { 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) - WikiGetFormattedData(ctx context.Context, in *WikiGetFormattedDataRequest, opts ...grpc.CallOption) (WikiService_WikiGetFormattedDataClient, error) } type wikiServiceClient struct { @@ -1632,38 +1524,6 @@ func (x *wikiServiceWikiListPagesClient) Recv() (*WikiListPagesResponse, error) return m, nil } -func (c *wikiServiceClient) WikiGetFormattedData(ctx context.Context, in *WikiGetFormattedDataRequest, opts ...grpc.CallOption) (WikiService_WikiGetFormattedDataClient, error) { - stream, err := c.cc.NewStream(ctx, &_WikiService_serviceDesc.Streams[7], "/gitaly.WikiService/WikiGetFormattedData", opts...) - if err != nil { - return nil, err - } - x := &wikiServiceWikiGetFormattedDataClient{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_WikiGetFormattedDataClient interface { - Recv() (*WikiGetFormattedDataResponse, error) - grpc.ClientStream -} - -type wikiServiceWikiGetFormattedDataClient struct { - grpc.ClientStream -} - -func (x *wikiServiceWikiGetFormattedDataClient) Recv() (*WikiGetFormattedDataResponse, error) { - m := new(WikiGetFormattedDataResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - // WikiServiceServer is the server API for WikiService service. type WikiServiceServer interface { WikiGetPageVersions(*WikiGetPageVersionsRequest, WikiService_WikiGetPageVersionsServer) error @@ -1675,7 +1535,6 @@ type WikiServiceServer interface { WikiFindFile(*WikiFindFileRequest, WikiService_WikiFindFileServer) error WikiGetAllPages(*WikiGetAllPagesRequest, WikiService_WikiGetAllPagesServer) error WikiListPages(*WikiListPagesRequest, WikiService_WikiListPagesServer) error - WikiGetFormattedData(*WikiGetFormattedDataRequest, WikiService_WikiGetFormattedDataServer) error } // UnimplementedWikiServiceServer can be embedded to have forward compatible implementations. @@ -1706,9 +1565,6 @@ func (*UnimplementedWikiServiceServer) WikiGetAllPages(req *WikiGetAllPagesReque func (*UnimplementedWikiServiceServer) WikiListPages(req *WikiListPagesRequest, srv WikiService_WikiListPagesServer) error { return status.Errorf(codes.Unimplemented, "method WikiListPages not implemented") } -func (*UnimplementedWikiServiceServer) WikiGetFormattedData(req *WikiGetFormattedDataRequest, srv WikiService_WikiGetFormattedDataServer) error { - return status.Errorf(codes.Unimplemented, "method WikiGetFormattedData not implemented") -} func RegisterWikiServiceServer(s *grpc.Server, srv WikiServiceServer) { s.RegisterService(&_WikiService_serviceDesc, srv) @@ -1889,27 +1745,6 @@ func (x *wikiServiceWikiListPagesServer) Send(m *WikiListPagesResponse) error { return x.ServerStream.SendMsg(m) } -func _WikiService_WikiGetFormattedData_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(WikiGetFormattedDataRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(WikiServiceServer).WikiGetFormattedData(m, &wikiServiceWikiGetFormattedDataServer{stream}) -} - -type WikiService_WikiGetFormattedDataServer interface { - Send(*WikiGetFormattedDataResponse) error - grpc.ServerStream -} - -type wikiServiceWikiGetFormattedDataServer struct { - grpc.ServerStream -} - -func (x *wikiServiceWikiGetFormattedDataServer) Send(m *WikiGetFormattedDataResponse) error { - return x.ServerStream.SendMsg(m) -} - var _WikiService_serviceDesc = grpc.ServiceDesc{ ServiceName: "gitaly.WikiService", HandlerType: (*WikiServiceServer)(nil), @@ -1955,11 +1790,6 @@ var _WikiService_serviceDesc = grpc.ServiceDesc{ Handler: _WikiService_WikiListPages_Handler, ServerStreams: true, }, - { - StreamName: "WikiGetFormattedData", - Handler: _WikiService_WikiGetFormattedData_Handler, - ServerStreams: true, - }, }, Metadata: "wiki.proto", } diff --git a/proto/wiki.proto b/proto/wiki.proto index 6f9b61d2c..e7a31d7e3 100644 --- a/proto/wiki.proto +++ b/proto/wiki.proto @@ -58,12 +58,6 @@ service WikiService { }; } - rpc WikiGetFormattedData(WikiGetFormattedDataRequest) returns (stream WikiGetFormattedDataResponse) { - option (op_type) = { - op: ACCESSOR - target_repository_field: "1" - }; - } } message WikiCommitDetails { @@ -192,17 +186,6 @@ message WikiGetAllPagesResponse { bool end_of_page = 2; } -message WikiGetFormattedDataRequest { - Repository repository = 1; - bytes title = 2; - bytes revision = 3; - bytes directory = 4; -} - -message WikiGetFormattedDataResponse { - bytes data = 1; -} - message WikiListPagesRequest { Repository repository = 1; // 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 76ab62b25..57c934988 100644 --- a/ruby/lib/gitaly_server/wiki_service.rb +++ b/ruby/lib/gitaly_server/wiki_service.rb @@ -179,26 +179,6 @@ module GitalyServer Gitaly::WikiUpdatePageResponse.new end - def wiki_get_formatted_data(request, call) - repo = Gitlab::Git::Repository.from_gitaly(request.repository, call) - wiki = Gitlab::Git::Wiki.new(repo) - - page = wiki.page( - title: set_utf8!(request.title), - version: request.revision.presence, - dir: set_utf8!(request.directory).presence - ) - - raise GRPC::NotFound unless page - - Enumerator.new do |y| - io = StringIO.new(page.formatted_data) - while chunk = io.read(Gitlab.config.git.write_buffer_size) - y.yield Gitaly::WikiGetFormattedDataResponse.new(data: chunk) - end - end - end - private def get_wiki_pages(request, call) diff --git a/ruby/proto/gitaly/wiki_pb.rb b/ruby/proto/gitaly/wiki_pb.rb index 087447c9d..e92ddd1b6 100644 --- a/ruby/proto/gitaly/wiki_pb.rb +++ b/ruby/proto/gitaly/wiki_pb.rb @@ -97,15 +97,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :page, :message, 1, "gitaly.WikiPage" optional :end_of_page, :bool, 2 end - add_message "gitaly.WikiGetFormattedDataRequest" do - optional :repository, :message, 1, "gitaly.Repository" - optional :title, :bytes, 2 - optional :revision, :bytes, 3 - optional :directory, :bytes, 4 - end - add_message "gitaly.WikiGetFormattedDataResponse" do - optional :data, :bytes, 1 - end add_message "gitaly.WikiListPagesRequest" do optional :repository, :message, 1, "gitaly.Repository" optional :limit, :uint32, 2 @@ -141,8 +132,6 @@ module Gitaly 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 - WikiGetFormattedDataRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiGetFormattedDataRequest").msgclass - WikiGetFormattedDataResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiGetFormattedDataResponse").msgclass WikiListPagesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiListPagesRequest").msgclass WikiListPagesRequest::SortBy = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiListPagesRequest.SortBy").enummodule WikiListPagesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.WikiListPagesResponse").msgclass diff --git a/ruby/proto/gitaly/wiki_services_pb.rb b/ruby/proto/gitaly/wiki_services_pb.rb index 8d3cc38ef..029b33640 100644 --- a/ruby/proto/gitaly/wiki_services_pb.rb +++ b/ruby/proto/gitaly/wiki_services_pb.rb @@ -23,7 +23,6 @@ module Gitaly rpc :WikiFindFile, WikiFindFileRequest, stream(WikiFindFileResponse) rpc :WikiGetAllPages, WikiGetAllPagesRequest, stream(WikiGetAllPagesResponse) rpc :WikiListPages, WikiListPagesRequest, stream(WikiListPagesResponse) - rpc :WikiGetFormattedData, WikiGetFormattedDataRequest, stream(WikiGetFormattedDataResponse) end Stub = Service.rpc_stub_class |