Skip to content

Changes to build environment variables are not considered when detecting changes(for git) #24911

@BadLiveware

Description

@BadLiveware

Describe the bug

When repo-server computes whether there has been an actual change between two revisions it only takes into account if there has been git file changes
https://github.com/argoproj/argo-cd/blob/master/reposerver/repository/repository.go#L3074-L3099

To Reproduce

  1. Create an application with a git source targeting a tag or HEAD or a branch. Use a build environment variable, e.g. $ARGOCD_APP_REVISION as a helm parameter or any other kind of app parameter
  2. Push a change that does not do anything else other than update the build environment - Nothing happens, argocd will assume nothing has changed
  3. Hard-refresh, will cause build environment changes to be taken into account and a sync will occur.

Expected behavior
ArgoCD to take used build environment variables into account when deciding whether or not something has changed.

Version

❯ argocd version
argocd: v3.1.0+unknown
  BuildDate: 2025-08-14T08:24:54Z
  GitCommit:
  GitTreeState:
  GitTag: 3.1.0
  GoVersion: go1.24.6
  Compiler: gc
  Platform: linux/amd64
argocd-server: v3.1.7+511ebd7
  BuildDate: 2025-09-22T22:21:06Z
  GitCommit: 511ebd799e64f9af6484feaa84a5e718a77620d5
  GitTreeState: clean
  GoVersion: go1.24.6
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v5.7.0 2025-06-28T07:00:07Z
  Helm Version: v3.18.4+gd80839c
  Kubectl Version: v0.33.1
  Jsonnet Version: v0.21.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriage/pendingThis issue needs further triage to be correctly classified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions