Open sivchari opened 3 months ago
I encountered this in my operator code that imports the module github.com/argoproj/argo-cd/v2
as well when I tried to create the ApplicationSet
with CreateOrUpdate
from controllerruntime
.
What I did as a workaround was to add an equality function:
equality.Semantic.AddFunc(func(a, b argov1alpha1.ApplicationDestination) bool {
return a.Name == b.Name && a.Namespace == b.Namespace && a.Server == b.Server
})
This is documented in the DeepEquals
function from apimachinery:
...
// Unexported field members cannot be compared and will cause an informative panic; you must add an Equality
// function for these types.
func (e Equalities) DeepEqual(a1, a2 interface{}) bool {
...
}
What's your argocd version?
Hello,
I have this exact same issue with the helm chart v7.6.12 => argo-cd v2.12.6
Checklist:
argocd version
.Describe the bug
ApplicationDestination field has private field named isServerInferred. So if we use this spec to compare the old spec and new one, the code must fail due to following error.
https://github.com/argoproj/argo-cd/pull/2808 has implemented this field and this error is caused by this.
To Reproduce
Expected behavior
Can compare this spec.
Screenshots
Version
Logs