Feat | Fix repo-server-api render mode: multi-source, cross-repo, and credential issues#359
Merged
dag-andersen merged 5 commits intomainfrom Feb 27, 2026
Merged
Feat | Fix repo-server-api render mode: multi-source, cross-repo, and credential issues#359dag-andersen merged 5 commits intomainfrom
dag-andersen merged 5 commits intomainfrom
Conversation
Contributor
Argo CD Diff PreviewSummary: Total: 1 files changed
Added (1):
+ multi-source-app (+41)multi-source-app (examples/multi-source/app.yaml)@@ Application added: multi-source-app (examples/multi-source/app.yaml) @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: backend
+ namespace: default
+spec:
+ replicas: 3
+ selector:
+ matchLabels:
+ app: backend
+ template:
+ metadata:
+ labels:
+ app: backend
+ spec:
+ containers:
+ - image: my-org/backend:1.0.0
+ name: backend
+ ports:
+ - containerPort: 8080
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: frontend
+ namespace: default
+spec:
+ replicas: 2
+ selector:
+ matchLabels:
+ app: frontend
+ template:
+ metadata:
+ labels:
+ app: frontend
+ spec:
+ containers:
+ - image: nginx:1.25
+ name: frontend
+ ports:
+ - containerPort: 80Stats: |
…of substring match
ee47309 to
ef38284
Compare
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.
Summary
This PR fixes several bugs in the
repo-server-apirender mode that prevented applications from rendering correctly.Fixes
1. Multi-content-source support
Apps with multiple
path:sources (e.g. a root app pointing at two paths in the same repo) previously errored. Fixed by splitting content sources from ref-only sources and calling the repo server once per content source, then merging the manifests.2. Cross-repo sources fall back to remote RPC
Apps whose
source.repoURLpoints at a different repo than the PR repo fail because those files aren't checked out locally. Fixed by detecting whensource.repoURLdoesn't match the PR repo and using the remoteGenerateManifestRPC (streamDir="") instead of streaming local files.3.
.gitsuffix normalisation in repo URL lookupArgoCD repo secrets are sometimes stored without a trailing
.git(e.g.https://github.com/org/repo) while apprepoURLs include it (e.g.https://github.com/org/repo.git). The exact-string lookup inGetRepomissed these, returning a bare stub with no credentials →authentication requiredfrom the repo server. Fixed by normalising URLs (lowercase + strip.git) when indexing and looking upreposByURL.4. Ref source credentials missing
When building
RefSourcesfor the remote RPC path,RefTarget.Repowas set to a bare stub with no credentials. For repos using GitHub App auth, the repo server failed withfailed to get git client for repo. Fixed by usingGetRepo(ref.RepoURL)to return the fully credential-enrichedRepository.5. Guard extract paths against unconverted ApplicationSets
Added a guard to prevent panics when ApplicationSets have not been fully converted to Applications before path extraction.