Skip to content

Commit ef346ed

Browse files
committed
OCPBUGS-63711: Remove pending items on gcp no-op
The GCP Destroy process should remove pending items when a no-op error has occurred. Currently the process is to warn the user, but the items should be removed from the list of pending items to be deleted otherwise it will hold up the deprovision process indefinitely.
1 parent 4651c46 commit ef346ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/destroy/gcp/gcp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,12 @@ func (o *ClusterUninstaller) handleOperation(ctx context.Context, op *compute.Op
448448
}
449449

450450
if err != nil {
451+
o.resetRequestID(identifier...)
451452
if isNoOp(err) {
452453
o.Logger.Debugf("No operation found for %s %s", resourceType, item.name)
454+
o.deletePendingItems(item.typeName, []cloudResource{item})
453455
return nil
454456
}
455-
o.resetRequestID(identifier...)
456457
return fmt.Errorf("failed to delete %s %s: %w", resourceType, item.name, err)
457458
}
458459

0 commit comments

Comments
 (0)