Optimize remote CI artifact parsing and size validation
What does this MR do and why?
Removes the ci_optimize_artifact_parsing feature flag, making the optimized remote artifact parsing path the default. Remote (object storage) artifacts are now always downloaded once in Ci::Artifactable#each_blob, with the local copy reused for both decompressed-size validation and parsing, instead of one download for validation plus a chunked re-download for parsing. The decompressed-size check now always caps its output with head at the size limit, so gzip stops decompressing as soon as an archive is known to be oversized.
This also removes the code paths the flag made unreachable:
- the unlimited
gzip -dc | wc -cpipeline inGitlab::Ci::DecompressedGzipSizeValidator - the validator-internal Faraday tempfile download of remote files in
Gitlab::Ci::Artifacts::DecompressedArtifactSizeValidator
Note on external dependencies: the size-check pipeline now always shells out to head in addition to the previously required gzip and wc. This adds no new package requirement — head and wc both ship in coreutils (present in the Omnibus supported distros, the CNG Debian base, and the UBI micro base via coreutils-single), and gzip is already explicitly installed in the CNG images.
The flag has been enabled on GitLab.com for over a week with no issues observed.
References
- Rollout issue: #605502 (closed)
- Feature issue: https://gitlab.com/gitlab-org/gitlab/-/issues/605350
- MR that introduced the flag: !244619 (merged)
Screenshots or screen recordings
Not applicable — no UI changes.
How to set up and validate locally
-
Configure object storage for artifacts (for example, MinIO in GDK) with
direct_uploadenabled. -
Run a pipeline with a job that produces a JUnit report or dotenv artifact, for example:
test: script: - echo "MY_VAR=hello" >> build.env artifacts: reports: dotenv: build.env -
Confirm the artifact is parsed after the job finishes (dotenv variables available to dependent jobs, or test report results visible on the pipeline), and that
Ci::BuildFinishedWorkerraises no errors.
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.