Deleting pipeline via API is leaking storage space
New pipeline delete functionality does not delete artifacts associated with deleted pipeline/jobs. This means they are kept in filesystem/S3 and project statistics are not updated.
Additionally since the entries are removed from DB, it may be very hard to find and purge these files.
Introduced by !22988 (merged)
Steps to reproduce
Delete pipeline which has jobs with any artifacts (trace, artifacts, ...)
Observe statistics not changing.
Look at S3 bucket - file is present.
Look at DB, no reference to the file.
What is the current bug behavior?
Artifacts are kept without any reference to them.
What is the expected correct behavior?
Artifacts are removed.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
GitLab CE 11.6.5 omnibus install with artifacts in AWS S3.
Reproduced on gitlab.com
destroy_all instead of
destroy in https://gitlab.com/gitlab-org/gitlab-ce/blob/de605ad1437e8e0beb5da76c900623dd541e1f72/app/services/ci/destroy_pipeline_service.rb#L10