Loading
Batch-load job artifacts in CiJob.artifacts
Implements all three review follow-ups from #629124 (closed), raised during review of !254893 (merged):
Types::Ci::JobType#artifactsnow batch-loadsjob_artifactswithBatchLoader::GraphQL, preloading through the association soinverse_ofkeepsartifact.jobloaded anddownloadPathcosts no extra query. This removes the one-query-per-job N+1 in theget_pipelineartifacts facet and everywhere elseCiJob.artifactsis selected. A resolver-level preload was not possible: the pipeline jobs collection mixes bridges and generic commit statuses, which have nojob_artifactsassociation. QueryRecorder examples pin the query count at the MCP facet and at the GraphQL.jobs.artifacts+downloadPathpath with a mixed build-and-bridge pipeline.- Both facet tools,
get_jobandget_pipeline, gained an expired-artifact example that assertsexpired: trueand checks the timestamp serialization. - The
get_pipelinedocs now describe thefirstrow as counting jobs rather than artifacts in the artifacts facet, using the reviewer's suggested wording verbatim.
Independent of !254894 (merged) and merges on its own.
Closes #629124 (closed)
Edited by Tian Gao