-
- Downloads
Allow pagination for FindAllLocalBranches
Pagination has always been ad hoc within Gitaly, and there was no convergence to a standard. This change creates a structure around this, which an implementation for one RPC to try it. The structure uses a page token, as proposed in: #2704 (comment 349733942). This allows a generic field to hold what's usually a numeric `offset` field. Where `offset` can be unstable over a series of requests due to race conditions, the page token could prevent that. The change does alter the implementation for `lines.Send()` a little, which create a situation where for other RPCs there's been slight normalization on their input to `lines.Send()` to make this change backward as well as forward compatible. Helps with: gitlab-foss#48097 (comment 354316835) Part of: #2704
Showing
- changelogs/unreleased/zj-pagination-lines-sender.yml 5 additions, 0 deletionschangelogs/unreleased/zj-pagination-lines-sender.yml
- internal/helper/lines/send.go 29 additions, 4 deletionsinternal/helper/lines/send.go
- internal/helper/lines/send_test.go 49 additions, 8 deletionsinternal/helper/lines/send_test.go
- internal/service/ref/refs.go 37 additions, 14 deletionsinternal/service/ref/refs.go
- internal/service/ref/refs_test.go 63 additions, 0 deletionsinternal/service/ref/refs_test.go
- internal/service/ref/remote_branches.go 2 additions, 3 deletionsinternal/service/ref/remote_branches.go
- internal/service/ref/testhelper_test.go 4 additions, 0 deletionsinternal/service/ref/testhelper_test.go
- internal/service/repository/search_files.go 2 additions, 1 deletioninternal/service/repository/search_files.go
- proto/go/gitalypb/ref.pb.go 127 additions, 113 deletionsproto/go/gitalypb/ref.pb.go
- proto/go/gitalypb/shared.pb.go 114 additions, 51 deletionsproto/go/gitalypb/shared.pb.go
- proto/ref.proto 5 additions, 0 deletionsproto/ref.proto
- proto/shared.proto 17 additions, 0 deletionsproto/shared.proto
- ruby/proto/gitaly/ref_pb.rb 1 addition, 0 deletionsruby/proto/gitaly/ref_pb.rb
- ruby/proto/gitaly/shared_pb.rb 5 additions, 0 deletionsruby/proto/gitaly/shared_pb.rb
This diff is collapsed.
Please register or sign in to comment