v3.6.0-rc1: Server-Side Diff false negative — Application Synced while live CR spec field differs from desired state (state-dependent, managedFields ownership)
v3.6.0-rc1: Server-Side Diff false negative — Application Synced while live CR spec field differs from desired state
Summary
On argocd v3.6.0-rc1 (all components), an Application with ServerSideApply=true reported Synced/Healthy for ~40 minutes while a live custom-resource spec field differed from the desired state. No sync operation was initiated (log: Skipping auto-sync: application status is Synced on every refresh). Creation of missing objects worked throughout — only the in-place field update was invisible. After a one-time server-side force-apply rewrote the object's managedFields ownership, in-place changes to the same object and subtree diff and auto-apply correctly within one reconcile cycle — on the same controller process (no restart). The false negative appears to be state-dependent on the live object's managedFields ownership shape.
Environment
- argocd:
v3.6.0-rc1(chartargo-cd-10.8.4withglobal.image.tag: v3.6.0-rc1, all 8 images) - Kubernetes:
v1.35.7(k0s), 3 nodes, embedded etcd - Application syncOptions:
ServerSideApply=true,ApplyOutOfSyncOnly=true,RespectIgnoreDifferences=true,SkipDryRunOnMissingResource=true,Validate=false,PruneLast=true,PrunePropagationPolicy=foreground; automatedprune+selfHeal application.resourceTrackingMethod: annotation;timeout.reconciliation: 120s; noresource.compareoptions.*; noignoreDifferencesmatching the kind- Affected object:
PrometheusCR (monitoring.coreos.com/v1, prometheus-operator v0.94.1 co-managesf:statusonly), fieldspec.storage.volumeClaimTemplate.spec.storageClassName(fast→fast-bulk)
What happened (all times UTC 2026-09-29)
- Git change to the field pushed; repo-server rendered target correctly (verified — see "Render parity" below)
- 16:34–17:13: controller refreshed/compared 15+ times (controller log diff cycles 38–183 ms each), app stayed
Synced,status.resources173/173 Synced, zero conditions, no sync op - 16:47/16:54: missing objects from the same render batch (grafana PVC, loki StatefulSet after manual delete) were created by self-heal in seconds — creation path unaffected
- 17:13: manual
kubectl patch(strategic merge) set live value to the desired one; app stayedSynced(now genuinely equal)
Elimination evidence
| Hypothesis | Ruled out by |
|---|---|
| Desired state actually matched live | Ran the v3.6.0-rc1 image's own binaries (kustomize 5.8.1 + helm 4.3.0, same --enable-helm --load-restrictor LoadRestrictionsNone) against the same tree: byte-identical 86807-line render, target declared storageClassName: fast-bulk |
| managedFields missing cluster-wide | Census with --show-managed-fields: 1236/1236 workload/config objects and 667/667 CRDs carry managedFields across all writer classes |
| ignoreDifferences / global compareoptions | App spec + argocd-cm + AppProject inspected: none matching the kind |
| Mutating webhook stripping/normalizing | 42 mutating webhooks / 18 configurations, none matching monitoring.coreos.com Prometheus; kyverno has zero ClusterPolicies |
| Silenced SSA conflict | kubectl diff --server-side --field-manager=argocd-controller reproduces conflicts loudly (Error from server (Conflict)); per controller/state.go at the rc1 tag a diff error produces ComparisonError + Sync=Unknown — the app had zero conditions and was Synced |
| #28818 regression | excludeManagerOwnedAncestors fix verified present in the in-tree gitops-engine at the tag (go.mod replace … => ./gitops-engine) |
| CRD schema pruning / preserve-unknown-fields | Live and rendered CRD both fully structural on the path; storageClassName declared; no x-kubernetes-preserve-unknown-fields |
The state-dependence (post-incident reproduction attempt)
After the incident, the manual patch had left a kubectl-patch (Update op) managedFields entry owning the field. We ran a one-time:
kubectl apply --server-side --field-manager=argocd-controller --force-conflicts -f <rendered Prometheus CR>Ownership of f:spec.f:storage.f:volumeClaimTemplate.f:spec.f:storageClassName moved to an argocd-controller Apply entry (the Update-op entry is retained by the apiserver — separate known behavior). We then probed the same subtree with a sacrificial in-place change: spec.storage.volumeClaimTemplate.metadata.labels + one label, added and later removed:
- Add: app
OutOfSyncwithin one cycle → auto-sync applied within 43 s (both the CR label and a ConfigMap control label) - Remove:
OutOfSync→ applied within 2 cycles - Same controller pod throughout (started before the original blind window; no restart)
So the diff engine now sees in-place changes on the exact object/subtree that was blind — with a different managedFields ownership shape than during the window.
During the blind window, the argocd-controller Apply entry on the CR (timestamp 2026-09-24, unchanged through the window) did not list f:storageClassName under f:spec.f:storage.f:volumeClaimTemplate.f:spec (it listed f:accessModes, f:resources) — while the field existed live with the old value and the desired manifest declared it. We could not fully reconstruct whether argocd owned the field at that moment (the manual patch's Update op later rewrites ownership), but if the running Apply entry genuinely lacked the leaf while the target declared it, removeWebhookMutation's manager-ownership filtering of the dry-run result is the plausible swallow point.
Relation to known issues
Symptom class matches the #28818 / #18038 / #23171 / #28980 family (Synced-but-drifted under SSA/SSD), but: #28818's fix is in rc1 and its trigger shape (preserve-unknown-fields container pruning) is absent here; #28980 is a sync-path skip with the diff working, ours had no sync op at all. The 3.6-line SSD rewrite (#29103 "Default to SSD with SSA and remove SMD") landed between 3.5.x (where large in-place CR changes diffed and synced correctly on the same cluster — verified live on 2026-09-24) and rc1.
Questions
- Is there a known state of live managedFields (e.g. leaf field unowned by any manager, or owned only by an Update-op entry) under which server-side diff yields a false
Modified=falsefor a declared desired field? - Any guidance on instrumenting the controller to dump
predictedLive/filter decisions per resource (loglevel/metric) so the swallow point can be pinned if it recurs?
Happy to provide controller logs, app specs, and managedFields snapshots.
Related reports and fix attempts (same defect family)
- #28976 — same symptom class (empty diff despite Desired ≠ Live), resolved by reporter as stale helm manager ownership + wildcard managedFieldsManagers ignore. This report has no matching ignoreDifferences; the masking entry here is argocd's own Apply ownership shape
- #28861 — inverse symptom (phantom OutOfSync from stale argocd-controller ownership), same managedFields-shape sensitivity
- #28980 — sibling: dry-run detects drift, real sync path skips the resource
- PR #29789 (closed unmerged) —
WithTrustedManagersforremoveWebhookMutation; its body describes the exact swallow point hypothesized here: "removeWebhookMutation trusts any field manager other than the applier itself … Everything else gets reverted to its live value". If that analysis is correct, the residual blind shape in this report is the same mechanism from the false-negative direction
Reproduction note (state-dependence is the key)
The false negative reproduces only when argocd's Apply managedFields entry lacks a leaf the desired manifest declares, on an object previously touched by an out-of-band manager (e.g. kubectl patch). A one-time kubectl apply --server-side --field-manager=argocd-controller --force-conflicts on the rendered manifest heals the shape and the SAME field path then diffs correctly (verified by sacrificial probe, 43s apply). Shape-dependent, not CRD- or webhook-dependent: core-kind in-place changes on the same install diff correctly throughout
Source: argoproj/argo-cd