Project API Response: Artifacts are not truly expired

Summary

The issue started after October 8, as verified by checking: Job from Oct 9: https://gitlab.com/maxondev/dev/redshift/core/redshiftcore/-/jobs/11660459278 Specifically the API: https://gitlab.com/api/v4/projects/46208769/jobs/11660459278 artifacts already removed, but actually still exist and is downloadable: https://gitlab.com/api/v4/projects/46208769/jobs/11660459278/artifacts

Job from Oct 6: https://gitlab.com/maxondev/dev/redshift/core/redshiftcore/-/jobs/11624178604 https://gitlab.com/api/v4/projects/46208769/jobs/11624178604 Artifacts removed, and they do not exist in the api response nor is it downloadable.

So, all the relevant affected pipelines are after Oct. 8th. Checked on the basis of dates mentioned https://about.gitlab.com/releases/categories/releases/

Steps to reproduce

Using any project, set the expire_in value for any artifact to 5 minutes, and make 2 dummy commits so that we get 2 pipeline runs.

The first pipeline that ran should have its artifact expired 5 minutes after the second pipeline runs (IF the Keep artifacts from most recent successful jobs setting is ON).

Once it is expired as per the front end, try to check the api response: https://gitlab.com/api/v4/projects/\<proj_id>/jobs/<job_id>/artifacts One would expect a 404 since its supposedly deleted, however we are able to download expired artifacts.

Example Project

https://gitlab.com/maxondev/dev/experiments/project-one/-/tree/TOOLS-5024/debug-artifact-expiration?ref_type=heads

I have set up my branch on this project to test this exactly and I found that I could reproduce the behaviour.

What is the current bug behavior?

Artifacts that are supposedly deleted as per the frontend are still (indefinitely?) available on the backend.

What is the expected correct behavior?

Once it is said to be removed in the frontend, it should also be in the backend.

Relevant logs and/or screenshots

https://gitlab.com/api/v4/projects/35160500/jobs/11972625688

https://gitlab.com/maxondev/dev/experiments/project-one/-/jobs/11972625688

As can be seen that the job artifacts were removed 22 hours ago.

However when I curl https://gitlab.com/api/v4/projects/35160500/jobs/11972625688/artifacts i.e. curl -L --header "PRIVATE-TOKEN: <access_token>" --output artifacts.zip "https://gitlab.com/api/v4/projects/35160500/jobs/11972625688/artifacts"

Output of checks

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   326  100   326    0     0    551      0 --:--:-- --:--:-- --:--:--   551
100   178  100   178    0     0    225      0 --:--:-- --:--:-- --:--:--   225

Results of GitLab environment info


Results of GitLab application Check


Possible fixes


Patch release information for backports


High-severity bug remediation

Edited by 🤖 GitLab Bot 🤖