CI: replace usn git resource with partial-clone task - #717
Conversation
The git resource does a full clone of canonical/ubuntu-security-notices on every get, regardless of sparse_paths/depth config - vex/ and osv/ dominate the repo (34GB at HEAD) even though usn/, the only directory any consumer reads, is 570MB. Benchmarked on a real worker: plain clone 8909s/58.5GB vs. partial+shallow+sparse clone 43s/664MB cold, 2s warm. ai-assisted=yes [TNZ-88995]
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe pipeline removes the Git resource for Ubuntu security notices. Three CVE-related jobs now run the Merge Risk: ⚪ Minimal · up to This change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Description checkExplanation The description provides a detailed summary of the implementation, root cause, benchmark results, cache behavior, and related pipeline changes. The merge-forward and AI review guidance in the template are process instructions rather than missing change details. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Replace the
(os)-usn-gh-jsongit resource with a task(
fetch-usn-gh-json) doing a partial clone (--filter=blob:none --depth 1) + cone sparse-checkout scoped tousn/, cached acrossbuilds via
caches:so warm runs do an incrementalfetch+reset --hardinstead of a full clone.Root cause: the stock
gitresource does a plaingit cloneregardless of
sparse_paths/depthconfig - sparse-checkout onlytrims the working-tree checkout, not what's fetched into
.git/objects.vex/(23.8GB) andosv/(9.8GB) dominate the repoat HEAD;
usn/, the only directory any of the 3 consuming tasksreads, is 570MB.
Benchmarked cold on a real Concourse worker via
fly execute(not a pipeline change):
~207x faster cold, ~88x smaller, effectively free once cached.
Dropped the resource's
passed: [process-high-critical-cves]pin oncheck-usn-packages-are-available- that job's actual purpose ischecking USN fix-availability against the live apt repo state, so
always-fetch-latest is correct behavior, not a regression.
Added
serial: truetocheck-usn-packages-are-availableto preventconcurrent builds racing on the same worker-scoped clone cache.