From cf89dda36bb4ac4c62b90f34bd2bc5fe437af2c5 Mon Sep 17 00:00:00 2001 From: hasheddan Date: Sun, 28 Mar 2021 11:35:18 -0500 Subject: [PATCH] Set status to deleting even when external resource does not exist Updates the status of managed resource to be set to deleting in the case where an external resource does not exist, but we fail to unpublish connection or remove finalizer. Signed-off-by: hasheddan --- pkg/reconciler/managed/reconciler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/reconciler/managed/reconciler.go b/pkg/reconciler/managed/reconciler.go index 6984409..e40f517 100644 --- a/pkg/reconciler/managed/reconciler.go +++ b/pkg/reconciler/managed/reconciler.go @@ -627,9 +627,9 @@ func (r *Reconciler) Reconcile(_ context.Context, req reconcile.Request) (reconc if meta.WasDeleted(managed) { log = log.WithValues("deletion-timestamp", managed.GetDeletionTimestamp()) + managed.SetConditions(xpv1.Deleting()) if observation.ResourceExists && managed.GetDeletionPolicy() != xpv1.DeletionOrphan { - managed.SetConditions(xpv1.Deleting()) if err := external.Delete(externalCtx, managed); err != nil { // We'll hit this condition if we can't delete our external // resource, for example if our provider credentials don't have