Repository navigation
fix(repo-server-api): stage the whole branch folder for kustomize sources with refs - #474
Merged
dag-andersen merged 1 commit intoAug 23, 2026
Conversation
…with refs Kustomize apps referencing files outside their source dir (resources: ../../base/...) fail with 'no such file or directory' when ref sources are present, because only the source dir + .refs/ get staged. Stage the whole checkout instead, like the no-refs fast path and like the repo server does with a real clone. Files are hardlinked, symlinks stay symlinks (the repo server and kustomize validate them), .git is skipped.
mickaelicoptere
force-pushed
the
up/kustomize-source-staging
branch
from
August 19, 2026 21:50
b7e798e to
ae8a381
Compare
dag-andersen
approved these changes
Aug 23, 2026
dag-andersen
left a comment
Owner
There was a problem hiding this comment.
Thank you for this bugfix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Our apps are kustomize overlays referencing shared bases outside their own directory (
resources: ../../base/...), built with--load-restrictor LoadRestrictionsNone. When an app also has ref sources ($values files), the tool stages only the source dir +.refs/, so every one of those apps fails withno such file or directory.Fix
Stage the whole checkout for kustomize sources — like the no-refs fast path already does, and like Argo CD itself: the repo server always runs kustomize inside a full clone, and kustomize allows directory references anywhere in the repo even with default load restrictions (only file loads are restricted).
The new
stageCheckoutkeeps that cheap and faithful:.gitis skippedcopyDir(chart/ref staging) is unchanged. Tests cover the escaping reference and the staging semantics. Validated on a >1000-app monorepo: 6 failing apps → 0.