Test sweepers are rarely used in practice: they only run when explicitly invoking make sweep locally, never in CI. However, when they are used, they can fail because resources are deleted before their dependents are cleaned up. E.g. a volume cannot be deleted while a snapshot of it still exists.
The resource.Sweeper struct has a Dependencies []string field that guarantees named sweepers run first. None of the current 9 sweepers use it.
Fix is small: add Dependencies to the relevant resource.AddTestSweepers calls. Low priority given limited practical use.
Test sweepers are rarely used in practice: they only run when explicitly invoking
make sweeplocally, never in CI. However, when they are used, they can fail because resources are deleted before their dependents are cleaned up. E.g. a volume cannot be deleted while a snapshot of it still exists.The
resource.Sweeperstruct has aDependencies []stringfield that guarantees named sweepers run first. None of the current 9 sweepers use it.Fix is small: add
Dependenciesto the relevantresource.AddTestSweeperscalls. Low priority given limited practical use.