Description
Checklist:
- I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
- I've included steps to reproduce the bug.
- I've pasted the output of
argocd version
.
Describe the bug
When using server-side diff with the removeWebHookMutation option, it will not show removal of fields in the diff. This was found specifically on an App of apps where an app removed the 'source' field and replaced with sourceHydrator. The diff does not show removal of the source field.
To Reproduce
- Sync a Live Application with source field
kubectl get applications ssd-test -n argocd -o yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd.argoproj.io/tracking-id: app:argoproj.io/Application:argocd/ssd-test
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"argoproj.io/v1alpha1","kind":"Application","metadata":{"annotations":{"argocd.argoproj.io/tracking-id":"app:argoproj.io/Application:argocd/ssd-test"},"name":"ssd-test","namespace":"argocd"},"spec":{"destination":{"namespace":"kustomize-guestbook","server":"https://kubernetes.default.svc"},"project":"default","source":{"path":"kustomize-guestbook","repoURL":"https://github.com/argoproj/argocd-example-apps","targetRevision":"HEAD"}}}
creationTimestamp: "2025-05-16T05:11:26Z"
generation: 102
name: ssd-test
namespace: argocd
resourceVersion: "145975"
uid: 76a9c322-6655-4a5c-af95-61dd7e75004e
spec:
destination:
namespace: kustomize-guestbook
server: https://kubernetes.default.svc
project: default
source:
path: kustomize-guestbook
repoURL: https://github.com/argoproj/argocd-example-apps
targetRevision: HEAD
- Make a change in Git to remove source and add sourceHydrator fields
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true
argocd.argoproj.io/manifest-generate-paths: .;../base;/argocd-kustomize/base
argocd.argoproj.io/tracking-id: argocd-argo:argoproj.io/Application:dev-argocd-usw2-argo/argocd-itg
labels:
argocd.intuit.com/wave: '2'
dr-argocd.intuit.com/skip-import: 'true'
name: argocd-itg
namespace: dev-argocd-usw2-argo
spec:
destination:
namespace: dev-argocd-usw2-itg
server: https://kubernetes.default.svc
project: argocd
sourceHydrator:
drySource:
path: argocd-kustomize/envs/itg/usw2
repoURL: https://github.intuit.com/sbseg-cdp/cdp-deployments.git
targetRevision: master
syncSource:
path: argocd/itg
targetBranch: wave/2/west
syncPolicy:
syncOptions:
- ServerSideApply=true
Expected behavior
Diff shows removal and additions
Version
argocd version
argocd: v2.14.9+38985bd.dirty
BuildDate: 2025-04-02T23:02:54Z
GitCommit: 38985bdcd6c3b031fb83757a1fb0c39a55bf6a24
GitTreeState: dirty
GoVersion: go1.24.2
Compiler: gc
Platform: darwin/amd64
argocd-server: v3.1.0+ba9ad75.dirty
BuildDate: 2025-05-16T07:02:21Z
GitCommit: ba9ad75ac755c377e635395db734485461432195
GitTreeState: dirty
GoVersion: go1.24.1
Compiler: gc
Platform: darwin/amd64
Kustomize Version: v5.4.3 2024-07-19T16:40:33Z
Helm Version: v3.16.1+g5a5449d
Kubectl Version: v0.32.2
Jsonnet Version: v0.21.0-rc2