feat: add opt-in checkout-bundle option to run-task#983
Conversation
Add a per-project `--{project}-checkout-bundle=<dest>` option to the
run-task script. When set, run-task writes a `.tar.zst` archive of the
checkout's working tree (excluding `.git`/`.hg`) right after checkout, so
a decision task can publish its checkout as an artifact that downstream
tasks fetch via `fetches:` instead of re-cloning.
The archive uses the same `.tar.zst` format as fetch-content's
git-checkout-archive and is created fail-fast: archiving errors exit
non-zero rather than leaving a broken artifact behind.
Merging this PR will improve performance by 12.27%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_transform_sequence |
6.9 ms | 6.1 ms | +12.27% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing hneiva/checkout-bundle (f1e3827) with main (81f3b38)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #983 +/- ##
==========================================
+ Coverage 78.53% 78.61% +0.07%
==========================================
Files 132 132
Lines 12437 12460 +23
Branches 1510 1497 -13
==========================================
+ Hits 9767 9795 +28
+ Misses 2282 2269 -13
- Partials 388 396 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I don't think this belongs in run-task if it's meant for the decision task to use? I'm also curious why you decided to tar up the checkout, excluding the vcs data, instead of the other way around. |
Add a per-project
--{project}-checkout-bundle=<dest>option to the run-task script. When set, run-task writes a.tar.zstarchive of the checkout's working tree (excluding.git/.hg) right after checkout, so a decision task can publish its checkout as an artifact that downstream tasks fetch viafetches:instead of re-cloning.The archive uses the same
.tar.zstformat as fetch-content's git-checkout-archive and is created fail-fast: archiving errors exit non-zero rather than leaving a broken artifact behind.