Skip to content

Implement deleted objects for expired artifacts

What does this MR do?

Related issues: https://gitlab.com/gitlab-org/gitlab/-/issues/233939, https://gitlab.com/gitlab-org/gitlab/-/issues/223034, #220422 (closed)

This merge request builds on top of !39464 (merged) to efficiently destroy expired job artifacts by:

  • copying object storage attributes from ci_job_artifacts into ci_deleted_objects
  • aggregating project_statistics updates for each project. If we have more than one artifact from a project, it will do a single update for that project
  • deleting job_artifacts with a single SQL query.

It also fixes #267529 (closed) because it touches the same code.

SQL queries:

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Marius Bobin

Merge request reports