[go: up one dir, main page]

Fix deletion logic for resources already marked for deletion

What does this MR do and why?

This fixes deletion logic issues in E2E test resource cleanup that were causing CI failures like in https://ops.gitlab.net/gitlab-org/quality/staging-canary/-/jobs/20320943

The deletion_successful? method was treating "already marked for deletion" API error responses as successful deletions, which caused the cleanup process to fail when trying to permanently delete resources that were already marked for deletion.

Proposed solution

  • Remove "already marked for deletion" responses from being considered successful
  • Add specific handling for these responses that proceeds with permanent deletion when PERMANENTLY_DELETE=true and treats the resource as successfully marked when permanent deletion is not requested

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading