Repository navigation
fix: fetch from the configured upstream URL - #76
Conversation
Assisted-by: OpenAI:Codex
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #76 +/- ##
==========================================
+ Coverage 97.54% 97.57% +0.02%
==========================================
Files 9 9
Lines 3707 3707
==========================================
+ Hits 3616 3617 +1
+ Misses 91 90 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@rolandjitsu This is ready for review. Could you review it for inclusion in main? Both fetch paths now use the configured upstream URL, matching clone behavior when an existing mirror is reused. The change also explicitly documents the cache-reuse contract: old cached objects remain, so a trust-domain change requires a fresh or separate cache. Local formatting, clippy and all-feature tests pass. All applicable GitHub checks pass, including both image architectures and Codecov project/patch checks. The real Git regression distinguishes the old origin from the configured upstream for both full refs and a hidden SHA available only on the new upstream. |
Import upstream PR rolandjitsu#76 and give the internal SHA-pin fixture its real configured upstream URL. Assisted-by: Codex
Keep rolandjitsu#72, rolandjitsu#76 and rolandjitsu#77 with internal maintenance while deferring rolandjitsu#67. Preserve the previous tree on its archive branch and in normal history. Assisted-by: OpenAI:Codex
A reused mirror retains the origin URL recorded at clone time. After changing the configured upstream, incremental fetch and missing-SHA backfill still contact that old origin, while new clones use the configured URL.
Use the configured repo.upstream_url for both fetch paths. Keep mirror refspecs, pruning, local pins, credential injection, retries and existing error handling unchanged. Document cache reuse: old objects and pins remain available, so switching trust domains requires a fresh or separate cache root, including LFS.
Validation:
This change addresses the synchronous main baseline independently of background-refresh work. The new file:// regression does not exercise HTTP credentials during an upstream switch; existing credential, auth failure and retry tests pass.
Related PRs and integration
Related PRs: #72 fixes upload-pack pipe ownership; #77 bounds and cancels upstream operations. Neither is a merge prerequisite for this PR.
When combined with #72, its missing-SHA test fixture must supply the actual upstream URL instead of an empty string, because both fetch paths now use repo.upstream_url. This fixture adaptation is not included in the standalone PR because the fixture belongs to #72.
An adapted downstream combination of #72, #76 and #77, excluding Draft #67, passed 202 Rust tests plus formatting, clippy, Helm and maintenance checks at profiling/git-cache-proxy@45a0635. This does not mean the unmodified PR heads merge without adaptation. Update whichever PR remains open after the other lands and rerun CI.