Repository navigation
feat(affected): --plan-out / --plan-in plan replay and phase timings - #380
Merged
Merged
Conversation
…print phase timings The detect job's --matrix analysis can be written with --plan-out and reused by each lane with --plan-in when the key (SHAs, mode, flags, version, changed and dirty content, project and lane config) still matches. Otherwise affected analyses as before and says why. affected also prints one line of phase timings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
ArchDev is watching this pull request. State: settled (cycle 1 of 1 for head 9b06d12).
Paused by the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review on ArchCode
Problem and author intent
firstlanding's PR CI runs
aster affected test-ci --related --matrixin a detect job, then every test job runsaster affected test-ci --related --lane=Xagain. Each of about 29 test jobs spends 25 to 33 s in the same--relatedanalysis before its first target. That's about 248 vCPU × 25 s per PR run.The goal: test jobs reuse the detect job's plan when nothing that affects the plan changed, and fall back to fresh analysis otherwise. A second goal is to show where
affected's planning time goes.What changed
--matrixand--dry-runtake--plan-out FILE. It writes every lane's plan, the selected projects and command overrides.affected --lane X --plan-in FILEuses the stored plan when the key matches and the lane is present.[aster] --plan-in FILE: <reason>; analysing insteadline and analyses as before..aster/excluded;depends_on, each project's config content, and the rootaster.toml.src/cli/plan_replay.rs.src/cli/phases.rs).affectedprints one stderr line, for example:[aster] affected phases: discover 1.1s, changes 0.6s, plan-in 0.0s, graph 0.0s, related 22.3s, select 0.2s, narrow 0.1s, quarantine 0.3s, total 24.6s.--quietsuppresses it.(replayed plan).docs/ci/github-actions.md(detect job and test job wiring) andskills.md.Unchanged: without
--plan-in,affectedbehaves exactly as before.Scope and risk
CLI only. Medium risk, because a stale replay would run the wrong tests. Three things limit that:
aster.tomlreplayed an old lane. That's fixed and pinned byan_edited_lane_config_is_not_replayed_even_with_a_pinned_head.User impact
Two new opt-in flags and one timing line on stderr.
Testing
a_lane_runs_from_the_plan_exactly_as_the_analysis_runs_itintests/plan_replay.rs. It runs the realasterbinary against a git fixture:--matrix --plan-out, then runs a lane with--plan-in.an_edited_lane_config_is_not_replayed_even_with_a_pinned_head.every_run_of_affected_reports_where_its_time_wentcovers the timing line.tests/related.rs.cargo fmt --check, clippy-D warnings,cargo doc -D warnings, andcargo test --all-targets --all-features.Follow-ups
ASTER_VERSIONand passes--plan-outin the detect job and--plan-inin the test jobs.src/git/affected.rsandtests/related.rs, so whichever merges second may need a rebase.🤖 Generated with Claude Code