Skip to content

Comments

feat(repo-server): partial-clone#25416

Open
blakepettersson wants to merge 8 commits intoargoproj:masterfrom
blakepettersson:partial-clone
Open

feat(repo-server): partial-clone#25416
blakepettersson wants to merge 8 commits intoargoproj:masterfrom
blakepettersson:partial-clone

Conversation

@blakepettersson
Copy link
Member

@blakepettersson blakepettersson commented Nov 25, 2025

This PR adds sparse checkout support for Git repositories in Argo CD. Similar to #25137, but takes the approach of configuring the sparse-paths using a repository credential instead.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@bunnyshell
Copy link

bunnyshell bot commented Nov 25, 2025

❌ Preview Environment undeployed from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

@blakepettersson blakepettersson changed the title Partial clone feat(repo-server): partial-clone Nov 25, 2025
@blakepettersson blakepettersson force-pushed the partial-clone branch 2 times, most recently from 36a1fe8 to 1774213 Compare November 25, 2025 22:30
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 68.55346% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.24%. Comparing base (2d71941) to head (31aca0a).
⚠️ Report is 92 commits behind head on master.

Files with missing lines Patch % Lines
reposerver/repository/repository.go 69.47% 19 Missing and 10 partials ⚠️
util/git/client.go 65.00% 4 Missing and 3 partials ⚠️
util/db/secrets.go 60.00% 2 Missing and 2 partials ⚠️
pkg/apis/application/v1alpha1/repository_types.go 40.00% 3 Missing ⚠️
cmd/argocd/commands/repo.go 0.00% 2 Missing ⚠️
cmd/util/repo.go 0.00% 2 Missing ⚠️
util/db/repository_secrets.go 71.42% 1 Missing and 1 partial ⚠️
reposerver/cache/cache.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #25416      +/-   ##
==========================================
- Coverage   62.27%   62.24%   -0.03%     
==========================================
  Files         351      352       +1     
  Lines       49231    49489     +258     
==========================================
+ Hits        30658    30805     +147     
- Misses      15659    15722      +63     
- Partials     2914     2962      +48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blakepettersson blakepettersson marked this pull request as ready for review November 27, 2025 21:16
@blakepettersson blakepettersson requested review from a team as code owners November 27, 2025 21:16
@crenshaw-dev
Copy link
Member

How does this handle concurrency? My understanding might be out of date, but I believe every repo gets a shared clone. So if two repo secrets for the same repo specify different paths, is there a single winner?

@blakepettersson
Copy link
Member Author

How does this handle concurrency? My understanding might be out of date, but I believe every repo gets a shared clone. So if two repo secrets for the same repo specify different paths, is there a single winner?

@crenshaw-dev the idea in this PR is that each permutation of a sparse checkout + repository url would get its own checkout on disk. We hash the sparse paths and use that as a part of the gitRepoPaths cache key. Each unique combination of sparse paths (or if no sparse paths are given) will yield a different checkout location on disk. At least for now this adds the limitation that we're limited to only having a single sparse checkout configuration per app project (along with a "global" repo config if applicable) since we're currently limited to having one unique repository url per app project.

@reggie-k reggie-k added this to the v3.4 milestone Dec 14, 2025
@todaywasawesome todaywasawesome self-assigned this Jan 15, 2026
@nitishfy nitishfy self-assigned this Jan 15, 2026
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants