Skip to content

Bug | ApplicationSets with templated repoURLs are ignored #404

@jsws

Description

@jsws

Describe the bug

When using an ApplicationSet that uses a template for spec.template.spec.sources[].repoURL (like below) the Applications the ApplicationSet generates are not included in the diff calculations.

Expected behavior

The Applications generated by the ApplicationSet should be included in any diff calculations.

Standard output (with --debug flag)

INF ✨ Running v0.2.3 (2026-04-12T14:02:04Z) with:
INF ✨ - using cluster with Argo CD pre-installed
INF ✨ - base-branch: main
INF ✨ - target-branch: jsws-diff-test
INF ✨ - secrets-folder: ./secrets
INF ✨ - output-folder: ./output
INF ✨ - argocd-namespace: argocd
INF ✨ - repo: jsws/test
INF ✨ - timeout: 180 seconds
INF ✨ - debug: true - This is slower because it will do more checks
INF ✨ - files-changed: <auto-detected>
INF ✨ --- Fail on applications with invalid watch-pattern annotation
INF ✨ --- Include applications with no watch-pattern annotation
INF 🔑 Unique ID for this run: b5ad9
INF 🔍 Auto-detecting changed files
INF 🔍 Found 0 changed files in 0s
INF 🤖 Fetching all files for branch (branch: main)
DBG Fetching all files in dir: base-branch
DBG Found 1 yaml files in dir 'base-branch'
INF 🤖 Found 1 files in dir 'base-branch' (branch: main)
DBG In dir 'base-branch' found yaml file: appSet.yaml
INF 🤖 Which resulted in 1 Kubernetes resources (branch: main)
INF 🤖 Which resulted in 1 Argo CD Applications or ApplicationSets (branch: main)
DBG Selecting Application[Sets] for branch (branch: main)
INF 🤖 Selected all 1 Application[Sets] (branch: main)
INF 🤖 Patching 1 Application[Sets] (branch: main)
DBG Skipping source: {{.repoURL}} (repoURL does not match jsws/test) (AppSet: "my-appset [b|appSet.yaml]") (patchType: redirectSource)
DBG Patched 1 Application[Sets] (branch: main)
INF 🤖 Fetching all files for branch (branch: jsws-diff-test)
DBG Fetching all files in dir: target-branch
DBG Found 1 yaml files in dir 'target-branch'
INF 🤖 Found 1 files in dir 'target-branch' (branch: jsws-diff-test)
DBG In dir 'target-branch' found yaml file: appSet.yaml
INF 🤖 Which resulted in 1 Kubernetes resources (branch: jsws-diff-test)
INF 🤖 Which resulted in 1 Argo CD Applications or ApplicationSets (branch: jsws-diff-test)
DBG Selecting Application[Sets] for branch (branch: jsws-diff-test)
INF 🤖 Selected all 1 Application[Sets] (branch: jsws-diff-test)
INF 🤖 Patching 1 Application[Sets] (branch: jsws-diff-test)
DBG Skipping source: {{.repoURL}} (repoURL does not match jsws/test) (AppSet: "my-appset [t|appSet.yaml]") (patchType: redirectSource)
DBG Patched 1 Application[Sets] (branch: jsws-diff-test)
DBG Skipping application because it has not changed (AppSet: my-appset)
INF 🤖 Skipping identical applications between base and target branches
DBG filtering 1 Applications for duplicates
DBG removed 1 duplicates
DBG filtering 1 Applications for duplicates
DBG removed 1 duplicates
INF 🤖 Skipped 1 Application[Sets] in base branch because it has an identical copy in the target branch
INF 🤖 Keeping the remaining 0 Application[Sets] for the base branch
INF 🤖 Skipped 1 Application[Sets] in target branch because it has an identical copy in the base branch
INF 🤖 Keeping the remaining 0 Application[Sets] for the target branch
INF 👀 Found no applications to process in either branch
INF ✨ Total execution time: 0s

Application causing problems (if applicable)

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: "my-appset"
  namespace: argocd
spec:
  goTemplate: true
  goTemplateOptions: ["missingkey=error"]
  generators:
    - list:
        elements:
          - repoURL: "https://github.com/jsws/test.git"
  template:
    metadata:
      name: 'my-app'
      namespace: argocd
    spec:
      destination:
        namespace: 'mynamespace'
        server: "https://kubernetes.default.svc"
      project: default
      sources:
        - repoURL: '{{.repoURL}}'
          targetRevision: 'main'
          path: helm/my-chart
          helm: {}

Parameters

✨ Running v0.2.3 (2026-04-12T14:02:04Z) with:
✨ - using cluster with Argo CD pre-installed
✨ - base-branch: main
✨ - target-branch: jsws-diff-test
✨ - secrets-folder: ./secrets
✨ - output-folder: ./output
✨ - argocd-namespace: argocd
✨ - repo: jsws/test
✨ - timeout: 180 seconds
✨ - debug: true - This is slower because it will do more checks
✨ - files-changed: <auto-detected>
✨ --- Fail on applications with invalid watch-pattern annotation
✨ --- Include applications with no watch-pattern annotation

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions