Make test resource cleanup scripts more efficient
General resource cleanup scripts have been stabilized to prevent blocking deployments with efforts in https://gitlab.com/gitlab-com/gitlab-OKRs/-/work_items/5451 but there are improvements to be made to delete-test-resources
and Delete failed test resources weekly
scripts.
General overview:
-
delete-test-resources
runs after test pipelines on live environments and is supposed to delete resources created by tests that have passed. -
Delete failed test resources weekly
scheduled pipeline is supposed to run once a week on live environments to delete resources created by tests that have failed. -
General test resource cleanup
scheduled pipeline is run in varying frequencies on each live environment to delete any test resources that are under given sandbox-groups and test users.
Action items:
-
Delete resources immediately instead of scheduling for deletion - gitlab-org/gitlab!142743 (merged) -
Investigate and fix subgroups and other test resources not being deleted in delete-test-resources
script - gitlab-org/gitlab!143852 (merged) -
Address 403 Forbidden failures in delete-test-resources
script e.g. https://ops.gitlab.net/gitlab-org/quality/staging/-/jobs/12615489 - partially covered by gitlab-org/gitlab!147178 (merged) -
Add QA::Resource::CICDSettings
and possibly others to ignored resources - gitlab-org/gitlab!147178 (merged) -
Address 404 failures of resources associated with a previously deleted group - gitlab-org/gitlab!147178 (merged) -
Add missing naming patterns to General test resource cleanup
scripts - #2541 (closed) -
Refactor General test resource cleanup
scripts - gitlab-org/gitlab!149331 (merged) -
Add personal snippet deletion to General test resource cleanup
scripts - gitlab-org/quality/pipeline-common!407 (merged) -
Once delete-test-resources
script andDelete failed test resources weekly
are running more efficiently, reduce the frequency ofGeneral test resource cleanup
pipeline - gitlab-org/gitlab!151087 (merged)
Future iterations: (Recorded as issues in &24)
-
Investigate a way to delete test users and thei... (#2608) -
Old PATs need cleaning up as well: https://gitlab.com/gitlab-org/gitlab/-/issues/457099#note_1871915474 -
Clean up users created by tests in the General test resource cleanup
pipeline: #2649 -
Move access tokens needed for cleanup scripts t... (#2657)
Edited by Désirée Chevalier