Hi Communities,
We are currently using the following GitLab versions:
Versions:
- GitLab: 16.9 (self-hosted using Docker and Kubernetes)
- GitLab Runner: 16.8
- Storage on: Minio.
Problem:
- I am working on clearing project storage, with the largest usage coming from trace logs, specifically
jobs.log
in the artifacts for each job runner. - I have researched several documents on this.
- During my research, I noticed that, somehow, the trace logs are automatically deleted, keeping only the newest logs. This was unexpected as I didn’t anticipate automatic deletion.
- I found some old topic here said that the jobs.log wasn’t automatically remove. We have to create bash shell to remove it but I seems not correctly with this version:
logging - How to delete gitlab job logs automatically after certain time? - Stack Overflow - Already, create a python script to clear a jobs.log on Minio but haven’t call API erase job to remove it from database (which still exists on UI but can’t found when click on it).
- I want to learn more about:
- Which job is responsible for cleaning the trace logs.
- What parameters this job uses and how to configure it.
- The logic behind this cleaning process.
Some information I’ve already found:
- The GitLab Admin panel shows a cron job running via Sidekiq, but I couldn’t identify the exact job responsible for cleaning the logs.
- We have CI/CD configuration that sets the trace expiration to 30 days.
Any document related will help.
Thank you very much for any one who read this.