Skip to content
Snippets Groups Projects

Bundle-uri capability: Only advertise when bundle exist

Merged Olivier Campeau requested to merge advertise-bundle-uri into master
All threads resolved!

This MR is a building block towards enabling bundle-uri feature.

Here we modify the way bundle-uri capability is advertised to the client to only make it so when a bundle exist for the given repository.

For SSH, this change does not provide much benefit since the whole packfile negociation flow is performed on a single connection. In other words, the flow starts when the client starts the upload-pack service, and it ends when the client received all the objects it needed.

For SmartHTTP, however, this is different. Each request/command sent by the client (ls-refs, bundle-uri, fetch) is sent on different, stateless, RPC calls. There is no way to know what command the client is sending to the git-upload-pack process until that process is actually started, which means that the Git config injected into the process must be computed in advance for every request; this implies computing the SignedURL of the bundle if it exist. By advertising bundle-uri capability only when a bundle exists for the given repository, we make sure the client won't send a bundle-uri command if no bundle exist.

This not only reduces by 1 the number of round-trip request and the number of Git config computation, but it also make it easier to monitor the use of bundle-uri feature, since now we can be sure that when a client sends the bundle-uri command, it is because:

  1. A bundle exists
  2. The server advertised the capability
  3. The client support the capability

Thus, we now have a way to know if a client is using bundle-uri or not.

References: #6572 (closed)

Edited by Olivier Campeau

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Mustafa Bayar
  • Mustafa Bayar
  • Mustafa Bayar
  • Mustafa Bayar approved this merge request

    approved this merge request

  • added 1 commit

    • 8fb84205 - Bundle-uri capability: Only advertise when bundle exist

    Compare with previous version

  • Olivier Campeau reset approvals from @mustafabayar by pushing to the branch

    reset approvals from @mustafabayar by pushing to the branch

  • Olivier Campeau resolved all threads

    resolved all threads

  • Olivier Campeau resolved all threads

    resolved all threads

  • requested review from @mustafabayar

  • Mustafa Bayar approved this merge request

    approved this merge request

  • @toon let me know if you want me to ask another reviewer

  • Toon Claes
  • Toon Claes
  • Toon Claes
  • Toon Claes
  • added 1 commit

    • c894b7c0 - Bundle-uri capability: Only advertise when bundle exist

    Compare with previous version

  • Olivier Campeau reset approvals from @mustafabayar by pushing to the branch

    reset approvals from @mustafabayar by pushing to the branch

  • added 1 commit

    • f5d065d6 - Bundle-uri capability: Only advertise when bundle exist

    Compare with previous version

  • Olivier Campeau added 21 commits

    added 21 commits

    Compare with previous version

  • Olivier Campeau resolved all threads

    resolved all threads

  • Toon Claes requested review from @mustafabayar

    requested review from @mustafabayar

  • Toon Claes approved this merge request

    approved this merge request

  • @oli.campeau I have no further comments. I'm gonna leave it to @mustafabayar for final review.

  • Mustafa Bayar approved this merge request

    approved this merge request

  • Mustafa Bayar removed this merge request from the merge train because the pipeline did not succeed. Learn more.

    removed this merge request from the merge train because the pipeline did not succeed. Learn more.

  • Mustafa Bayar enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • merged

  • Mustafa Bayar mentioned in commit 70dee0e4

    mentioned in commit 70dee0e4

  • mentioned in epic gitlab-org#16007

  • mentioned in epic &16007

  • added workflowstaging label and removed workflowcanary label

  • Olivier Campeau mentioned in commit 8f5f475d

    mentioned in commit 8f5f475d

  • Olivier Campeau mentioned in merge request !7638 (closed)

    mentioned in merge request !7638 (closed)

  • Olivier Campeau mentioned in commit eddff29d

    mentioned in commit eddff29d

  • Olivier Campeau mentioned in commit 6c9209ec

    mentioned in commit 6c9209ec

  • Olivier Campeau mentioned in merge request !7643 (merged)

    mentioned in merge request !7643 (merged)

  • Olivier Campeau mentioned in commit ae708ad3

    mentioned in commit ae708ad3

  • Olivier Campeau mentioned in commit 425421a3

    mentioned in commit 425421a3

  • Olivier Campeau mentioned in commit 877ac586

    mentioned in commit 877ac586

  • Please register or sign in to reply
    Loading