Repository navigation
pr-plan and pr-apply: progress lines, blocked and already-applied settles, and reports a viewer can read mid-run (#4007) - #4083
Merged
Conversation
…ied settles, and --report-url (#4007) pr-apply prints a line on stderr as each wave starts and as each component settles. With --events-json, pr-apply and components fan-out settle a component a failed or gated dependency held back as blocked, naming it in blockedBy, and one an earlier attempt applied as already-applied; the run-event schema gains both statuses and blockedBy within contract 1 (chant 0.124.29). --progress-json is unchanged. pr-plan and pr-apply take --report-url <s3 or file URL>, which copies pr-<stage>.json, change-set.json and pr-<stage>.events.jsonl to <url>/<pr>/<commit>/[<member>/], the events again after each wave, component and run settle, one upload in flight at a time. s3 goes through the AWS CLI. The pull-request pipeline generators take events and reportUrl (chant build --pr-loop --events-json --report-url), which add the flags and CHANT_RUN_EVENTS_DIR to both jobs. (#4007)
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.
Closes #4007
A viewer can follow a pull request's apply while it runs: the job log shows each wave and component, the reports and the event stream are copied where a reader outside CI can fetch them (mid-run for the events), and the generated pipelines can turn this on. Components that did not run now settle as
blockedoralready-applied.pr-applyprints on stderr, with or without--events-json, one line as each wave starts (wave 1/2: net) and one as each component settles (net: applied,app: blocked by net, not run,net: already applied in an earlier attempt,failed,stopped at its own gate,waiting on a decision).--events-json(run-event v1, from run events: emitters in the local runtime, run --components, fountain, and pr-plan/pr-apply #4041);--progress-jsonis not added, and the docs say so.--report-url <file:// or s3://>onpr-planandpr-applycopiespr-<stage>.json,change-set.jsonandpr-<stage>.events.jsonlto<url>/<pr>/<commit>/[<member>/](<pr>isunknownwhen no pull request is found). The events file is named per stage, because a fast-forward merge runs plan and apply on one commit. With--events-json, the events file is uploaded again after every wave, component and run settle (one upload at a time; settles that arrive meanwhile go up together), so a viewer reading the URL sees each wave as it applies. A failed mid-run upload is one warning and the apply carries on; a final upload runs at the end.file://writes a temp file and renames it;s3://runsaws s3 cp -(the AWS CLI, as the aws lexicon'ss3-syncdoes). chant passes and prints no credentials. Theaws s3call is in the egress catalogue.events: trueandreportUrl, which add--events-json,--report-urlandCHANT_RUN_EVENTS_DIR=.chant/pr/run-eventsto both jobs on GitHub, GitLab and Forgejo (the events directory sits inside the report artifact).chant build --pr-loop --events-json --report-url <url>sets them. The default output is unchanged.pr-applyandcomponents fan-out:{"type":"component-settle","wave":2,"component":"app","status":"blocked","blockedBy":"net"} {"type":"component-settle","wave":1,"component":"net","status":"already-applied"}component-start. Ablockedsettle follows the wave whose failure held it back;already-appliedsettles come afterrun-start, before the first wave, with the wave from the original plan. A reader that knows only ok/failed/gated/waiting still parses every line.blockedByis optional.guide/pull-request-ci.mdx(coveringCHANT_RUN_EVENTS_DIRfor CI), and the components and build CLI pages.Level-0 output changes
On the exceptions page and #2525:
pr-applyprints the new stderr lines; with--events-json,pr-applyandfan-outemitblockedandalready-appliedsettles;chant run eventstext addsby <dependency>to a blocked line;--report-urlis new.Acceptance
pr-planandpr-applystream the events (done in run events: emitters in the local runtime, run --components, fountain, and pr-plan/pr-apply #4041 as--events-json, the run-event stream;--progress-jsonnot added).pr-applyprints one line as each wave starts and as each component settles (pr.test.ts).--report-urlcopiespr-<stage>.jsonandchange-set.json(and the events) keyed by pull request and commit (pr-report-url.test.ts, and thepr.test.tscase that reads thefile://events file during wave 2 and finds wave 1's settle).build.test.ts).pr.test.ts,fan-out.test.ts).Checks
npx tsx scripts/typecheck.ts: no regressions (26 baselined)npx tsx scripts/check-lexicons.ts: no untracked tier-1 failuresno-listener,no-egress, level-0 goldens: 246 passed withGITHUB_SHA,GITHUB_RUN_IDandCIset, after rebasing on mainlint-docs-sentences(no regressions),lint-prompts,check-docs-diataxis,./scripts/build-docs.sh: passchant/lifecyclewas unchanged.