diff options
author | Paul Okstad <pokstad@gitlab.com> | 2020-01-23 16:38:54 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2020-01-23 16:38:54 +0300 |
commit | c784ab945f8a8be6f6120432019e8a6cd7420a62 (patch) | |
tree | 34a3ba0ef017dfa543f66470ffbaee0aecf4fdb2 | |
parent | 18006a8976bc642f1d057be8526e05a3a2ed3a5c (diff) |
Remove revision from GetAllLFSPointers request
-rw-r--r-- | changelogs/unreleased/po-getalllfspointers-remove-rev.yml | 5 | ||||
-rw-r--r-- | internal/service/blob/lfs_pointers.go | 4 | ||||
-rw-r--r-- | internal/service/blob/lfs_pointers_test.go | 64 | ||||
-rw-r--r-- | proto/blob.proto | 4 | ||||
-rw-r--r-- | proto/go/gitalypb/blob.pb.go | 104 | ||||
-rw-r--r-- | ruby/lib/gitaly_server/blob_service.rb | 4 | ||||
-rw-r--r-- | ruby/proto/gitaly/blob_pb.rb | 1 |
7 files changed, 105 insertions, 81 deletions
diff --git a/changelogs/unreleased/po-getalllfspointers-remove-rev.yml b/changelogs/unreleased/po-getalllfspointers-remove-rev.yml new file mode 100644 index 000000000..86002def9 --- /dev/null +++ b/changelogs/unreleased/po-getalllfspointers-remove-rev.yml @@ -0,0 +1,5 @@ +--- +title: Remove revision from GetAllLFSPointers request +merge_request: 1771 +author: +type: other diff --git a/internal/service/blob/lfs_pointers.go b/internal/service/blob/lfs_pointers.go index 4dfbd27ab..9fffdb7a3 100644 --- a/internal/service/blob/lfs_pointers.go +++ b/internal/service/blob/lfs_pointers.go @@ -108,8 +108,8 @@ func (s *server) GetNewLFSPointers(in *gitalypb.GetNewLFSPointersRequest, stream func (s *server) GetAllLFSPointers(in *gitalypb.GetAllLFSPointersRequest, stream gitalypb.BlobService_GetAllLFSPointersServer) error { ctx := stream.Context() - if err := validateGetLfsPointersByRevisionRequest(in); err != nil { - return helper.ErrInvalidArgument(err) + if in.GetRepository() == nil { + return helper.ErrInvalidArgument(fmt.Errorf("empty Repository")) } client, err := s.ruby.BlobServiceClient(ctx) diff --git a/internal/service/blob/lfs_pointers_test.go b/internal/service/blob/lfs_pointers_test.go index 5f40baa07..019caa37c 100644 --- a/internal/service/blob/lfs_pointers_test.go +++ b/internal/service/blob/lfs_pointers_test.go @@ -3,6 +3,7 @@ package blob import ( "io" "os/exec" + "strings" "testing" "github.com/stretchr/testify/require" @@ -365,7 +366,6 @@ func TestSuccessfulGetAllLFSPointersRequest(t *testing.T) { request := &gitalypb.GetAllLFSPointersRequest{ Repository: testRepo, - Revision: []byte("54fcc214b94e78d7a41a9a8fe6d87a5e59500e51"), } expectedLFSPointers := []*gitalypb.LFSPointer{ @@ -429,31 +429,16 @@ func TestFailedGetAllLFSPointersRequestDueToValidations(t *testing.T) { client, conn := newBlobClient(t, serverSocketPath) defer conn.Close() - testRepo, _, cleanupFn := testhelper.NewTestRepo(t) - defer cleanupFn() - ctx, cancel := testhelper.Context() defer cancel() testCases := []struct { desc string repository *gitalypb.Repository - revision []byte }{ { desc: "empty Repository", repository: nil, - revision: []byte("master"), - }, - { - desc: "empty revision", - repository: testRepo, - revision: nil, - }, - { - desc: "revision can't start with '-'", - repository: testRepo, - revision: []byte("-suspicious-revision"), }, } @@ -461,7 +446,6 @@ func TestFailedGetAllLFSPointersRequestDueToValidations(t *testing.T) { t.Run(tc.desc, func(t *testing.T) { request := &gitalypb.GetAllLFSPointersRequest{ Repository: tc.repository, - Revision: tc.revision, } c, err := client.GetAllLFSPointers(ctx, request) @@ -482,3 +466,49 @@ func drainAllPointers(c gitalypb.BlobService_GetAllLFSPointersClient) error { } } } + +// TestGetAllLFSPointersVerifyScope verifies that this RPC returns all LFS +// pointers in a repository, not only ones reachable from the default branch +func TestGetAllLFSPointersVerifyScope(t *testing.T) { + server, serverSocketPath := runBlobServer(t) + defer server.Stop() + + client, conn := newBlobClient(t, serverSocketPath) + defer conn.Close() + + testRepo, repoPath, cleanupFn := testhelper.NewTestRepo(t) + defer cleanupFn() + + ctx, cancel := testhelper.Context() + defer cancel() + + request := &gitalypb.GetAllLFSPointersRequest{ + Repository: testRepo, + } + + c, err := client.GetAllLFSPointers(ctx, request) + require.NoError(t, err) + + lfsPtr := &gitalypb.LFSPointer{ + Size: 127, + Data: []byte("version https://git-lfs.github.com/spec/v1\noid sha256:f2b0a1e7550e9b718dafc9b525a04879a766de62e4fbdfc46593d47f7ab74636\nsize 20\n"), + Oid: "f78df813119a79bfbe0442ab92540a61d3ab7ff3", + } + + // the LFS pointer is reachable from a non-default branch: + require.True(t, refHasPtr(t, repoPath, "moar-lfs-ptrs", lfsPtr)) + + // the same pointer is not reachable from a default branch + require.False(t, refHasPtr(t, repoPath, "master", lfsPtr)) + + require.Contains(t, getAllPointers(t, c), lfsPtr, + "RPC should return all LFS pointers, not just ones in the default branch") +} + +// refHasPtr verifies the provided ref has connectivity to the LFS pointer +func refHasPtr(t *testing.T, repoPath, ref string, lfsPtr *gitalypb.LFSPointer) bool { + objects := string(testhelper.MustRunCommand(t, nil, + "git", "-C", repoPath, "rev-list", "--objects", ref)) + + return strings.Contains(objects, lfsPtr.Oid) +} diff --git a/proto/blob.proto b/proto/blob.proto index 0696ae541..6497556d8 100644 --- a/proto/blob.proto +++ b/proto/blob.proto @@ -126,9 +126,7 @@ message GetNewLFSPointersResponse { message GetAllLFSPointersRequest { Repository repository = 1; - // This revision field is ignored by the implementation; it should be - // removed! https://gitlab.com/gitlab-org/gitaly/issues/2247 - bytes revision = 2; + reserved 2; } message GetAllLFSPointersResponse { diff --git a/proto/go/gitalypb/blob.pb.go b/proto/go/gitalypb/blob.pb.go index cd6252ce9..b7542a769 100644 --- a/proto/go/gitalypb/blob.pb.go +++ b/proto/go/gitalypb/blob.pb.go @@ -649,13 +649,10 @@ func (m *GetNewLFSPointersResponse) GetLfsPointers() []*LFSPointer { } type GetAllLFSPointersRequest struct { - Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` - // This revision field is ignored by the implementation; it should be - // removed! https://gitlab.com/gitlab-org/gitaly/issues/2247 - Revision []byte `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetAllLFSPointersRequest) Reset() { *m = GetAllLFSPointersRequest{} } @@ -690,13 +687,6 @@ func (m *GetAllLFSPointersRequest) GetRepository() *Repository { return nil } -func (m *GetAllLFSPointersRequest) GetRevision() []byte { - if m != nil { - return m.Revision - } - return nil -} - type GetAllLFSPointersResponse struct { LfsPointers []*LFSPointer `protobuf:"bytes,1,rep,name=lfs_pointers,json=lfsPointers,proto3" json:"lfs_pointers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -755,49 +745,49 @@ func init() { func init() { proto.RegisterFile("blob.proto", fileDescriptor_6903d1e8a20272e8) } var fileDescriptor_6903d1e8a20272e8 = []byte{ - // 659 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xd5, 0xd6, 0x4d, 0xeb, 0x4c, 0xd2, 0x52, 0x56, 0xd0, 0xba, 0x16, 0x54, 0xae, 0x85, 0x90, - 0x2f, 0x24, 0x25, 0x88, 0x2b, 0x52, 0x7b, 0x68, 0x54, 0x8a, 0xda, 0x6a, 0xcb, 0x09, 0x21, 0x45, - 0x76, 0xbd, 0x69, 0xb7, 0xda, 0x78, 0x8d, 0x77, 0xdb, 0x2a, 0xfc, 0x08, 0x7f, 0xc3, 0x27, 0xf0, - 0x03, 0xfc, 0x00, 0xdf, 0xc0, 0x09, 0x79, 0x6d, 0x27, 0x4e, 0xe2, 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, 0x41, 0xe7, 0x4a, 0x8c, 0xba, - 0x99, 0xf9, 0x4a, 0x24, 0xd7, 0xdd, 0xac, 0x4c, 0x57, 0xff, 0x9b, 0xbb, 0xd7, 0x22, 0x3f, 0xc7, - 0x41, 0xb0, 0xa6, 0x5d, 0x6f, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4b, 0xcb, 0x42, 0x4d, 0xd2, - 0x07, 0x00, 0x00, + // 665 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xc1, 0x4e, 0xdb, 0x4c, + 0x10, 0xd6, 0xc6, 0x09, 0x38, 0x93, 0xc0, 0xcf, 0xbf, 0x6a, 0xc1, 0x58, 0x2d, 0x32, 0x56, 0x55, + 0xf9, 0xd2, 0x84, 0xa6, 0xea, 0xb5, 0x12, 0x1c, 0x88, 0x80, 0x0a, 0xd0, 0xc2, 0xa9, 0xaa, 0x14, + 0xd9, 0x78, 0x03, 0x5b, 0x6d, 0xbc, 0xae, 0x77, 0x01, 0xa5, 0x2f, 0xd2, 0xb7, 0xe9, 0x23, 0xf4, + 0x05, 0xfa, 0x02, 0x7d, 0x86, 0x9e, 0x2a, 0xaf, 0xed, 0xc4, 0x49, 0x9c, 0x5e, 0xc2, 0x6d, 0x76, + 0x66, 0x67, 0xbe, 0x6f, 0x66, 0x3e, 0xaf, 0x01, 0x02, 0x2e, 0x82, 0x4e, 0x9c, 0x08, 0x25, 0xf0, + 0xda, 0x2d, 0x53, 0x3e, 0x1f, 0xdb, 0x6d, 0x79, 0xe7, 0x27, 0x34, 0xcc, 0xbc, 0x2e, 0x87, 0xcd, + 0x3e, 0x55, 0x47, 0x5c, 0x04, 0x84, 0x7e, 0xbd, 0xa7, 0x52, 0xe1, 0x1e, 0x40, 0x42, 0x63, 0x21, + 0x99, 0x12, 0xc9, 0xd8, 0x42, 0x0e, 0xf2, 0x5a, 0x3d, 0xdc,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xc9, 0x69, 0xdd, 0xac, 0x6d, 0x19, 0x39, 0xd3, 0xf9, + 0xaa, 0x2b, 0x31, 0xed, 0xfd, 0x34, 0xa0, 0x95, 0x0a, 0xf8, 0x8a, 0x26, 0x0f, 0xec, 0x86, 0xe2, + 0x3e, 0xac, 0xe7, 0xdf, 0x3d, 0xde, 0x9e, 0x7b, 0x8e, 0xf2, 0x06, 0xec, 0x9d, 0x05, 0x7f, 0x46, + 0xc1, 0x6d, 0xfe, 0xf9, 0xee, 0x35, 0xcc, 0x9a, 0x8d, 0xde, 0x1e, 0x20, 0x7c, 0x0a, 0x66, 0xf1, + 0x80, 0xe0, 0x9d, 0x25, 0x0f, 0x9b, 0x6d, 0x2d, 0x06, 0xaa, 0x6a, 0x7d, 0xd6, 0xff, 0x8c, 0x52, + 0xd7, 0xf8, 0x65, 0x29, 0x71, 0x71, 0xc6, 0xf6, 0xde, 0xb2, 0x70, 0x55, 0x75, 0x0a, 0xff, 0x2f, + 0x08, 0x00, 0x3b, 0xa5, 0x0a, 0x95, 0xda, 0xb6, 0xf7, 0xff, 0x71, 0x63, 0x39, 0xcc, 0xec, 0xf6, + 0x66, 0x60, 0x2a, 0xe5, 0x32, 0x03, 0x53, 0xbd, 0xfa, 0x19, 0x98, 0xa3, 0x83, 0x4f, 0x69, 0x02, + 0xf7, 0x83, 0xce, 0x8d, 0x18, 0x75, 0x33, 0xf3, 0x8d, 0x48, 0x6e, 0xbb, 0x59, 0x99, 0xae, 0xfe, + 0x0b, 0x77, 0x6f, 0x45, 0x7e, 0x8e, 0x83, 0x60, 0x4d, 0xbb, 0xde, 0xfd, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0x9f, 0x79, 0x8a, 0x35, 0xbc, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/ruby/lib/gitaly_server/blob_service.rb b/ruby/lib/gitaly_server/blob_service.rb index 4e14e882e..32fcbbabd 100644 --- a/ruby/lib/gitaly_server/blob_service.rb +++ b/ruby/lib/gitaly_server/blob_service.rb @@ -32,7 +32,9 @@ module GitalyServer def get_all_lfs_pointers(request, call) Enumerator.new do |y| - changes = lfs_changes(request, call) + repo = Gitlab::Git::Repository.from_gitaly(request.repository, call) + + changes = Gitlab::Git::LfsChanges.new(repo, "") sliced_gitaly_lfs_pointers(changes.all_pointers) do |lfs_pointers| y.yield Gitaly::GetAllLFSPointersResponse.new(lfs_pointers: lfs_pointers) diff --git a/ruby/proto/gitaly/blob_pb.rb b/ruby/proto/gitaly/blob_pb.rb index eab74286c..e1d3b1f6c 100644 --- a/ruby/proto/gitaly/blob_pb.rb +++ b/ruby/proto/gitaly/blob_pb.rb @@ -63,7 +63,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do end add_message "gitaly.GetAllLFSPointersRequest" do optional :repository, :message, 1, "gitaly.Repository" - optional :revision, :bytes, 2 end add_message "gitaly.GetAllLFSPointersResponse" do repeated :lfs_pointers, :message, 1, "gitaly.LFSPointer" |