Create a retention policy for job logs
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Manual Cleanup Options
Self Managed Only - https://docs.gitlab.com/administration/cicd/job_logs/#how-to-remove-job-logs
Self Managed Only - https://docs.gitlab.com/administration/cicd/job_artifacts_troubleshooting/#delete-old-job-logs-and-artifacts-for-a-project
API Endpoint - The primary method mentioned is the Erase a Job API, which allows deletion of individual job logs through the API.
What did we learn?
| Results |
|---|
|
|
Primary Workflows for Job Logs:
Duration of Job Log Access:
Challenges in Managing Artifact Storage:
Additional Needs and Improvements:
Compliance Requirements:
Background: This research is part of https://gitlab.com/gitlab-org/ux-research/-/issues/2971+, conducted in May 2024. It targeted Dev team leads, platform engineers and software developers from a mix of SMB and enterprise-size customers. The goal was to determine specific use cases for restricting download access to artifacts and to understand how job logs are used and how long they need to be retained. The survey ran for a month, yielding 12 valid responses. Of these, 53% were from technology companies involved in creating pipelines, writing code, and running tests. Additionally, 54% of respondents use Self-Managed GitLab, while 23% use GitLab.com. |
|
Proposal (v1 scope - draft) - Updated Sept 21 2026
- Introduce a job log retention period for new projects only - Following this period, the job logs will be permanently deleleted
- Job logs will be retained for maximum 6 months on GitLab.com (exact period TBD to be confirmed with Legal/Compliance)
- An administrator on a Self Managed/Dedicated instance can override this value
- For retroactive job log cleanup - we can choose one of the following options
- Option 1: Add an opt-in admin task. For customers who want the policy applied to already-stored logs, we propose a separate administrator-triggered task that stamps expiry dates onto existing logs in batches, with deletion still handled by the existing cleanup path.
- Option 2: Updated API for bulk removal action. This solution is detailed in Introduce additional parameters to bulk delete ... (#14495)
Later phases
- Group/Project owners select a lower value than set by instance admin