Skip to content

Wait for API delete to complete

Mark Lapierre requested to merge ml-wait-for-api-delete-to-complete into master

What does this MR do?

This makes the test framework wait for the resource to be deleted when we call remove_via_api!.

We need to wait because some resources (e.g., Project) and their associated tables are not deleted in a transaction, so a race condition can occur when GitLab tries to fetch a resource while it's being deleted. Associated tables can be deleted before the resource itself, and another request can retrieve the resource but fail when GitLab then tries to access attributes that are stored in an associated table that has already been deleted.

Attempts to fix #336907 (closed)

Does this MR meet the acceptance criteria?

Conformity

Edited by Mark Lapierre

Merge request reports