[Question] Will enabling "Default Artifact Expiration" in the admin menu clean out old artifacts? Or will only *new* artifacts have that expiration?



Will setting Default artifacts expiration to a nonzero value in the admin menu clean out old artifacts? Or will only new artifacts have that expiration?


I ask because my local instance previously had a Default artifacts expiration set to 0. One project in particular is generating a bunch of artifacts and is growing too big for my liking, so a few days ago I changed Default artifacts expiration to 30 days. However, the total project size (repo+artifacts) is still as big as ever.

I’ve verified that the expire_build_artifacts_worker cron job is running and I’ve also run it manually a couple times.

Related GitLab CE Issue: #40007


We were hard pressed on space on out gitlab server, so we did manually clean out artifacts (we did that by running some queries on the database insipred by https://gitlab.com/JonathonReinhart/gitlab-artifact-cleanup/issues/3) from old jobs within a few hours after setting a default, but duing those hours we saw no indication that gitlab wanted to clean up itself, and the oldest build that had artifacts lying around was 2½ years old.

So I think the answer is that only new artifacts get the expiration you set as default.

I have no idea why no gitlab employee has provided a clear answer to such a simple question, my best guess is that they care more about new features than about maintenance.