[Bug] The `artifacts:expire_in` in .gitlab-ci.yml does not practically work.

Summary

  • Even after artifacts expire through expire_in in .gitlab-ci.yml, the size of them marked as deleted is not reflected in the project storage, and the download link (https://gitlab.com/<namespace>/<project>/-/jobs/<job_number>/artifacts/download) is still valid.

  • The artifacts:expire_in in .gitlab-ci.yml does not practically seem to work.

Steps to reproduce

Artifacts removed Project storage
image image
  • This job artifacts (about 8MB) were removed automatically by expire_in, but project storage has not been reduced.

  • Also, the download link (https://gitlab.com/<namespace>/<project>/-/jobs/<job_number>/artifacts/download) is still valid.

Note: This job artifacts were removed 1 week ago.

  • So I clicked the trash icon at the top right of the job’s trace.
Job erased Project storage
image image
  • Only now, the size of the deleted artifacts is reflected in the project storage(422.3MB -> 413.5MB), and the download link (https://gitlab.com/<namespace>/<project>/-/jobs/<job_number>/artifacts/download) is also no longer valid.

What is the current bug behavior?

  • Even after artifacts expire through expire_in in .gitlab-ci.yml, they are not practically removed, but are removed only when the job log is deleted by clicking the trash icon.

  • The size of artifacts marked as deleted is not reflected in the project storage, and the download link (https://gitlab.com/<namespace>/<project>/-/jobs/<job_number>/artifacts/download) is still valid.

What is the expected correct behavior?

  • After artifacts expire through expire_in in .gitlab-ci.yml, they have to be deleted completely.

Output of checks

  • This bug happens on GitLab.com

Related Support Tickets (internal)

  1. https://gitlab.zendesk.com/agent/tickets/160514
  2. https://gitlab.zendesk.com/agent/tickets/157755
Edited by Mycroft Kang