From f2d1da6d49c84794dc31f4eafb225235db441c1c Mon Sep 17 00:00:00 2001 From: akuitybot <105087302+akuitybot@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:38:35 -0800 Subject: [PATCH] chore(backport release-1.1): chore: clear app status op state (#3073) Co-authored-by: Kent Rancourt Co-authored-by: Hidde Beydals --- internal/directives/argocd_updater.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/directives/argocd_updater.go b/internal/directives/argocd_updater.go index afff0328d..b93d71283 100644 --- a/internal/directives/argocd_updater.go +++ b/internal/directives/argocd_updater.go @@ -536,6 +536,15 @@ func (a *argocdUpdater) syncApplication( for _, source := range app.Spec.Sources { app.Operation.Sync.Revisions = append(app.Operation.Sync.Revisions, source.TargetRevision) } + // TODO(krancour): This is a workaround for the Argo CD Application controller + // not handling this correctly itself. It is Argo CD's API server that usually + // handles this, but we are bypassing the API server here. + // + // See issue: https://github.com/argoproj/argo-cd/issues/20875 + // + // We can remove this hack once the issue is resolved and all Argo CD versions + // without the fix have reached their EOL. + app.Status.OperationState = nil // Patch the Argo CD Application. if err := a.argoCDAppPatchFn(ctx, stepCtx, app, func(src, dst unstructured.Unstructured) error {