Speed up CI by reusing builds and avoiding standalone artifact copies - #4745
Speed up CI by reusing builds and avoiding standalone artifact copies#4745thomhurst wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe pipeline now reuses compiled Release outputs. Distributed instances share one build-output artifact restore. Solution builds can be skipped when CI already built them. Unit tests restore shared output explicitly, and CI runs the pipeline with ChangesBuild Output Sharing
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change reuses successful Release build outputs and avoids redundant CI build work while retaining normal build behavior when reuse is disabled. The shared restore and workflow paths have focused coverage, with no current merge-blocking risk identified. Sequence Diagram(s)sequenceDiagram
participant CI
participant BuildSolutionsModule
participant BuildOutputSharing
participant RunUnitTestModule
participant ArtifactContext
CI->>BuildSolutionsModule: Start with BuildAlreadyCompleted=true
BuildSolutionsModule-->>CI: Skip solution build
RunUnitTestModule->>BuildOutputSharing: RestoreAsync
BuildOutputSharing->>ArtifactContext: Download shared build-output
ArtifactContext-->>BuildOutputSharing: Restore compiled outputs
BuildOutputSharing-->>RunUnitTestModule: Return restored output
RunUnitTestModule->>RunUnitTestModule: Discover and run tests
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 6 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 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 |
Code reviewReviewed the CI build-reuse change (workflow diff, What I checked and confirmed is sound:
No actionable bugs or CLAUDE.md violations found. CodeRabbit's automated pass also reported no merge-blocking risk (only a docstring-coverage nit, which is a style/documentation concern rather than a correctness issue). |
CI currently builds every solution before launching the pipeline, then evaluates the same solutions again and stages a build artifact even when all tests run in the same checkout. In run 34016562116, BuildSolutionsModule took 3m 6s and uploaded a 2.7 GB archive after the native build had already completed.
This change reuses the successful Release build through Pipeline__BuildAlreadyCompleted and launches the pipeline with --no-build. Standalone runs use their existing outputs without staging or restoring an archive. Distributed runs retain artifact publication and share one in-flight/completed restore per pipeline process. The required-check job also uses sparse checkout for its single validation script.
BuildSolutionsModule still completes successfully as a dependency when reusing outputs, and ordinary runs still build when the new setting is false. Validation coverage and existing routing remain unchanged. The sampled overhead identifies the work removed; end-to-end savings still need measurement in CI.
Validation:
Summary by CodeRabbit
New Features
CI/CD