feat: optimize ls-remote (#28650)#28667
Conversation
❗ Preview Environment stop on Bunnyshell failedSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
885cf1b to
69df631
Compare
Bundle ReportChanges will increase total bundle size by 155 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: argo-cd-ui-array-pushAssets Changed:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #28667 +/- ##
=========================================
Coverage ? 65.30%
=========================================
Files ? 426
Lines ? 60142
Branches ? 0
=========================================
Hits ? 39274
Misses ? 17260
Partials ? 3608
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
Nice work! I'd like to propose one refinement that makes the design cover three goals at once without them being in tension:
The key insight is that these are not actually in conflict:
Proposed routing in lsRemote(revision) |
Thanks for the suggestion. I tested this with Git packet tracing, and unfortunately git ls-remote refs/pull/... does not send the ref as a v2 ref-prefix; the server still advertises all refs and Git filters For this PR, I’d keep the optimized heads/tags path and the existing full fallback for custom refs. True targeted custom-ref support would require lower-level ls-refs handling and is better suited to a follow-up. |
d6234a8 to
76d124e
Compare
|
@agaudreault sorry for tagging you, I just saw you did a review for the pr that I referenced about cache, so maybe this is something you can also check if this one makes sense? |
Signed-off-by: kirillbilchenko <kirillbilchenko@users.noreply.github.com>
Signed-off-by: kirillbilchenko <kirillbilchenko@users.noreply.github.com>
Signed-off-by: kirillbilchenko <kirillbilchenko@users.noreply.github.com>
Signed-off-by: kirillbilchenko <kirillbilchenko@users.noreply.github.com>
09b5a7d to
2e7b5d6
Compare

Large repositories may advertise hundreds of thousands of refs even though most Applications only use branches and tags. This adds an opt-in repo-server path that uses native Git protocol v2 to query configured ref namespaces, avoiding unrelated refs such as pull-request refs while preserving the current behavior by default.
Fixes #28650.
Implementation of the proposal
Checklist: