@intentius/chant 0.124.89 → 0.124.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actor.d.ts +5 -3
- package/dist/actor.d.ts.map +1 -1
- package/dist/actor.js +7 -5
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/core.js +11 -1
- package/dist/ci-comment-commands.d.ts +18 -2
- package/dist/ci-comment-commands.d.ts.map +1 -1
- package/dist/ci-comment-commands.js +30 -2
- package/dist/ci-job-guard.d.ts +42 -45
- package/dist/ci-job-guard.d.ts.map +1 -1
- package/dist/ci-job-guard.js +206 -3
- package/dist/ci-note-commands.d.ts +41 -1
- package/dist/ci-note-commands.d.ts.map +1 -1
- package/dist/ci-note-commands.js +64 -5
- package/dist/ci-product.d.ts +50 -1
- package/dist/ci-product.d.ts.map +1 -1
- package/dist/ci-product.js +52 -6
- package/dist/cli/handlers/pr-comment.d.ts +13 -1
- package/dist/cli/handlers/pr-comment.d.ts.map +1 -1
- package/dist/cli/handlers/pr-comment.js +90 -1
- package/dist/cli/handlers/pr-notes.d.ts.map +1 -1
- package/dist/cli/handlers/pr-notes.js +23 -1
- package/dist/cli/handlers/pr.d.ts +2 -2
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +41 -20
- package/dist/cli/handlers/run-wave.d.ts.map +1 -1
- package/dist/cli/handlers/run-wave.js +154 -4
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +17 -0
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +28 -0
- package/dist/cli/registry.d.ts +12 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/pr-checks.d.ts +39 -1
- package/dist/components/pr-checks.d.ts.map +1 -1
- package/dist/components/pr-checks.js +45 -2
- package/dist/components/pr-pipeline.d.ts +11 -3
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +20 -7
- package/dist/components/product-pipeline.d.ts +54 -2
- package/dist/components/product-pipeline.d.ts.map +1 -1
- package/dist/components/product-pipeline.js +63 -6
- package/dist/components/product-plan.d.ts +92 -2
- package/dist/components/product-plan.d.ts.map +1 -1
- package/dist/components/product-plan.js +172 -22
- package/dist/floor-table.data.d.ts.map +1 -1
- package/dist/floor-table.data.js +37 -23
- package/dist/lexicon-module.d.ts +2 -0
- package/dist/lexicon-module.d.ts.map +1 -1
- package/dist/lexicon-module.js +6 -2
- package/dist/lexicon.d.ts +82 -4
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-applied.d.ts +9 -0
- package/dist/lifecycle/gate-applied.d.ts.map +1 -1
- package/dist/op/apply-status.d.ts +84 -0
- package/dist/op/apply-status.d.ts.map +1 -0
- package/dist/op/apply-status.js +106 -0
- package/dist/op/before-merge-decide.d.ts +102 -0
- package/dist/op/before-merge-decide.d.ts.map +1 -0
- package/dist/op/before-merge-decide.js +142 -0
- package/dist/op/before-merge-done.d.ts +56 -0
- package/dist/op/before-merge-done.d.ts.map +1 -0
- package/dist/op/before-merge-done.js +69 -0
- package/dist/op/before-merge-store.d.ts +20 -0
- package/dist/op/before-merge-store.d.ts.map +1 -0
- package/dist/op/before-merge-store.js +48 -0
- package/dist/op/before-merge.d.ts +150 -0
- package/dist/op/before-merge.d.ts.map +1 -0
- package/dist/op/before-merge.js +207 -0
- package/dist/op/follow-on-run.d.ts +117 -0
- package/dist/op/follow-on-run.d.ts.map +1 -0
- package/dist/op/follow-on-run.js +154 -0
- package/dist/op/follow-on-store.d.ts +17 -0
- package/dist/op/follow-on-store.d.ts.map +1 -0
- package/dist/op/follow-on-store.js +54 -0
- package/dist/op/gate.d.ts +6 -0
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/gate.js +10 -1
- package/dist/op/index.d.ts +3 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/index.js +1 -0
- package/dist/op/op-waves-after-plan.d.ts +13 -0
- package/dist/op/op-waves-after-plan.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.d.ts +4 -1
- package/dist/op/op-waves-evidence-jobs.d.ts.map +1 -1
- package/dist/op/op-waves-evidence-jobs.js +10 -2
- package/dist/op/op-waves-follow-on.d.ts +162 -0
- package/dist/op/op-waves-follow-on.d.ts.map +1 -0
- package/dist/op/op-waves-follow-on.js +355 -0
- package/dist/op/op-waves-run.d.ts +146 -6
- package/dist/op/op-waves-run.d.ts.map +1 -1
- package/dist/op/op-waves-run.js +871 -99
- package/dist/op/op-waves-split.d.ts +122 -0
- package/dist/op/op-waves-split.d.ts.map +1 -0
- package/dist/op/op-waves-split.js +166 -0
- package/dist/op/op-waves.d.ts +20 -0
- package/dist/op/op-waves.d.ts.map +1 -1
- package/dist/op/op-waves.js +15 -1
- package/dist/op/schedule-overdue.d.ts +15 -1
- package/dist/op/schedule-overdue.d.ts.map +1 -1
- package/dist/op/schedule-overdue.js +18 -2
- package/dist/op/stage-hooks.d.ts +36 -1
- package/dist/op/stage-hooks.d.ts.map +1 -1
- package/dist/op/stage-hooks.js +17 -3
- package/dist/op/wave-stop.d.ts +4 -1
- package/dist/op/wave-stop.d.ts.map +1 -1
- package/dist/op/wave-stop.js +4 -2
- package/dist/planned-files.d.ts +16 -8
- package/dist/planned-files.d.ts.map +1 -1
- package/dist/planned-files.js +12 -8
- package/dist/pr-post.d.ts +6 -0
- package/dist/pr-post.d.ts.map +1 -1
- package/dist/pr-post.js +7 -5
- package/dist/release-floors.d.ts +9 -1
- package/dist/release-floors.d.ts.map +1 -1
- package/dist/release-floors.js +27 -19
- package/dist/wave-blocked.d.ts +7 -1
- package/dist/wave-blocked.d.ts.map +1 -1
- package/dist/wave-blocked.js +7 -2
- package/dist/wave-runtime.mjs +364 -351
- package/package.json +1 -1
- package/src/actor.test.ts +14 -1
- package/src/actor.ts +8 -6
- package/src/audit/core.ts +13 -1
- package/src/audit/first-load.test.ts +101 -0
- package/src/ci-comment-commands.test.ts +63 -0
- package/src/ci-comment-commands.ts +43 -4
- package/src/ci-image.test.ts +1 -2
- package/src/ci-job-guard.before-merge.test.ts +148 -0
- package/src/ci-job-guard.follow-on-record.test.ts +137 -0
- package/src/ci-job-guard.follow-on.test.ts +144 -0
- package/src/ci-job-guard.ts +221 -3
- package/src/ci-note-commands.test.ts +76 -1
- package/src/ci-note-commands.ts +96 -7
- package/src/ci-product.ts +65 -6
- package/src/cli/handlers/pr-comment.ts +85 -2
- package/src/cli/handlers/pr-notes.ts +30 -6
- package/src/cli/handlers/pr.ts +34 -17
- package/src/cli/handlers/run-wave.ts +144 -4
- package/src/cli/main.ts +17 -0
- package/src/cli/parse-args.ts +20 -0
- package/src/cli/registry.ts +12 -1
- package/src/components/pr-checks.ts +66 -2
- package/src/components/pr-pipeline.ts +21 -9
- package/src/components/product-pipeline.apply-status.test.ts +50 -0
- package/src/components/product-pipeline.ts +117 -9
- package/src/components/product-plan-names.test.ts +135 -0
- package/src/components/product-plan.test.ts +23 -5
- package/src/components/product-plan.ts +248 -25
- package/src/floor-table.data.ts +37 -23
- package/src/lexicon-module.ts +6 -2
- package/src/lexicon.ts +78 -1
- package/src/lifecycle/gate-applied.ts +7 -0
- package/src/op/apply-status.test.ts +83 -0
- package/src/op/apply-status.ts +132 -0
- package/src/op/before-merge-decide.ts +190 -0
- package/src/op/before-merge-done.ts +99 -0
- package/src/op/before-merge-store.ts +44 -0
- package/src/op/before-merge.test.ts +201 -0
- package/src/op/before-merge.ts +266 -0
- package/src/op/follow-on-run.ts +206 -0
- package/src/op/follow-on-store.ts +54 -0
- package/src/op/gate.ts +16 -1
- package/src/op/index.ts +5 -0
- package/src/op/op-waves-after-plan.ts +13 -0
- package/src/op/op-waves-evidence-jobs.ts +11 -3
- package/src/op/op-waves-follow-on-record.test.ts +152 -0
- package/src/op/op-waves-follow-on.test.ts +247 -0
- package/src/op/op-waves-follow-on.ts +385 -0
- package/src/op/op-waves-render-spec.test.ts +1 -2
- package/src/op/op-waves-run.ts +971 -93
- package/src/op/op-waves-split-product.test.ts +288 -0
- package/src/op/op-waves-split-step.test.ts +298 -0
- package/src/op/op-waves-split.test.ts +196 -0
- package/src/op/op-waves-split.ts +189 -0
- package/src/op/op-waves.ts +28 -3
- package/src/op/schedule-overdue.test.ts +29 -1
- package/src/op/schedule-overdue.ts +27 -3
- package/src/op/stage-hooks.ts +52 -4
- package/src/op/wave-stop.ts +5 -3
- package/src/planned-files.test.ts +33 -0
- package/src/planned-files.ts +26 -10
- package/src/pr-post.ts +13 -5
- package/src/release-floors.ts +31 -19
- package/src/wave-blocked.ts +9 -4
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Op waves before merge, split so the change's code never runs beside a
|
|
3
|
+
* write token (#4987).
|
|
4
|
+
*
|
|
5
|
+
* Maintainer decision (2026-11-10): in a pipeline with `beforeMerge` each
|
|
6
|
+
* wave is four jobs.
|
|
7
|
+
*
|
|
8
|
+
* 1. `<wave>-plan` runs the change's code and holds no write token: the
|
|
9
|
+
* checkout keeps no credentials, the job's token can only read (GitHub),
|
|
10
|
+
* and on GitLab its script drops `CHANT_FORGE_TOKEN` and the job token.
|
|
11
|
+
* `chant run wave --phase plan` plans the wave and saves the plan
|
|
12
|
+
* ({@link opWaveSavedPlanPath}, beside the plan files) as an artifact.
|
|
13
|
+
* 2. `<wave>-gate` runs the default branch's code alone, with the token:
|
|
14
|
+
* `--phase gate` reads the rules at base, takes the saved plan, refuses
|
|
15
|
+
* it when its digest is not the one its plan files give, writes the
|
|
16
|
+
* gate's pending fact or spends the approval on `chant/lifecycle`, and
|
|
17
|
+
* keeps the decision record, as a wide wave's deciding job does.
|
|
18
|
+
* 3. `<wave>` (or each share and job group's job) applies the saved plan,
|
|
19
|
+
* with no write token: `--phase apply` checks each plan file's digest
|
|
20
|
+
* against the decision and applies the ones that match. Its run record
|
|
21
|
+
* goes to a file ({@link opWaveRunRecordFileName}) in place of the ledger.
|
|
22
|
+
* 4. `<wave>-record` runs the default branch's code with the token:
|
|
23
|
+
* `--phase record` writes those run records to the run ledger and exits
|
|
24
|
+
* as the wave's applying jobs did.
|
|
25
|
+
*
|
|
26
|
+
* A push run of the same pipeline takes the same four jobs. A pipeline
|
|
27
|
+
* without `beforeMerge` keeps one job per wave (or a deciding job and its
|
|
28
|
+
* shares), since a push runs merged code.
|
|
29
|
+
*
|
|
30
|
+
* A `step` spec (#4992) plans in the plan job's process; the saved plan
|
|
31
|
+
* keeps each run's step plan (its digest, effects and lock rows) without the
|
|
32
|
+
* engine's artifact. The gate job leases the rows the runs wait for and
|
|
33
|
+
* change, with no heartbeat, before it spends the approval, and the
|
|
34
|
+
* decision names the lease. The applying job plans its runs again through
|
|
35
|
+
* the step, as a share job does, and applies each whose plan digest the
|
|
36
|
+
* decision holds; it hands the release records to the record job, which
|
|
37
|
+
* writes them and lets go of the lease. A run whose plan moved is exit 4.
|
|
38
|
+
*
|
|
39
|
+
* A hook that holds the wave on another gate (#4992) in the plan or apply
|
|
40
|
+
* job reads that gate with no write token: approved, the wave goes on; still
|
|
41
|
+
* waiting, the job leaves the gate's pending fact to the gate job (a plan
|
|
42
|
+
* job's hold) or the record job (an apply job's), which records it, and the
|
|
43
|
+
* wave waits. A hold that asks chant to `record` the gate is spent before
|
|
44
|
+
* its hook runs again, so it fails in an applying job once approved.
|
|
45
|
+
*
|
|
46
|
+
* #4994: in the plan job, such a hold once approved waits, and the gate job
|
|
47
|
+
* spends the approval under its own rules at base, for a re-run of the hook
|
|
48
|
+
* at the wave's commit (an applied line with `rerun.head`). The plan job of
|
|
49
|
+
* the next run of that commit finds the line, with no finished line yet, and
|
|
50
|
+
* runs the hook again under it with `CHANT_HOLD_APPROVED`; the wave then
|
|
51
|
+
* plans on what the hook did. Its gate job writes the finished line from the
|
|
52
|
+
* hook's `CHANT_HOLD_FINISHED`, which the saved plan hands on
|
|
53
|
+
* (`holdsFinished`). Any other commit's job, and any job once the line is
|
|
54
|
+
* finished, reads the approval as spent.
|
|
55
|
+
*
|
|
56
|
+
* A product's hooks run in whichever job runs them (#4994): a hook its
|
|
57
|
+
* process serves by name (`inProcessHooks`) is called there in place of its
|
|
58
|
+
* command, and what the plan job's code keeps for the later jobs goes under
|
|
59
|
+
* {@link opWaveProductStateDir}.
|
|
60
|
+
*
|
|
61
|
+
* A `rest` wave (#4992) runs one wave per run: its four jobs run wave N,
|
|
62
|
+
* the last rendered one, or in a follow-on run the wave the run names
|
|
63
|
+
* (`--wave "${CHANT_WAVES_WAVE:-N}"`), and its record job starts the
|
|
64
|
+
* follow-on for the next wave the plan found (./op-waves-follow-on.ts).
|
|
65
|
+
* Its jobs carry `rest: true`.
|
|
66
|
+
*/
|
|
67
|
+
import { type OpWaveJob, type OpWavesSpec } from "./op-waves.js";
|
|
68
|
+
/** The four jobs of a split wave (#4987). */
|
|
69
|
+
export type OpWavePhase = "plan" | "gate" | "apply" | "record";
|
|
70
|
+
export declare const OP_WAVE_PHASES: readonly OpWavePhase[];
|
|
71
|
+
/** One job of a split wave. `kind` is `decide` for the plan and gate jobs, `share` for an applying job and `wave` for the record job. */
|
|
72
|
+
export interface OpWaveSplitJob extends OpWaveJob {
|
|
73
|
+
phase: OpWavePhase;
|
|
74
|
+
/** The job checks out and runs the change's code: the plan and apply jobs. It holds no write token. */
|
|
75
|
+
runsChange: boolean;
|
|
76
|
+
/** A job of the `rest` wave (#4992): it runs the wave `CHANT_WAVES_WAVE` names, its own number by default. */
|
|
77
|
+
rest?: true;
|
|
78
|
+
}
|
|
79
|
+
/** Where a wave's plan job saves its plan, beside the run plan files the apply reads (#4987). */
|
|
80
|
+
export declare function opWaveSavedPlanDir(spec: Pick<OpWavesSpec, "name">, wave: number): string;
|
|
81
|
+
/**
|
|
82
|
+
* Where a product keeps what its own code in a split wave's later jobs reads
|
|
83
|
+
* (#4994): its report rows, the plans it read, a hook's state. It is inside
|
|
84
|
+
* the saved plan's directory, so every forge hands it from the plan job to
|
|
85
|
+
* the gate job and the applying jobs with the saved plan. The plan job runs
|
|
86
|
+
* the change's code, so a gate job reads it as a report, never as a rule.
|
|
87
|
+
*/
|
|
88
|
+
export declare function opWaveProductStateDir(spec: Pick<OpWavesSpec, "name">, wave: number): string;
|
|
89
|
+
/** The saved plan file itself. */
|
|
90
|
+
export declare function opWaveSavedPlanPath(spec: Pick<OpWavesSpec, "name">, wave: number): string;
|
|
91
|
+
/** The file an applying job leaves its run record in, in the outcome directory, for the record job (#4987). */
|
|
92
|
+
export declare function opWaveRunRecordFileName(wave: number, part?: {
|
|
93
|
+
group?: string;
|
|
94
|
+
share?: number;
|
|
95
|
+
}): string;
|
|
96
|
+
/** A run record file's name, as {@link opWaveRunRecordFileName} gives it; group 1 is the wave. */
|
|
97
|
+
export declare const OP_WAVE_RUN_RECORD_FILE: RegExp;
|
|
98
|
+
/**
|
|
99
|
+
* Refuse a spec whose waves cannot run as four jobs each, naming why. A
|
|
100
|
+
* `step` spec splits (#4992), and a `rest` wave runs one wave per run
|
|
101
|
+
* (./op-waves-follow-on.ts), so nothing is refused today.
|
|
102
|
+
*/
|
|
103
|
+
export declare function assertOpWavesSplit(_spec: Pick<OpWavesSpec, "name" | "waves">): void;
|
|
104
|
+
/** The job after which the waves after wave `k` start: its record job. */
|
|
105
|
+
export declare function opWaveRecordJobName(spec: Pick<OpWavesSpec, "waves">, k: number): string;
|
|
106
|
+
/**
|
|
107
|
+
* The split jobs of a before-merge pipeline (#4987), from `opWaveJobs`, in
|
|
108
|
+
* order: for each wave its plan job, its gate job, its applying jobs (the
|
|
109
|
+
* wave's own job, or each share and job group's job) and its record job.
|
|
110
|
+
* The plan job of each wave after the first needs the record job of the
|
|
111
|
+
* wave before; the gate needs the plan, each applying job the gate, and the
|
|
112
|
+
* record job every applying job and the gate, whose decision names the rows
|
|
113
|
+
* it leased (#4992).
|
|
114
|
+
*/
|
|
115
|
+
export declare function opWaveSplitJobs(spec: OpWavesSpec, jobs: readonly OpWaveJob[]): OpWaveSplitJob[];
|
|
116
|
+
/** The jobs a job after the waves needs in a split pipeline: the last wave's record job. */
|
|
117
|
+
export declare function opWaveSplitLastJobs(spec: Pick<OpWavesSpec, "waves">): string[];
|
|
118
|
+
/** What a split job calls itself in its guard's lines: `the plan job of wave 2 (prod) of tf-apply`, `share 1 of wave 2 (prod) of tf-apply`. */
|
|
119
|
+
export declare function opWaveSplitJobLabel(spec: string, job: Pick<OpWaveSplitJob, "phase" | "wave" | "waveName" | "share" | "group">): string;
|
|
120
|
+
/** The split jobs of wave `k`, by name, for a job after it (an apply status). */
|
|
121
|
+
export declare function opWaveSplitWaveJobs(jobs: readonly OpWaveSplitJob[], k: number): string[];
|
|
122
|
+
//# sourceMappingURL=op-waves-split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"op-waves-split.d.ts","sourceRoot":"","sources":["../../src/op/op-waves-split.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAGH,OAAO,EAAuC,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAEnG,6CAA6C;AAC7C,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE/D,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAAwC,CAAC;AAE1F,yIAAyI;AACzI,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,KAAK,EAAE,WAAW,CAAC;IACnB,uGAAuG;IACvG,UAAU,EAAE,OAAO,CAAC;IACpB,8GAA8G;IAC9G,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,iGAAiG;AACjG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAExF;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,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|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Op waves before merge, split so the change's code never runs beside a
|
|
3
|
+
* write token (#4987).
|
|
4
|
+
*
|
|
5
|
+
* Maintainer decision (2026-11-10): in a pipeline with `beforeMerge` each
|
|
6
|
+
* wave is four jobs.
|
|
7
|
+
*
|
|
8
|
+
* 1. `<wave>-plan` runs the change's code and holds no write token: the
|
|
9
|
+
* checkout keeps no credentials, the job's token can only read (GitHub),
|
|
10
|
+
* and on GitLab its script drops `CHANT_FORGE_TOKEN` and the job token.
|
|
11
|
+
* `chant run wave --phase plan` plans the wave and saves the plan
|
|
12
|
+
* ({@link opWaveSavedPlanPath}, beside the plan files) as an artifact.
|
|
13
|
+
* 2. `<wave>-gate` runs the default branch's code alone, with the token:
|
|
14
|
+
* `--phase gate` reads the rules at base, takes the saved plan, refuses
|
|
15
|
+
* it when its digest is not the one its plan files give, writes the
|
|
16
|
+
* gate's pending fact or spends the approval on `chant/lifecycle`, and
|
|
17
|
+
* keeps the decision record, as a wide wave's deciding job does.
|
|
18
|
+
* 3. `<wave>` (or each share and job group's job) applies the saved plan,
|
|
19
|
+
* with no write token: `--phase apply` checks each plan file's digest
|
|
20
|
+
* against the decision and applies the ones that match. Its run record
|
|
21
|
+
* goes to a file ({@link opWaveRunRecordFileName}) in place of the ledger.
|
|
22
|
+
* 4. `<wave>-record` runs the default branch's code with the token:
|
|
23
|
+
* `--phase record` writes those run records to the run ledger and exits
|
|
24
|
+
* as the wave's applying jobs did.
|
|
25
|
+
*
|
|
26
|
+
* A push run of the same pipeline takes the same four jobs. A pipeline
|
|
27
|
+
* without `beforeMerge` keeps one job per wave (or a deciding job and its
|
|
28
|
+
* shares), since a push runs merged code.
|
|
29
|
+
*
|
|
30
|
+
* A `step` spec (#4992) plans in the plan job's process; the saved plan
|
|
31
|
+
* keeps each run's step plan (its digest, effects and lock rows) without the
|
|
32
|
+
* engine's artifact. The gate job leases the rows the runs wait for and
|
|
33
|
+
* change, with no heartbeat, before it spends the approval, and the
|
|
34
|
+
* decision names the lease. The applying job plans its runs again through
|
|
35
|
+
* the step, as a share job does, and applies each whose plan digest the
|
|
36
|
+
* decision holds; it hands the release records to the record job, which
|
|
37
|
+
* writes them and lets go of the lease. A run whose plan moved is exit 4.
|
|
38
|
+
*
|
|
39
|
+
* A hook that holds the wave on another gate (#4992) in the plan or apply
|
|
40
|
+
* job reads that gate with no write token: approved, the wave goes on; still
|
|
41
|
+
* waiting, the job leaves the gate's pending fact to the gate job (a plan
|
|
42
|
+
* job's hold) or the record job (an apply job's), which records it, and the
|
|
43
|
+
* wave waits. A hold that asks chant to `record` the gate is spent before
|
|
44
|
+
* its hook runs again, so it fails in an applying job once approved.
|
|
45
|
+
*
|
|
46
|
+
* #4994: in the plan job, such a hold once approved waits, and the gate job
|
|
47
|
+
* spends the approval under its own rules at base, for a re-run of the hook
|
|
48
|
+
* at the wave's commit (an applied line with `rerun.head`). The plan job of
|
|
49
|
+
* the next run of that commit finds the line, with no finished line yet, and
|
|
50
|
+
* runs the hook again under it with `CHANT_HOLD_APPROVED`; the wave then
|
|
51
|
+
* plans on what the hook did. Its gate job writes the finished line from the
|
|
52
|
+
* hook's `CHANT_HOLD_FINISHED`, which the saved plan hands on
|
|
53
|
+
* (`holdsFinished`). Any other commit's job, and any job once the line is
|
|
54
|
+
* finished, reads the approval as spent.
|
|
55
|
+
*
|
|
56
|
+
* A product's hooks run in whichever job runs them (#4994): a hook its
|
|
57
|
+
* process serves by name (`inProcessHooks`) is called there in place of its
|
|
58
|
+
* command, and what the plan job's code keeps for the later jobs goes under
|
|
59
|
+
* {@link opWaveProductStateDir}.
|
|
60
|
+
*
|
|
61
|
+
* A `rest` wave (#4992) runs one wave per run: its four jobs run wave N,
|
|
62
|
+
* the last rendered one, or in a follow-on run the wave the run names
|
|
63
|
+
* (`--wave "${CHANT_WAVES_WAVE:-N}"`), and its record job starts the
|
|
64
|
+
* follow-on for the next wave the plan found (./op-waves-follow-on.ts).
|
|
65
|
+
* Its jobs carry `rest: true`.
|
|
66
|
+
*/
|
|
67
|
+
import { OP_WAVES_WAVE_ENV } from "./follow-on-run.js";
|
|
68
|
+
import { opWaveOutcomePath, opWaveRecordPath } from "./op-waves.js";
|
|
69
|
+
export const OP_WAVE_PHASES = ["plan", "gate", "apply", "record"];
|
|
70
|
+
/** Where a wave's plan job saves its plan, beside the run plan files the apply reads (#4987). */
|
|
71
|
+
export function opWaveSavedPlanDir(spec, wave) {
|
|
72
|
+
return `.chant/op-waves/${spec.name}/wave-${wave}`;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Where a product keeps what its own code in a split wave's later jobs reads
|
|
76
|
+
* (#4994): its report rows, the plans it read, a hook's state. It is inside
|
|
77
|
+
* the saved plan's directory, so every forge hands it from the plan job to
|
|
78
|
+
* the gate job and the applying jobs with the saved plan. The plan job runs
|
|
79
|
+
* the change's code, so a gate job reads it as a report, never as a rule.
|
|
80
|
+
*/
|
|
81
|
+
export function opWaveProductStateDir(spec, wave) {
|
|
82
|
+
return `${opWaveSavedPlanDir(spec, wave)}/product`;
|
|
83
|
+
}
|
|
84
|
+
/** The saved plan file itself. */
|
|
85
|
+
export function opWaveSavedPlanPath(spec, wave) {
|
|
86
|
+
return `${opWaveSavedPlanDir(spec, wave)}/saved-plan.json`;
|
|
87
|
+
}
|
|
88
|
+
/** The file an applying job leaves its run record in, in the outcome directory, for the record job (#4987). */
|
|
89
|
+
export function opWaveRunRecordFileName(wave, part = {}) {
|
|
90
|
+
const group = part.group !== undefined ? `-group-${part.group.replace(/[^A-Za-z0-9._-]/g, "_")}` : "";
|
|
91
|
+
const share = part.share !== undefined ? `-share-${part.share}` : "";
|
|
92
|
+
return `run-record-wave-${wave}${group}${share}.json`;
|
|
93
|
+
}
|
|
94
|
+
/** A run record file's name, as {@link opWaveRunRecordFileName} gives it; group 1 is the wave. */
|
|
95
|
+
export const OP_WAVE_RUN_RECORD_FILE = /^run-record-wave-(\d+)(?:-group-[A-Za-z0-9._-]+)?(?:-share-\d+)?\.json$/;
|
|
96
|
+
/**
|
|
97
|
+
* Refuse a spec whose waves cannot run as four jobs each, naming why. A
|
|
98
|
+
* `step` spec splits (#4992), and a `rest` wave runs one wave per run
|
|
99
|
+
* (./op-waves-follow-on.ts), so nothing is refused today.
|
|
100
|
+
*/
|
|
101
|
+
export function assertOpWavesSplit(_spec) { }
|
|
102
|
+
/** A wave job's command without `--decide`, which the plan and gate jobs take the place of; a rest wave's names the wave `CHANT_WAVES_WAVE` gives (#4992). */
|
|
103
|
+
function baseCommand(job, rest = false) {
|
|
104
|
+
const words = job.command.filter((w) => w !== "--decide");
|
|
105
|
+
if (!rest)
|
|
106
|
+
return words;
|
|
107
|
+
const at = words.indexOf("--wave");
|
|
108
|
+
return at < 0 ? words : [...words.slice(0, at + 1), `"\${${OP_WAVES_WAVE_ENV}:-${job.wave}}"`, ...words.slice(at + 2)];
|
|
109
|
+
}
|
|
110
|
+
/** The job after which the waves after wave `k` start: its record job. */
|
|
111
|
+
export function opWaveRecordJobName(spec, k) {
|
|
112
|
+
return `wave-${k}-${spec.waves[k - 1].name}-record`;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The split jobs of a before-merge pipeline (#4987), from `opWaveJobs`, in
|
|
116
|
+
* order: for each wave its plan job, its gate job, its applying jobs (the
|
|
117
|
+
* wave's own job, or each share and job group's job) and its record job.
|
|
118
|
+
* The plan job of each wave after the first needs the record job of the
|
|
119
|
+
* wave before; the gate needs the plan, each applying job the gate, and the
|
|
120
|
+
* record job every applying job and the gate, whose decision names the rows
|
|
121
|
+
* it leased (#4992).
|
|
122
|
+
*/
|
|
123
|
+
export function opWaveSplitJobs(spec, jobs) {
|
|
124
|
+
assertOpWavesSplit(spec);
|
|
125
|
+
const out = [];
|
|
126
|
+
for (let k = 1; k <= spec.waves.length; k++) {
|
|
127
|
+
const own = jobs.filter((j) => j.wave === k);
|
|
128
|
+
const first = own[0];
|
|
129
|
+
const prefix = `wave-${k}-${first.waveName}`;
|
|
130
|
+
const needs = k === 1 ? [] : [opWaveRecordJobName(spec, k - 1)];
|
|
131
|
+
// #4992: the rest wave's jobs run the wave a follow-on run names.
|
|
132
|
+
const rest = spec.waves[k - 1].rest === true;
|
|
133
|
+
const marks = rest ? { rest: true } : {};
|
|
134
|
+
const base = baseCommand(first, rest);
|
|
135
|
+
const plan = `${prefix}-plan`;
|
|
136
|
+
const gate = `${prefix}-gate`;
|
|
137
|
+
out.push({ jobName: plan, wave: k, waveName: first.waveName, kind: "decide", needs, command: [...base, "--phase", "plan"], outcome: opWaveOutcomePath(spec, k), phase: "plan", runsChange: true, ...marks });
|
|
138
|
+
out.push({ jobName: gate, wave: k, waveName: first.waveName, kind: "decide", needs: [plan], command: [...base, "--phase", "gate"], record: opWaveRecordPath(spec, k), outcome: opWaveOutcomePath(spec, k), phase: "gate", runsChange: false, ...marks });
|
|
139
|
+
const applying = first.kind === "wave" ? [first] : own.filter((j) => j.kind === "share");
|
|
140
|
+
for (const job of applying) {
|
|
141
|
+
// The wave's own applying job writes `-apply`, so it never reads its own outcome as the gate job's.
|
|
142
|
+
const outcome = job.kind === "wave" ? opWaveOutcomePath(spec, k, { apply: true }) : job.outcome;
|
|
143
|
+
out.push({ ...job, kind: "share", needs: [gate], command: [...baseCommand(job, rest), "--phase", "apply"], record: opWaveRecordPath(spec, k), outcome, phase: "apply", runsChange: true, ...marks });
|
|
144
|
+
}
|
|
145
|
+
out.push({ jobName: opWaveRecordJobName(spec, k), wave: k, waveName: first.waveName, kind: "wave", needs: [...applying.map((j) => j.jobName), gate], record: opWaveRecordPath(spec, k), command: [...base, "--phase", "record"], outcome: opWaveOutcomePath(spec, k), phase: "record", runsChange: false, ...marks });
|
|
146
|
+
}
|
|
147
|
+
return out;
|
|
148
|
+
}
|
|
149
|
+
/** The jobs a job after the waves needs in a split pipeline: the last wave's record job. */
|
|
150
|
+
export function opWaveSplitLastJobs(spec) {
|
|
151
|
+
return [opWaveRecordJobName(spec, spec.waves.length)];
|
|
152
|
+
}
|
|
153
|
+
/** What a split job calls itself in its guard's lines: `the plan job of wave 2 (prod) of tf-apply`, `share 1 of wave 2 (prod) of tf-apply`. */
|
|
154
|
+
export function opWaveSplitJobLabel(spec, job) {
|
|
155
|
+
const wave = `wave ${job.wave} (${job.waveName}) of ${spec}`;
|
|
156
|
+
if (job.phase !== "apply")
|
|
157
|
+
return `the ${job.phase} job of ${wave}`;
|
|
158
|
+
const share = job.share !== undefined ? `share ${job.share} of ` : "";
|
|
159
|
+
if (job.group !== undefined)
|
|
160
|
+
return `${share}job group ${job.group} of ${wave}`;
|
|
161
|
+
return share ? `${share}${wave}` : `the apply job of ${wave}`;
|
|
162
|
+
}
|
|
163
|
+
/** The split jobs of wave `k`, by name, for a job after it (an apply status). */
|
|
164
|
+
export function opWaveSplitWaveJobs(jobs, k) {
|
|
165
|
+
return jobs.filter((j) => j.wave === k).map((j) => j.jobName);
|
|
166
|
+
}
|
package/dist/op/op-waves.d.ts
CHANGED
|
@@ -368,6 +368,15 @@ export interface OpWave {
|
|
|
368
368
|
shares?: number;
|
|
369
369
|
/** The forge deployment environment the wave's jobs run in (GitHub and GitLab; Forgejo has none). */
|
|
370
370
|
environment?: OpEnvironment;
|
|
371
|
+
/**
|
|
372
|
+
* Before merge (#4992), the environment of the wave's plan job alone. A
|
|
373
|
+
* split wave's applying job is its deployment and names `environment`, so
|
|
374
|
+
* its reviewers approve the wave once; the plan job names none on GitHub
|
|
375
|
+
* (on GitLab it names `environment` with `action: prepare`, which deploys
|
|
376
|
+
* nothing). Name one here, with no required reviewers, when the plan needs
|
|
377
|
+
* an environment's secrets or its OIDC claim. Forgejo has none.
|
|
378
|
+
*/
|
|
379
|
+
planEnvironment?: OpEnvironment;
|
|
371
380
|
/** Variables for this wave's jobs alone. */
|
|
372
381
|
variables?: Record<string, string>;
|
|
373
382
|
/** Steps this wave's jobs run after the checkout, as `ScheduledOpSpec.setup`. */
|
|
@@ -745,6 +754,10 @@ export declare function opWaveBinArgv(bin?: string): string[];
|
|
|
745
754
|
* so a renamed wave cannot drop its login or report without a word.
|
|
746
755
|
*/
|
|
747
756
|
export declare function opWaveJobInputsByWave(spec: Pick<OpWavesSpec, "name" | "waves">, waveJobs: Readonly<Record<string, OpWaveJobInputs>> | undefined): Array<OpWaveJobInputs | undefined>;
|
|
757
|
+
/** The paths a product's wave job artifact keeps (#4994): `path`, one or a list. */
|
|
758
|
+
export declare function opWaveJobArtifactPaths(artifact: {
|
|
759
|
+
path: string | readonly string[];
|
|
760
|
+
}): string[];
|
|
748
761
|
/** A wave job's artifact name (#4791): `{job}` in `name` is the job's name. */
|
|
749
762
|
export declare function opWaveJobArtifactName(name: string, jobName: string): string;
|
|
750
763
|
/** The command a resume job runs, through the product's bin when it has one (#4607). */
|
|
@@ -811,6 +824,7 @@ export declare function opWaveChecksDir(spec: Pick<OpWavesSpec, "name">): string
|
|
|
811
824
|
export declare function opWaveOutcomePath(spec: Pick<OpWavesSpec, "name">, wave: number, part?: {
|
|
812
825
|
group?: string;
|
|
813
826
|
share?: number;
|
|
827
|
+
apply?: boolean;
|
|
814
828
|
}): string;
|
|
815
829
|
/** Refuse a spec no job could run, naming what is wrong. */
|
|
816
830
|
export declare function assertOpWavesSpec(spec: OpWavesSpec): void;
|
|
@@ -879,13 +893,19 @@ export declare function opWaveShare<T extends {
|
|
|
879
893
|
* With `renderSpec` (#4982) every command passes `--render-spec`: the job
|
|
880
894
|
* renders the spec at base through the product's command
|
|
881
895
|
* (`./op-waves-render-spec.ts`), and `spec` is the pipeline's shape.
|
|
896
|
+
* With `beforeMerge` (#4984) every command reads its base from
|
|
897
|
+
* `CHANT_WAVES_BASE` when the run checked out a pull request's decided
|
|
898
|
+
* head, else from the spec's `base` (or `HEAD^1`), as a push run does.
|
|
882
899
|
*/
|
|
883
900
|
export declare function opWaveJobs(spec: OpWavesSpec, specFile: string, options?: {
|
|
884
901
|
bin?: string;
|
|
885
902
|
renderSpec?: boolean;
|
|
903
|
+
beforeMerge?: boolean;
|
|
886
904
|
}): OpWaveJob[];
|
|
887
905
|
/** The job group a job applies (#3914), or undefined for a wave's own jobs. */
|
|
888
906
|
export declare function opWaveGroupOf(spec: OpWavesSpec, job: Pick<OpWaveJob, "wave" | "group">): OpWaveJobGroup | undefined;
|
|
907
|
+
/** Wave `k` of the spec, or past its waves the `rest` wave, which stands for each wave its plan found (#3821, #4992); undefined when there is none. */
|
|
908
|
+
export declare function opWaveAt(spec: Pick<OpWavesSpec, "waves">, k: number): OpWave | undefined;
|
|
889
909
|
/** The wave a job belongs to. */
|
|
890
910
|
export declare function opWaveOf(spec: OpWavesSpec, job: Pick<OpWaveJob, "wave">): OpWave;
|
|
891
911
|
//# sourceMappingURL=op-waves.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op-waves.d.ts","sourceRoot":"","sources":["../../src/op/op-waves.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAuB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAsE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,4B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,SAAS;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,CAEhH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,SAAS,EAAE,CAgDxJ;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,cAAc,GAAG,SAAS,CAEnH;AAED,uJAAuJ;AACvJ,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED,iCAAiC;AACjC,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,CAEhF"}
|
package/dist/op/op-waves.js
CHANGED
|
@@ -262,6 +262,10 @@ export function opWaveJobInputsByWave(spec, waveJobs) {
|
|
|
262
262
|
}
|
|
263
263
|
return names.map((name) => waveJobs?.[name]);
|
|
264
264
|
}
|
|
265
|
+
/** The paths a product's wave job artifact keeps (#4994): `path`, one or a list. */
|
|
266
|
+
export function opWaveJobArtifactPaths(artifact) {
|
|
267
|
+
return typeof artifact.path === "string" ? [artifact.path] : [...artifact.path];
|
|
268
|
+
}
|
|
265
269
|
/** A wave job's artifact name (#4791): `{job}` in `name` is the job's name. */
|
|
266
270
|
export function opWaveJobArtifactName(name, jobName) {
|
|
267
271
|
return name.split("{job}").join(jobName);
|
|
@@ -931,14 +935,19 @@ export function opWaveShare(runs, share, shares) {
|
|
|
931
935
|
* With `renderSpec` (#4982) every command passes `--render-spec`: the job
|
|
932
936
|
* renders the spec at base through the product's command
|
|
933
937
|
* (`./op-waves-render-spec.ts`), and `spec` is the pipeline's shape.
|
|
938
|
+
* With `beforeMerge` (#4984) every command reads its base from
|
|
939
|
+
* `CHANT_WAVES_BASE` when the run checked out a pull request's decided
|
|
940
|
+
* head, else from the spec's `base` (or `HEAD^1`), as a push run does.
|
|
934
941
|
*/
|
|
935
942
|
export function opWaveJobs(spec, specFile, options = {}) {
|
|
936
943
|
assertOpWavesSpec(spec);
|
|
937
944
|
const jobs = [];
|
|
938
945
|
let previous = [];
|
|
946
|
+
// #4984: before merge the base is the default branch's commit the run started at, which the head's checkout step exports.
|
|
947
|
+
const base = options.beforeMerge ? ["--base", `"\${CHANT_WAVES_BASE:-${(spec.base ?? "HEAD^1").replace(/["\\$`]/g, "\\$&")}}"`] : spec.base ? ["--base", spec.base] : [];
|
|
939
948
|
spec.waves.forEach((wave, index) => {
|
|
940
949
|
const k = index + 1;
|
|
941
|
-
const command = [...opWaveBinArgv(options.bin), "run", "wave", "--spec", specFile, "--wave", String(k), ...
|
|
950
|
+
const command = [...opWaveBinArgv(options.bin), "run", "wave", "--spec", specFile, "--wave", String(k), ...base, ...(options.renderSpec ? ["--render-spec"] : [])];
|
|
942
951
|
const prefix = `wave-${k}-${wave.name}`;
|
|
943
952
|
const shares = wave.shares ?? 1;
|
|
944
953
|
if (shares === 1 && wave.jobs === undefined) {
|
|
@@ -983,6 +992,11 @@ export function opWaveJobs(spec, specFile, options = {}) {
|
|
|
983
992
|
export function opWaveGroupOf(spec, job) {
|
|
984
993
|
return job.group === undefined ? undefined : spec.waves[job.wave - 1]?.jobs?.find((g) => g.name === job.group);
|
|
985
994
|
}
|
|
995
|
+
/** Wave `k` of the spec, or past its waves the `rest` wave, which stands for each wave its plan found (#3821, #4992); undefined when there is none. */
|
|
996
|
+
export function opWaveAt(spec, k) {
|
|
997
|
+
const last = spec.waves[spec.waves.length - 1];
|
|
998
|
+
return spec.waves[k - 1] ?? (k > spec.waves.length && last?.rest === true ? last : undefined);
|
|
999
|
+
}
|
|
986
1000
|
/** The wave a job belongs to. */
|
|
987
1001
|
export function opWaveOf(spec, job) {
|
|
988
1002
|
return spec.waves[job.wave - 1];
|
|
@@ -19,7 +19,19 @@ export interface ScheduledWatch {
|
|
|
19
19
|
* missing schedule's line names it.
|
|
20
20
|
*/
|
|
21
21
|
schedule?: ScheduledRunsQuery["schedule"];
|
|
22
|
+
/**
|
|
23
|
+
* The product plan's targets whose note checks this watch (#4988), such
|
|
24
|
+
* as the environment a drift watch reads. Left out, every target's note
|
|
25
|
+
* does. A note of another target checks neither the watch nor a
|
|
26
|
+
* discovered Op of the same name.
|
|
27
|
+
*/
|
|
28
|
+
targets?: readonly string[];
|
|
22
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The watches the note of `target` checks (#4988): the ones with no
|
|
32
|
+
* `targets`, and the ones naming it. Without a target, every one.
|
|
33
|
+
*/
|
|
34
|
+
export declare function watchesForTarget(watches: readonly ScheduledWatch[], target: string | undefined): ScheduledWatch[];
|
|
23
35
|
/** An Op the plan note warns about. */
|
|
24
36
|
export interface OverdueOp {
|
|
25
37
|
op: string;
|
|
@@ -135,7 +147,9 @@ export declare function overdueOpsAt(input: {
|
|
|
135
147
|
/**
|
|
136
148
|
* A product's own scheduled watches (#4888), checked beside the
|
|
137
149
|
* discovered Ops; one of the same name takes the discovered Op's place.
|
|
138
|
-
* They are checked even when discovery fails.
|
|
150
|
+
* They are checked even when discovery fails. #4988: with `member`, the
|
|
151
|
+
* product plan's target, a watch whose `targets` leave it out is not
|
|
152
|
+
* checked, and neither is the discovered Op of its name.
|
|
139
153
|
*/
|
|
140
154
|
watches?: readonly ScheduledWatch[];
|
|
141
155
|
} & OverdueWords): Promise<OverdueOp[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-overdue.d.ts","sourceRoot":"","sources":["../../src/op/schedule-overdue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGzF,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"schedule-overdue.d.ts","sourceRoot":"","sources":["../../src/op/schedule-overdue.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGzF,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC1C;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,EAAE,CAGjH;AAED,uCAAuC;AACvC,MAAM,WAAW,SAAS;IACxB,EAAE,EAA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AG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,GAAG,YAAY,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAwBtC;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2HAA2H;IAC3H,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAQrD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAexE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EAAE,GAAG,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAsB,GAAG,cAAc,EAAE,CAqB5J;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE;IACL,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;CACrC,GAAG,YAAY,GACf,OAAO,CAAC,SAAS,EAAE,CAAC,CAkCtB"}
|
|
@@ -19,6 +19,15 @@ import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
|
19
19
|
import { join } from "node:path";
|
|
20
20
|
import { cronFiresUtc } from "./cron.js";
|
|
21
21
|
import { parseYAMLDocument, splitYAMLDocuments } from "../yaml.js";
|
|
22
|
+
/**
|
|
23
|
+
* The watches the note of `target` checks (#4988): the ones with no
|
|
24
|
+
* `targets`, and the ones naming it. Without a target, every one.
|
|
25
|
+
*/
|
|
26
|
+
export function watchesForTarget(watches, target) {
|
|
27
|
+
if (target === undefined)
|
|
28
|
+
return [...watches];
|
|
29
|
+
return watches.filter((w) => w.targets === undefined || w.targets.includes(target));
|
|
30
|
+
}
|
|
22
31
|
/**
|
|
23
32
|
* The discovered Ops that are scheduled watch or reconcile Ops: a
|
|
24
33
|
* `schedule`, and the `Watch` label `WatchOp` sets (./composites/watch-op.ts)
|
|
@@ -332,6 +341,8 @@ export const PLAN_WATCHES_ENV = "CHANT_PLAN_WATCHES";
|
|
|
332
341
|
const OP_NAME = /^[A-Za-z0-9][A-Za-z0-9_.:-]*$/;
|
|
333
342
|
const REL_PATH = /^(?!\/)(?!.*(?:^|\/)\.\.(?:\/|$))[A-Za-z0-9_.\/-]+$/;
|
|
334
343
|
const VAR_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
344
|
+
/** A product plan target's name, as ../components/product-plan.ts takes it. */
|
|
345
|
+
const WATCH_TARGET = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
335
346
|
/**
|
|
336
347
|
* Why `watch` is not a scheduled watch a pipeline may name (#4888), or
|
|
337
348
|
* undefined when it is: an Op name, a cron of five fields, `files` as
|
|
@@ -358,6 +369,9 @@ export function scheduledWatchProblem(watch) {
|
|
|
358
369
|
if (s.not !== undefined && (!Array.isArray(s.not) || !s.not.every(plain)))
|
|
359
370
|
return `watch ${watch.op}'s schedule not is not a list of plain words`;
|
|
360
371
|
}
|
|
372
|
+
// #4988: the targets whose note checks the watch, by name.
|
|
373
|
+
if (watch.targets !== undefined && (!Array.isArray(watch.targets) || watch.targets.length === 0 || watch.targets.some((t) => typeof t !== "string" || !WATCH_TARGET.test(t))))
|
|
374
|
+
return `watch ${watch.op}'s targets are not a list of target names`;
|
|
361
375
|
return undefined;
|
|
362
376
|
}
|
|
363
377
|
/**
|
|
@@ -404,7 +418,9 @@ export async function overdueOpsAt(input) {
|
|
|
404
418
|
const { forge } = input;
|
|
405
419
|
if (!forge?.scheduledRuns)
|
|
406
420
|
return [];
|
|
407
|
-
const
|
|
421
|
+
const all = input.watches ?? [];
|
|
422
|
+
const own = watchesForTarget(all, input.member);
|
|
423
|
+
const elsewhere = all.filter((w) => !own.includes(w));
|
|
408
424
|
let discovered = [];
|
|
409
425
|
try {
|
|
410
426
|
const { discoverOps } = await import("./discover.js");
|
|
@@ -416,7 +432,7 @@ export async function overdueOpsAt(input) {
|
|
|
416
432
|
if (own.length === 0)
|
|
417
433
|
return [];
|
|
418
434
|
}
|
|
419
|
-
const watches = [...discovered.filter((d) => !own.some((w) => w.op === d.op)), ...own];
|
|
435
|
+
const watches = [...discovered.filter((d) => !own.some((w) => w.op === d.op) && !elsewhere.some((w) => w.op === d.op)), ...own];
|
|
420
436
|
if (watches.length === 0)
|
|
421
437
|
return [];
|
|
422
438
|
try {
|
package/dist/op/stage-hooks.d.ts
CHANGED
|
@@ -80,6 +80,34 @@ export type OpWaveExec = (argv: string[], cwd: string, env?: Record<string, stri
|
|
|
80
80
|
export declare const spawnExec: OpWaveExec;
|
|
81
81
|
/** {@link OpWaveExec} for {@link runStageHooksAsync} (#4334): the exit code comes back as a promise, so the event loop runs while a hook does. */
|
|
82
82
|
export type OpWaveAsyncExec = (argv: string[], cwd: string, env?: Record<string, string>) => Promise<number>;
|
|
83
|
+
/**
|
|
84
|
+
* One call of a hook a product serves in its own process (#4994), as
|
|
85
|
+
* {@link OpWaveInProcessHook} gets it: the hook's name and moment, its run
|
|
86
|
+
* for a `perRun` hook, the argv its command would have run with, the job's
|
|
87
|
+
* directory and the `CHANT_*` variables the command would have had.
|
|
88
|
+
*/
|
|
89
|
+
export interface OpWaveInProcessHookCall {
|
|
90
|
+
name: string;
|
|
91
|
+
moment: CiHookMoment;
|
|
92
|
+
target?: string;
|
|
93
|
+
argv: string[];
|
|
94
|
+
cwd: string;
|
|
95
|
+
env: Record<string, string>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A hook a product's bin serves in the job's own process (#4994), in place
|
|
99
|
+
* of the hook's command: the spec, read at base, still names the hook and
|
|
100
|
+
* its command, and a job whose process hands a function under that name
|
|
101
|
+
* calls it with the command's argv and variables. Its exit code counts as
|
|
102
|
+
* the command's would, a hold included: it writes `CHANT_HOLD` and returns
|
|
103
|
+
* non-zero. It runs in whichever job runs the hook, so one split wave's plan,
|
|
104
|
+
* gate and applying jobs each call it in their own process; what it needs
|
|
105
|
+
* from an earlier job it reads from files that job left, such as its own
|
|
106
|
+
* under `opWaveProductStateDir` (`./op-waves-split.ts`), which the plan job
|
|
107
|
+
* hands the gate and applying jobs. This replaces a hook that called back
|
|
108
|
+
* into a long-lived product process over a socket.
|
|
109
|
+
*/
|
|
110
|
+
export type OpWaveInProcessHook = (call: OpWaveInProcessHookCall) => Promise<number>;
|
|
83
111
|
/** {@link spawnExec} on `spawn`: it rejects when the command cannot start. */
|
|
84
112
|
export declare const spawnExecAsync: OpWaveAsyncExec;
|
|
85
113
|
/** Fill one argv template. A placeholder whose value is not given is left as it is. */
|
|
@@ -128,15 +156,22 @@ export interface HookPlace {
|
|
|
128
156
|
/** Where a hook writes a hold on another gate (`CHANT_HOLD`). Default: under the wave's directory. */
|
|
129
157
|
holdPath?: string;
|
|
130
158
|
}
|
|
159
|
+
/** The in-process hook a product serves under `name` (#4994), or undefined: an own property that is a function. */
|
|
160
|
+
export declare function inProcessHookOf(hooks: Readonly<Record<string, OpWaveInProcessHook>> | undefined, name: string): OpWaveInProcessHook | undefined;
|
|
131
161
|
/**
|
|
132
162
|
* Run one moment's hooks, in order: each once for the wave, or once per run
|
|
133
163
|
* for a `perRun` hook. A hook that fails stops the rest, unless its
|
|
134
164
|
* `onFailure` is `approve`: then it holds the wave and the hooks after it run.
|
|
135
165
|
*/
|
|
136
166
|
export declare function runHookList(at: HookPlace, moment: CiHookMoment, hooks: readonly OpWaveHook[] | undefined, runs: readonly OpWaveHookRun[], runsPath: string, extraEnv?: Record<string, string>): HookListOutcome;
|
|
137
|
-
/**
|
|
167
|
+
/**
|
|
168
|
+
* {@link runHookList} with an exec that returns a promise (#4334). A hook
|
|
169
|
+
* whose name `at.inProcess` holds is called in this process in place of its
|
|
170
|
+
* command (#4994).
|
|
171
|
+
*/
|
|
138
172
|
export declare function runHookListAsync(at: Omit<HookPlace, "exec"> & {
|
|
139
173
|
exec: OpWaveAsyncExec;
|
|
174
|
+
inProcess?: Readonly<Record<string, OpWaveInProcessHook>>;
|
|
140
175
|
}, moment: CiHookMoment, hooks: readonly OpWaveHook[] | undefined, runs: readonly OpWaveHookRun[], runsPath: string, extraEnv?: Record<string, string>): Promise<HookListOutcome>;
|
|
141
176
|
/** The options of {@link runStageHooks} (#4288). */
|
|
142
177
|
export interface RunStageHooksOptions {
|