Efficiently remove expired artifacts in `ExpireBuildArtifactsWorker`
What does this MR do?
ExpireBuildArtifactsWorker is a cron worker for removing expired artifacts, however, it's not working today because of its inefficiency.
This merge request addresses the inefficiency. In fact, it improves the following things
ci_job_artifacts.expire_atcolumn for searching expired artifacts. This column has been indexed already. Also, it's easy to find target rows because each row represents one artifact unit.
- We don't need to consider legacy job artifacts anymore, since all rows have already been migrated by #46866 (closed)
This feature is behind
To enable this feature, execute
What are the relevant issue numbers?
Close #41057 (closed)
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- [-] Documentation created/updated via this MR
- Tests added for this feature/bug
- [-] Tested in all supported browsers
- Conforms to the code review guidelines
- Conforms to the merge request performance guidelines
- Conforms to the style guides
- Conforms to the database guides
- [-] Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
- Security reports checked/validated by reviewer