From fd7c61e2fe7dbce010d11c4ce4e5352b27102c70 Mon Sep 17 00:00:00 2001 From: oleksandr-codefresh Date: Fri, 20 May 2022 18:36:06 +0300 Subject: [PATCH] [application.go]: all resources event for application in deletion process should be considered as prunning --- server/application/application.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/application/application.go b/server/application/application.go index d2e05a2e94e90..305b577d0458c 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -1178,6 +1178,12 @@ func getResourceEventPayload( actualState.Manifest = "" } + if a.ObjectMeta.DeletionTimestamp != nil { + // resource should be deleted in case if application in process of deletion + desiredState.CompiledManifest = "" + actualState.Manifest = "" + } + if a.Status.OperationState != nil { syncStarted = a.Status.OperationState.StartedAt syncFinished = a.Status.OperationState.FinishedAt