-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Closed
argoproj/gitops-engine
#747Labels
bugSomething isn't workingSomething isn't workingcomponent:diffIssue related to diff problems and unexpected errors during diffIssue related to diff problems and unexpected errors during difffeature:server-side-diffIssue about the server side diff featureIssue about the server side diff featureversion:2.13Latest confirmed affected version is 2.13Latest confirmed affected version is 2.13version:3.1Latest confirmed affected version is 3.1Latest confirmed affected version is 3.1
Description
Describe the bug
An application that set an ignoreDifferences
on a required field of a manifest spec will fail to diff if both RespectIgnoreDifferences
and ServerSideDiff
are enabled
To Reproduce
Create an application with the following spec:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true
...
spec:
ignoreDifferences:
- group: apps
kind: Deployment
name: foo
jqPathExpressions:
- '.spec.template.spec.containers[] | select(.name == "foo").image'
syncPolicy:
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
- RespectIgnoreDifferences=true
- ServerSideApply=true
- Validate=false
...
Expected behavior
Diff app without errors
Version
argocd: v2.10.1+a79e0ea
BuildDate: 2024-02-14T17:37:43Z
GitCommit: a79e0eaca415461dc36615470cecc25d6d38cefb
GitTreeState: clean
GoVersion: go1.21.3
Compiler: gc
Platform: linux/amd64
Logs
Failed to compare desired state to live state: failed to calculate diff: error calculating server side diff: serverSideDiff error: error running server side apply in dryrun mode for resource Deployment/foo: Deployment.apps "foo" is invalid: spec.template.spec.containers[0].image: Required value
adberger, maxbrunet, noamApps and afarbos
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcomponent:diffIssue related to diff problems and unexpected errors during diffIssue related to diff problems and unexpected errors during difffeature:server-side-diffIssue about the server side diff featureIssue about the server side diff featureversion:2.13Latest confirmed affected version is 2.13Latest confirmed affected version is 2.13version:3.1Latest confirmed affected version is 3.1Latest confirmed affected version is 3.1