Skip to content

Question - Base-branch render fails when upstream repo renames a Helm chart path before the PR merges #451

Description

@dvtsten

We use argocd-diff-preview in a pattern where application teams maintain their Argo CD Application manifests in a central GitOps repo, and their Helm charts in their own repos. When a team renames their Helm chart directory in their own repo and updates the path: in the Application manifest in the same workflow, argocd-diff-preview fails rendering the base-branch (before) state.

    sources:
    - repoURL: https://git-server/repo.git
      targetRevision: main
    - path: helm
    + path: deployment/helm

The base-branch Application still points to path: helm, but by the time argocd-diff-preview runs, the upstream repo has already renamed helm/ → deployment/helm/ on that branch. The tool tries to render the before state by fetching helm/ from upstream — which no longer exists — and fails:

❌ Application failed with error: failed to get manifests for application my-app [b|clusters/my-cluster/apps/my-app.yaml]: ArgoCD API error (code 2): helm: app path does not exist

The after-state render succeeds. The before-state failure is structural: the upstream repo has moved on, and there is no version of the before state that can be rendered against the current upstream branch.

Is there a supported way to handle this today? If not, would you consider a flag (e.g. --ignore-base-render-errors) or per-Application annotation support to allow the render to continue when only base-branch applications fail, rather than aborting the entire run? There's still value to be had in getting the rendered output, as we use argocd-diff-preview output to then pass on to kubeconform and other linting tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions