Filtering for expired artifacts backend support added
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
add backend support for expired artifacts
related to issue:#388882 (closed)
References
screen recordings
| screen record | |
|---|---|
| back_expire_artifact |
query plan :
- gdk rails console
- run following code in console
- query=Ci::Build.with_expired_artifacts
- query.explain
query plan text:
- query = Ci::Build.with_expired_artifacts
- query.explain
EXPLAIN SELECT DISTINCT p_ci_builds.* FROM "p_ci_builds" INNER JOIN "p_ci_job_artifacts" ON "p_ci_job_artifacts"."partition_id" IS NOT NULL AND "p_ci_job_artifacts"."job_id" = "p_ci_builds"."id" AND "p_ci_job_artifacts"."partition_id" = "p_ci_builds"."partition_id" WHERE "p_ci_builds"."type" = 'Ci::Build' AND (p_ci_job_artifacts.expire_at < '2025-08-10 21:52:46.158146' AND p_ci_job_artifacts.expire_at IS NOT NULL)
query plan screenshot:
How to set up and validate locally
- git pull branch and checkout
- start gdk
- visit any project with expired artifacts
- visit http://gdk.test:3000/-/graphql-explorer
- paste getjobartifacts query present in text file
- query: query.txt
(in my gdk setup)
- git pull 388882_backend_filtering_for_expired_artifacts and checkout
- start gdk
- visit project http://gdk.test:3000/gitlab-org/new-project (project with expired artifacts)
- visit http://gdk.test:3000/-/graphql-explorer
- paste getjobartifacts query present in text file
- use above query in text file
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Brian Williams
