Skip to content

Add locked column to Ci::PipelineArtifact

Stan Hu requested to merge sh-add-locked-column-to-ci-pipeline-artifacts into master

What does this MR do and why?

This adds a locked column to the ci_pipeline_artifacts table to make it possible to query expired and unlocked artifacts more efficiently. By default, the value will be unknown, but this value will be populated by the CI pipeline locked state.

This merge request also adds a partial index on expire_at for locked = 0.

This uses a similar denormalization approach for ci_job_artifacts introduced in !68893 (merged). This will allow us to remove CI pipeline artifacts efficiently.

Relates to #372500 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports