@intentius/chant 0.124.28 → 0.124.30
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/build-params.d.ts +34 -1
- package/dist/build-params.d.ts.map +1 -1
- package/dist/build-params.js +31 -1
- package/dist/change-set-graph.d.ts +8 -1
- package/dist/change-set-graph.d.ts.map +1 -1
- package/dist/change-set-graph.js +4 -2
- package/dist/change-set.d.ts +10 -0
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +4 -3
- package/dist/cli/build-params-cli.d.ts +7 -1
- package/dist/cli/build-params-cli.d.ts.map +1 -1
- package/dist/cli/build-params-cli.js +17 -8
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +6 -3
- package/dist/cli/handlers/approve.d.ts.map +1 -1
- package/dist/cli/handlers/approve.js +45 -0
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.js +18 -4
- package/dist/cli/handlers/fan-out.d.ts +9 -0
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.js +67 -8
- package/dist/cli/handlers/lifecycle-gc.d.ts +19 -0
- package/dist/cli/handlers/lifecycle-gc.d.ts.map +1 -0
- package/dist/cli/handlers/lifecycle-gc.js +143 -0
- package/dist/cli/handlers/pr.d.ts +11 -3
- package/dist/cli/handlers/pr.d.ts.map +1 -1
- package/dist/cli/handlers/pr.js +134 -26
- package/dist/cli/handlers/promote.d.ts +7 -0
- package/dist/cli/handlers/promote.d.ts.map +1 -1
- package/dist/cli/handlers/promote.js +210 -33
- package/dist/cli/handlers/release.d.ts +62 -5
- package/dist/cli/handlers/release.d.ts.map +1 -1
- package/dist/cli/handlers/release.js +414 -28
- package/dist/cli/handlers/run.d.ts +11 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/handlers/run.js +67 -6
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +91 -10
- package/dist/cli/parse-args.d.ts.map +1 -1
- package/dist/cli/parse-args.js +73 -2
- package/dist/cli/registry.d.ts +32 -4
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/cli/run-events.d.ts +3 -2
- package/dist/cli/run-events.d.ts.map +1 -1
- package/dist/cli/run-events.js +5 -3
- package/dist/components/auto-release.d.ts +2 -0
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/auto-release.js +1 -0
- package/dist/components/capability.d.ts +9 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/driver.d.ts +8 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/driver.js +35 -0
- package/dist/components/fan-out-inputs.d.ts +69 -0
- package/dist/components/fan-out-inputs.d.ts.map +1 -0
- package/dist/components/fan-out-inputs.js +169 -0
- package/dist/components/fan-out-record.d.ts +13 -0
- package/dist/components/fan-out-record.d.ts.map +1 -1
- package/dist/components/fan-out-record.js +16 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-run.js +50 -0
- package/dist/components/fan-out.d.ts +4 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/pr-pipeline.d.ts +49 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -1
- package/dist/components/pr-pipeline.js +38 -4
- package/dist/components/pr-run.d.ts +20 -2
- package/dist/components/pr-run.d.ts.map +1 -1
- package/dist/components/pr-run.js +26 -13
- package/dist/components/promote.d.ts +23 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/promote.js +60 -2
- package/dist/components/release-compile.d.ts +9 -0
- package/dist/components/release-compile.d.ts.map +1 -1
- package/dist/components/release-compile.js +9 -3
- package/dist/components/release-gate.d.ts +11 -1
- package/dist/components/release-gate.d.ts.map +1 -1
- package/dist/components/release-gate.js +10 -4
- package/dist/components/wave-plan.d.ts +16 -0
- package/dist/components/wave-plan.d.ts.map +1 -1
- package/dist/components/wave-plan.js +36 -2
- package/dist/config.d.ts +38 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -0
- package/dist/flag-params.d.ts +54 -0
- package/dist/flag-params.d.ts.map +1 -0
- package/dist/flag-params.js +130 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +120 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts.map +1 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +304 -0
- package/dist/lifecycle/change-set-store.d.ts +2 -1
- package/dist/lifecycle/change-set-store.d.ts.map +1 -1
- package/dist/lifecycle/change-set-store.js +2 -1
- package/dist/lifecycle/delivery-metrics.d.ts +139 -0
- package/dist/lifecycle/delivery-metrics.d.ts.map +1 -0
- package/dist/lifecycle/delivery-metrics.js +145 -0
- package/dist/lifecycle/deploy-outcome.d.ts +81 -0
- package/dist/lifecycle/deploy-outcome.d.ts.map +1 -0
- package/dist/lifecycle/deploy-outcome.js +101 -0
- package/dist/lifecycle/gate-change-set.d.ts +10 -1
- package/dist/lifecycle/gate-change-set.d.ts.map +1 -1
- package/dist/lifecycle/gate-change-set.js +35 -3
- package/dist/lifecycle/gate-ledger.d.ts +2 -3
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +30 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/git.js +31 -5
- package/dist/lifecycle/index.d.ts +4 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/index.js +4 -0
- package/dist/lifecycle/mixed-environment.d.ts +95 -0
- package/dist/lifecycle/mixed-environment.d.ts.map +1 -0
- package/dist/lifecycle/mixed-environment.js +154 -0
- package/dist/lifecycle/publish-attachments.d.ts +79 -0
- package/dist/lifecycle/publish-attachments.d.ts.map +1 -0
- package/dist/lifecycle/publish-attachments.js +179 -0
- package/dist/lifecycle/publish-credentials.d.ts +37 -0
- package/dist/lifecycle/publish-credentials.d.ts.map +1 -0
- package/dist/lifecycle/publish-credentials.js +69 -0
- package/dist/lifecycle/publish-declaration.d.ts +97 -0
- package/dist/lifecycle/publish-declaration.d.ts.map +1 -0
- package/dist/lifecycle/publish-declaration.js +83 -0
- package/dist/lifecycle/publish-forge.d.ts +53 -0
- package/dist/lifecycle/publish-forge.d.ts.map +1 -0
- package/dist/lifecycle/publish-forge.js +298 -0
- package/dist/lifecycle/publish-npm.d.ts +61 -0
- package/dist/lifecycle/publish-npm.d.ts.map +1 -0
- package/dist/lifecycle/publish-npm.js +242 -0
- package/dist/lifecycle/publish-oci.d.ts +64 -0
- package/dist/lifecycle/publish-oci.d.ts.map +1 -0
- package/dist/lifecycle/publish-oci.js +383 -0
- package/dist/lifecycle/publish-record.d.ts +66 -0
- package/dist/lifecycle/publish-record.d.ts.map +1 -0
- package/dist/lifecycle/publish-record.js +84 -0
- package/dist/lifecycle/publish-targets.d.ts +45 -0
- package/dist/lifecycle/publish-targets.d.ts.map +1 -0
- package/dist/lifecycle/publish-targets.js +85 -0
- package/dist/lifecycle/release-cut.d.ts +48 -1
- package/dist/lifecycle/release-cut.d.ts.map +1 -1
- package/dist/lifecycle/release-cut.js +116 -23
- package/dist/lifecycle/release-join.d.ts +95 -0
- package/dist/lifecycle/release-join.d.ts.map +1 -0
- package/dist/lifecycle/release-join.js +139 -0
- package/dist/lifecycle/release-ledger.d.ts +8 -3
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.js +2 -0
- package/dist/lifecycle/release-publish.d.ts +312 -0
- package/dist/lifecycle/release-publish.d.ts.map +1 -0
- package/dist/lifecycle/release-publish.js +335 -0
- package/dist/lifecycle/release-revocation.d.ts +80 -0
- package/dist/lifecycle/release-revocation.d.ts.map +1 -0
- package/dist/lifecycle/release-revocation.js +123 -0
- package/dist/lifecycle/release-store.d.ts +12 -2
- package/dist/lifecycle/release-store.d.ts.map +1 -1
- package/dist/lifecycle/release-store.js +4 -2
- package/dist/lifecycle/release-verify.d.ts +61 -0
- package/dist/lifecycle/release-verify.d.ts.map +1 -0
- package/dist/lifecycle/release-verify.js +92 -0
- package/dist/lifecycle/release-workstation.d.ts +91 -0
- package/dist/lifecycle/release-workstation.d.ts.map +1 -0
- package/dist/lifecycle/release-workstation.js +180 -0
- package/dist/lifecycle/retention-policy.d.ts +45 -0
- package/dist/lifecycle/retention-policy.d.ts.map +1 -0
- package/dist/lifecycle/retention-policy.js +43 -0
- package/dist/lifecycle/retention.d.ts +185 -0
- package/dist/lifecycle/retention.d.ts.map +1 -0
- package/dist/lifecycle/retention.js +400 -0
- package/dist/lifecycle/run-ledger.d.ts +1 -1
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.js +9 -0
- package/dist/op/activities/activity-contracts.d.ts +1 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.js +1 -0
- package/dist/op/activities/shell.d.ts +6 -0
- package/dist/op/activities/shell.d.ts.map +1 -1
- package/dist/op/activities/shell.js +1 -1
- package/dist/op/local-executor.d.ts +23 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-executor.js +9 -3
- package/dist/op/runtime.d.ts +27 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtime.js +20 -0
- package/dist/plan-summary.d.ts.map +1 -1
- package/dist/plan-summary.js +8 -2
- package/dist/pr-forge.d.ts +23 -0
- package/dist/pr-forge.d.ts.map +1 -1
- package/dist/pr-forge.js +44 -0
- package/dist/pr-loop.d.ts +17 -0
- package/dist/pr-loop.d.ts.map +1 -1
- package/dist/pr-loop.js +30 -4
- package/dist/pr-report-url.d.ts +82 -0
- package/dist/pr-report-url.d.ts.map +1 -0
- package/dist/pr-report-url.js +174 -0
- package/dist/provenance.d.ts +2 -2
- package/dist/provenance.d.ts.map +1 -1
- package/dist/run-event-store.d.ts +29 -2
- package/dist/run-event-store.d.ts.map +1 -1
- package/dist/run-event-store.js +50 -3
- package/dist/run-event-stream.d.ts +4 -3
- package/dist/run-event-stream.d.ts.map +1 -1
- package/dist/run-event-stream.js +7 -3
- package/dist/run-event.d.ts +34 -1
- package/dist/run-event.d.ts.map +1 -1
- package/dist/run-event.js +4 -0
- package/dist/wave-runtime.mjs +260 -229
- package/dist/workspace/__fixtures__/flag-workspace.d.ts +31 -0
- package/dist/workspace/__fixtures__/flag-workspace.d.ts.map +1 -0
- package/dist/workspace/__fixtures__/flag-workspace.js +114 -0
- package/dist/workspace/change-set.schema.json +5 -1
- package/dist/workspace/check.schema.json +4 -2
- package/dist/workspace/checks/records.d.ts +9 -1
- package/dist/workspace/checks/records.d.ts.map +1 -1
- package/dist/workspace/checks/records.js +35 -1
- package/dist/workspace/checks.d.ts +1 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/checks.js +2 -1
- package/dist/workspace/ci-green-forge.d.ts +2 -0
- package/dist/workspace/ci-green-forge.d.ts.map +1 -1
- package/dist/workspace/ci-green.d.ts +10 -0
- package/dist/workspace/ci-green.d.ts.map +1 -1
- package/dist/workspace/ci-green.js +14 -5
- package/dist/workspace/ci-run.d.ts +222 -0
- package/dist/workspace/ci-run.d.ts.map +1 -0
- package/dist/workspace/ci-run.js +464 -0
- package/dist/workspace/ci-serve.d.ts +214 -0
- package/dist/workspace/ci-serve.d.ts.map +1 -0
- package/dist/workspace/ci-serve.js +412 -0
- package/dist/workspace/declaration.d.ts +16 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.js +26 -0
- package/dist/workspace/declaration.schema.json +64 -0
- package/dist/workspace/declared-kinds.d.ts +16 -0
- package/dist/workspace/declared-kinds.d.ts.map +1 -1
- package/dist/workspace/declared-kinds.js +25 -0
- package/dist/workspace/delivery-metrics.d.ts +91 -0
- package/dist/workspace/delivery-metrics.d.ts.map +1 -0
- package/dist/workspace/delivery-metrics.js +217 -0
- package/dist/workspace/delivery-metrics.schema.json +519 -0
- package/dist/workspace/flags-read.d.ts +37 -0
- package/dist/workspace/flags-read.d.ts.map +1 -0
- package/dist/workspace/flags-read.js +103 -0
- package/dist/workspace/flags.d.ts +100 -0
- package/dist/workspace/flags.d.ts.map +1 -0
- package/dist/workspace/flags.js +98 -0
- package/dist/workspace/graph-cli.js +1 -1
- package/dist/workspace/intent-cli.d.ts +11 -2
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-cli.js +54 -5
- package/dist/workspace/intent-trace.d.ts +219 -0
- package/dist/workspace/intent-trace.d.ts.map +1 -0
- package/dist/workspace/intent-trace.js +314 -0
- package/dist/workspace/intent.d.ts +30 -6
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/intent.js +141 -21
- package/dist/workspace/intent.schema.json +702 -6
- package/dist/workspace/overlap.d.ts +146 -0
- package/dist/workspace/overlap.d.ts.map +1 -0
- package/dist/workspace/overlap.js +276 -0
- package/dist/workspace/pr-report.schema.json +5 -0
- package/dist/workspace/reason-codes.d.ts +2 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/reason-codes.js +3 -0
- package/dist/workspace/records.d.ts +15 -2
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/records.js +32 -0
- package/dist/workspace/records.schema.json +21 -2
- package/dist/workspace/reference-kinds/flag/flag.kind.mjs +32 -0
- package/dist/workspace/reference-kinds/flag/flag.schema.json +53 -0
- package/dist/workspace/releases.d.ts +9 -0
- package/dist/workspace/releases.d.ts.map +1 -1
- package/dist/workspace/releases.js +9 -0
- package/dist/workspace/releases.schema.json +123 -1
- package/dist/workspace/run-event.schema.json +24 -6
- package/dist/workspace/status-gates.d.ts +8 -0
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status-stewards.d.ts +2 -0
- package/dist/workspace/status-stewards.d.ts.map +1 -1
- package/dist/workspace/status-stewards.js +1 -0
- package/dist/workspace/status.d.ts +78 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/status.js +170 -3
- package/dist/workspace/status.schema.json +210 -2
- package/dist/workspace/wip.d.ts.map +1 -1
- package/dist/workspace/wip.js +11 -3
- package/package.json +1 -1
- package/src/build-params.test.ts +46 -0
- package/src/build-params.ts +55 -1
- package/src/change-set-graph.ts +10 -2
- package/src/change-set.ts +14 -3
- package/src/cli/build-params-cli.ts +22 -9
- package/src/cli/commands/build.ts +6 -3
- package/src/cli/handlers/approve-release.test.ts +5 -1
- package/src/cli/handlers/approve-revoked.test.ts +155 -0
- package/src/cli/handlers/approve.ts +47 -0
- package/src/cli/handlers/build.test.ts +30 -0
- package/src/cli/handlers/build.ts +20 -4
- package/src/cli/handlers/fan-out.test.ts +262 -1
- package/src/cli/handlers/fan-out.ts +72 -8
- package/src/cli/handlers/intent-trace.e2e.test.ts +201 -0
- package/src/cli/handlers/lifecycle-gc.test.ts +126 -0
- package/src/cli/handlers/lifecycle-gc.ts +146 -0
- package/src/cli/handlers/pr.test.ts +148 -1
- package/src/cli/handlers/pr.ts +144 -28
- package/src/cli/handlers/promote.test.ts +280 -2
- package/src/cli/handlers/promote.ts +210 -34
- package/src/cli/handlers/release-implicit.e2e.test.ts +12 -4
- package/src/cli/handlers/release-join.e2e.test.ts +185 -0
- package/src/cli/handlers/release-publish-targets.e2e.test.ts +295 -0
- package/src/cli/handlers/release-verify.e2e.test.ts +117 -0
- package/src/cli/handlers/release-workstation-ci.e2e.test.ts +135 -0
- package/src/cli/handlers/release.e2e.test.ts +146 -32
- package/src/cli/handlers/release.ts +415 -28
- package/src/cli/handlers/run-auto-release.test.ts +9 -0
- package/src/cli/handlers/run-release.test.ts +55 -0
- package/src/cli/handlers/run.ts +69 -5
- package/src/cli/main.test.ts +1 -0
- package/src/cli/main.ts +91 -10
- package/src/cli/parse-args.ts +54 -2
- package/src/cli/registry.ts +32 -4
- package/src/cli/run-events.ts +5 -2
- package/src/components/auto-release.test.ts +9 -0
- package/src/components/auto-release.ts +3 -0
- package/src/components/capability.ts +9 -0
- package/src/components/driver.test.ts +24 -0
- package/src/components/driver.ts +36 -0
- package/src/components/fan-out-inputs.test.ts +85 -0
- package/src/components/fan-out-inputs.ts +192 -0
- package/src/components/fan-out-record.test.ts +10 -0
- package/src/components/fan-out-record.ts +19 -0
- package/src/components/fan-out-run.ts +48 -0
- package/src/components/fan-out.ts +4 -0
- package/src/components/pr-pipeline.ts +67 -4
- package/src/components/pr-run.test.ts +127 -0
- package/src/components/pr-run.ts +32 -12
- package/src/components/promote.ts +68 -2
- package/src/components/release-compile.ts +17 -3
- package/src/components/release-gate.ts +18 -4
- package/src/components/wave-plan.ts +45 -2
- package/src/config.ts +8 -0
- package/src/flag-params.test.ts +144 -0
- package/src/flag-params.ts +134 -0
- package/src/lifecycle/__fixtures__/publish-fakes.ts +351 -0
- package/src/lifecycle/change-set-store.ts +2 -1
- package/src/lifecycle/delivery-metrics.ts +263 -0
- package/src/lifecycle/deploy-outcome.ts +147 -0
- package/src/lifecycle/gate-change-set.ts +37 -6
- package/src/lifecycle/gate-ledger.ts +2 -2
- package/src/lifecycle/git.ts +61 -8
- package/src/lifecycle/index.ts +4 -0
- package/src/lifecycle/mixed-environment.test.ts +97 -0
- package/src/lifecycle/mixed-environment.ts +204 -0
- package/src/lifecycle/publish-attachments.ts +196 -0
- package/src/lifecycle/publish-credentials.ts +84 -0
- package/src/lifecycle/publish-declaration.ts +95 -0
- package/src/lifecycle/publish-forge.ts +325 -0
- package/src/lifecycle/publish-npm.ts +259 -0
- package/src/lifecycle/publish-oci.ts +396 -0
- package/src/lifecycle/publish-record.ts +113 -0
- package/src/lifecycle/publish-resume.test.ts +168 -0
- package/src/lifecycle/publish-targets.test.ts +494 -0
- package/src/lifecycle/publish-targets.ts +100 -0
- package/src/lifecycle/release-cut.test.ts +74 -2
- package/src/lifecycle/release-cut.ts +158 -22
- package/src/lifecycle/release-flag.test.ts +112 -0
- package/src/lifecycle/release-join.test.ts +68 -0
- package/src/lifecycle/release-join.ts +182 -0
- package/src/lifecycle/release-ledger.ts +9 -3
- package/src/lifecycle/release-publish.test.ts +225 -0
- package/src/lifecycle/release-publish.ts +568 -0
- package/src/lifecycle/release-revocation.ts +147 -0
- package/src/lifecycle/release-store.ts +15 -4
- package/src/lifecycle/release-verify.test.ts +110 -0
- package/src/lifecycle/release-verify.ts +120 -0
- package/src/lifecycle/release-workstation.test.ts +204 -0
- package/src/lifecycle/release-workstation.ts +216 -0
- package/src/lifecycle/retention-growth.e2e.test.ts +279 -0
- package/src/lifecycle/retention-policy.ts +63 -0
- package/src/lifecycle/retention.test.ts +363 -0
- package/src/lifecycle/retention.ts +508 -0
- package/src/lifecycle/run-ledger.ts +7 -1
- package/src/op/activities/activity-contracts.ts +1 -0
- package/src/op/activities/shell.ts +7 -1
- package/src/op/local-executor.ts +27 -4
- package/src/op/runtime.ts +42 -0
- package/src/plan-summary.test.ts +20 -0
- package/src/plan-summary.ts +8 -1
- package/src/pr-forge.test.ts +25 -0
- package/src/pr-forge.ts +62 -0
- package/src/pr-loop.test.ts +13 -1
- package/src/pr-loop.ts +41 -4
- package/src/pr-report-url.test.ts +131 -0
- package/src/pr-report-url.ts +209 -0
- package/src/provenance.ts +2 -2
- package/src/run-event-store.ts +63 -3
- package/src/run-event-stream.ts +8 -4
- package/src/run-event.ts +38 -1
- package/src/workspace/__fixtures__/flag-workspace.ts +132 -0
- package/src/workspace/__fixtures__/older-records/change-set-984534ea9.json +100 -0
- package/src/workspace/__fixtures__/older-records/older-records.json +326 -0
- package/src/workspace/change-set.schema.json +5 -1
- package/src/workspace/check.schema.json +4 -2
- package/src/workspace/checks/records.ts +35 -1
- package/src/workspace/checks.ts +2 -1
- package/src/workspace/ci-green-forge.ts +2 -0
- package/src/workspace/ci-green.ts +20 -5
- package/src/workspace/ci-run.test.ts +416 -0
- package/src/workspace/ci-run.ts +571 -0
- package/src/workspace/ci-serve.test.ts +268 -0
- package/src/workspace/ci-serve.ts +521 -0
- package/src/workspace/declaration.schema.json +64 -0
- package/src/workspace/declaration.test.ts +28 -0
- package/src/workspace/declaration.ts +38 -0
- package/src/workspace/declared-kinds.ts +40 -1
- package/src/workspace/delivery-metrics.schema.json +519 -0
- package/src/workspace/delivery-metrics.test.ts +236 -0
- package/src/workspace/delivery-metrics.ts +286 -0
- package/src/workspace/flags-read.ts +121 -0
- package/src/workspace/flags.test.ts +141 -0
- package/src/workspace/flags.ts +157 -0
- package/src/workspace/graph-cli.ts +1 -1
- package/src/workspace/intent-cli.ts +46 -5
- package/src/workspace/intent-trace.test.ts +173 -0
- package/src/workspace/intent-trace.ts +484 -0
- package/src/workspace/intent.schema.json +702 -6
- package/src/workspace/intent.ts +148 -25
- package/src/workspace/older-records.test.ts +412 -0
- package/src/workspace/overlap.test.ts +165 -0
- package/src/workspace/overlap.ts +340 -0
- package/src/workspace/pr-report.schema.json +5 -0
- package/src/workspace/read-contract.e2e.test.ts +2 -1
- package/src/workspace/reason-codes.test.ts +5 -0
- package/src/workspace/reason-codes.ts +3 -0
- package/src/workspace/record-assets.test.ts +2 -1
- package/src/workspace/records-contract.e2e.test.ts +2 -1
- package/src/workspace/records.schema.json +21 -2
- package/src/workspace/records.ts +36 -2
- package/src/workspace/reference-kinds/flag/flag.kind.mjs +32 -0
- package/src/workspace/reference-kinds/flag/flag.schema.json +53 -0
- package/src/workspace/releases.schema.json +123 -1
- package/src/workspace/releases.ts +11 -0
- package/src/workspace/run-event.schema.json +24 -6
- package/src/workspace/status-contract.test.ts +29 -0
- package/src/workspace/status-gates.ts +8 -0
- package/src/workspace/status-mixed.test.ts +152 -0
- package/src/workspace/status-revoked.test.ts +153 -0
- package/src/workspace/status-stewards.ts +3 -0
- package/src/workspace/status.schema.json +210 -2
- package/src/workspace/status.ts +254 -3
- package/src/workspace/wip.ts +11 -2
|
@@ -29,6 +29,19 @@
|
|
|
29
29
|
* squash merges and rebase merges alike, and every job measures from the
|
|
30
30
|
* merge base of that commit and its own head (`resolveMergeBase`).
|
|
31
31
|
*
|
|
32
|
+
* With `events` (#4007) both commands pass `--events-json`, so the job log
|
|
33
|
+
* carries the run-event stream, and keep a copy of it under the report
|
|
34
|
+
* directory through `CHANT_RUN_EVENTS_DIR`, so the report artifact carries
|
|
35
|
+
* it too. With `reportUrl` both pass `--report-url`, which copies the report,
|
|
36
|
+
* the change set and the events where a reader outside CI can fetch them;
|
|
37
|
+
* the job's own environment brings the credentials an `s3://` URL needs.
|
|
38
|
+
*
|
|
39
|
+
* With `build` (#4088) both jobs run the project's build and `chant lint`
|
|
40
|
+
* before their command, and fail on an error. A `cfn-deploy` member's plan
|
|
41
|
+
* and apply read the built template, so a project with one needs it. The
|
|
42
|
+
* build is `chant build --env <env>`, or `buildCommand` when the templates
|
|
43
|
+
* come from several builds (`npm run build`).
|
|
44
|
+
*
|
|
32
45
|
* In a workspace member (#3465) both commands run in the member's directory
|
|
33
46
|
* and pass `--member <name>`, so the member's gate (`pr-<number>-<member>`),
|
|
34
47
|
* note and statuses stay apart from every other member's on the same pull
|
|
@@ -55,6 +68,12 @@ export declare const PR_LOOP_IMAGE = "node:22";
|
|
|
55
68
|
export declare const PR_LOOP_SETUP: string[];
|
|
56
69
|
/** The setup lines for a pipeline running in `image`: the install when it is the default image, none otherwise. */
|
|
57
70
|
export declare function prLoopSetup(image: string): string[];
|
|
71
|
+
/**
|
|
72
|
+
* Where the jobs keep their run-event files with `events` (#4007), as
|
|
73
|
+
* `CHANT_RUN_EVENTS_DIR`: inside the report directory, so the report
|
|
74
|
+
* artifact carries them.
|
|
75
|
+
*/
|
|
76
|
+
export declare const PR_LOOP_EVENTS_DIR = ".chant/pr/run-events";
|
|
58
77
|
/** The `prLoop` generator option (`ComponentPipelineOptions.prLoop`). */
|
|
59
78
|
export interface PrLoopPipelineOptions {
|
|
60
79
|
/** The gate the apply waits on. Default `pr-apply`. */
|
|
@@ -66,6 +85,32 @@ export interface PrLoopPipelineOptions {
|
|
|
66
85
|
branch?: string;
|
|
67
86
|
/** Count an approval only from someone who approved the pull request on the forge. Default true. */
|
|
68
87
|
requireReview?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Stream each job's run events (#4007): `--events-json` on both commands,
|
|
90
|
+
* and `CHANT_RUN_EVENTS_DIR` set to {@link PR_LOOP_EVENTS_DIR}. Default false.
|
|
91
|
+
*/
|
|
92
|
+
events?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Copy each job's report, change set and events to this `s3://` or
|
|
95
|
+
* `file://` URL (#4007, `--report-url`), under `<pr>/<commit>/`. It is
|
|
96
|
+
* passed in double quotes, so it may name a variable the job expands,
|
|
97
|
+
* such as `$CHANT_REPORT_URL`.
|
|
98
|
+
*/
|
|
99
|
+
reportUrl?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Build and lint before `pr-plan` and before `pr-apply` (#4088): the build
|
|
102
|
+
* line, then `chant lint`, each failing the job on an error. A `cfn-deploy`
|
|
103
|
+
* member reads the built template, so a project with one sets this. The
|
|
104
|
+
* build line is `chant build --env <env>` unless `buildCommand` names
|
|
105
|
+
* another. Default false.
|
|
106
|
+
*/
|
|
107
|
+
build?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* The shell line that builds the project in place of `chant build --env
|
|
110
|
+
* <env>`, for a project whose templates come from several builds, such as
|
|
111
|
+
* `npm run build`. Setting it turns `build` on.
|
|
112
|
+
*/
|
|
113
|
+
buildCommand?: string;
|
|
69
114
|
/**
|
|
70
115
|
* Which GitHub-shaped forge the workflow is for. Set by the forgejo
|
|
71
116
|
* generator, which reuses the github one; a caller never needs to.
|
|
@@ -86,7 +131,11 @@ export interface PrLoopJob {
|
|
|
86
131
|
env: Record<string, string>;
|
|
87
132
|
/** Shell lines to run before the command, to settle values the forge may leave unusable. */
|
|
88
133
|
setup?: string[];
|
|
134
|
+
/** With `build` (#4088): the build line and the lint line, run in this order before the command. */
|
|
135
|
+
build?: string[];
|
|
89
136
|
}
|
|
137
|
+
/** The lines `build` (#4088) runs before a job's command: the build, then the lint. Empty without the option. */
|
|
138
|
+
export declare function prLoopBuildLines(env: string, options?: PrLoopPipelineOptions): string[];
|
|
90
139
|
/**
|
|
91
140
|
* The two jobs for `forge`. `member` is the workspace member the pipeline is
|
|
92
141
|
* generated for; the commands then run in its directory, so `--output` is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-pipeline.d.ts","sourceRoot":"","sources":["../../src/components/pr-pipeline.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pr-pipeline.d.ts","sourceRoot":"","sources":["../../src/components/pr-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,eAAe,mCAAmC,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YAAW,CAAC;AAEtC,8CAA8C;AAC9C,eAAO,MAAM,aAAa,UAEzB,CAAC;AAEF,mHAAmH;AACnH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEnD;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,yBAAqC,CAAC;AAErE,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oGAAoG;IACpG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC9B;AAED,8FAA8F;AAC9F,MAAM,WAAW,SAAS;IACxB,yBAAyB;IACzB,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,4FAA4F;IAC5F,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,oGAAoG;IACpG,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,iHAAiH;AACjH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,EAAE,CAG3F;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAoC3H;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAErF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAU1D"}
|
|
@@ -29,6 +29,19 @@
|
|
|
29
29
|
* squash merges and rebase merges alike, and every job measures from the
|
|
30
30
|
* merge base of that commit and its own head (`resolveMergeBase`).
|
|
31
31
|
*
|
|
32
|
+
* With `events` (#4007) both commands pass `--events-json`, so the job log
|
|
33
|
+
* carries the run-event stream, and keep a copy of it under the report
|
|
34
|
+
* directory through `CHANT_RUN_EVENTS_DIR`, so the report artifact carries
|
|
35
|
+
* it too. With `reportUrl` both pass `--report-url`, which copies the report,
|
|
36
|
+
* the change set and the events where a reader outside CI can fetch them;
|
|
37
|
+
* the job's own environment brings the credentials an `s3://` URL needs.
|
|
38
|
+
*
|
|
39
|
+
* With `build` (#4088) both jobs run the project's build and `chant lint`
|
|
40
|
+
* before their command, and fail on an error. A `cfn-deploy` member's plan
|
|
41
|
+
* and apply read the built template, so a project with one needs it. The
|
|
42
|
+
* build is `chant build --env <env>`, or `buildCommand` when the templates
|
|
43
|
+
* come from several builds (`npm run build`).
|
|
44
|
+
*
|
|
32
45
|
* In a workspace member (#3465) both commands run in the member's directory
|
|
33
46
|
* and pass `--member <name>`, so the member's gate (`pr-<number>-<member>`),
|
|
34
47
|
* note and statuses stay apart from every other member's on the same pull
|
|
@@ -60,6 +73,18 @@ export const PR_LOOP_SETUP = [
|
|
|
60
73
|
export function prLoopSetup(image) {
|
|
61
74
|
return image === PR_LOOP_IMAGE ? PR_LOOP_SETUP : [];
|
|
62
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Where the jobs keep their run-event files with `events` (#4007), as
|
|
78
|
+
* `CHANT_RUN_EVENTS_DIR`: inside the report directory, so the report
|
|
79
|
+
* artifact carries them.
|
|
80
|
+
*/
|
|
81
|
+
export const PR_LOOP_EVENTS_DIR = `${PR_LOOP_REPORT_DIR}/run-events`;
|
|
82
|
+
/** The lines `build` (#4088) runs before a job's command: the build, then the lint. Empty without the option. */
|
|
83
|
+
export function prLoopBuildLines(env, options = {}) {
|
|
84
|
+
if (!options.build && !options.buildCommand)
|
|
85
|
+
return [];
|
|
86
|
+
return [options.buildCommand ?? `chant build --env ${env}`, "chant lint"];
|
|
87
|
+
}
|
|
63
88
|
/**
|
|
64
89
|
* The two jobs for `forge`. `member` is the workspace member the pipeline is
|
|
65
90
|
* generated for; the commands then run in its directory, so `--output` is
|
|
@@ -70,16 +95,24 @@ export function prLoopJobs(forge, env, options = {}, member) {
|
|
|
70
95
|
const common = [
|
|
71
96
|
"--env", env, "--gate", gate, "--output", PR_LOOP_REPORT_DIR, "--forge", forge,
|
|
72
97
|
...(member ? ["--member", member] : []),
|
|
98
|
+
...(options.events ? ["--events-json"] : []),
|
|
99
|
+
...(options.reportUrl ? ["--report-url", JSON.stringify(options.reportUrl)] : []),
|
|
73
100
|
];
|
|
74
101
|
const github = forge !== "gitlab";
|
|
75
|
-
const
|
|
102
|
+
const buildLines = prLoopBuildLines(env, options);
|
|
103
|
+
const build = buildLines.length > 0 ? { build: buildLines } : {};
|
|
104
|
+
const jobEnv = {
|
|
105
|
+
...(github ? { GITHUB_TOKEN: GITHUB_JOB_TOKEN } : {}),
|
|
106
|
+
...(options.events ? { CHANT_RUN_EVENTS_DIR: PR_LOOP_EVENTS_DIR } : {}),
|
|
107
|
+
};
|
|
76
108
|
return [
|
|
77
109
|
{
|
|
78
110
|
jobName: "plan",
|
|
79
111
|
command: ["chant", "components", "pr-plan", "--base", '"$BASE_SHA"', "--pr", '"$PR_NUMBER"', ...common].join(" "),
|
|
80
112
|
env: github
|
|
81
|
-
? { BASE_SHA: "${{ github.event.pull_request.base.sha }}", PR_NUMBER: "${{ github.event.pull_request.number }}", ...
|
|
82
|
-
: { BASE_SHA: "$CI_MERGE_REQUEST_DIFF_BASE_SHA", PR_NUMBER: "$CI_MERGE_REQUEST_IID" },
|
|
113
|
+
? { BASE_SHA: "${{ github.event.pull_request.base.sha }}", PR_NUMBER: "${{ github.event.pull_request.number }}", ...jobEnv }
|
|
114
|
+
: { BASE_SHA: "$CI_MERGE_REQUEST_DIFF_BASE_SHA", PR_NUMBER: "$CI_MERGE_REQUEST_IID", ...jobEnv },
|
|
115
|
+
...build,
|
|
83
116
|
},
|
|
84
117
|
{
|
|
85
118
|
jobName: "apply",
|
|
@@ -88,8 +121,9 @@ export function prLoopJobs(forge, env, options = {}, member) {
|
|
|
88
121
|
...(options.requireReview === false ? [] : ["--require-review"]),
|
|
89
122
|
"--resume", PR_APPLY_RECORD,
|
|
90
123
|
].join(" "),
|
|
91
|
-
env: github ? { BASE_SHA: "${{ github.event.before }}", ...
|
|
124
|
+
env: github ? { BASE_SHA: "${{ github.event.before }}", ...jobEnv } : { BASE_SHA: "$CI_COMMIT_BEFORE_SHA", ...jobEnv },
|
|
92
125
|
...(github ? {} : { setup: [gitlabBaseFallback(options.branch)] }),
|
|
126
|
+
...build,
|
|
93
127
|
},
|
|
94
128
|
];
|
|
95
129
|
}
|
|
@@ -19,6 +19,16 @@
|
|
|
19
19
|
* its dependents in one rollout is what gated waves are for (#3049): each
|
|
20
20
|
* wave is planned after the one before it applied.
|
|
21
21
|
*
|
|
22
|
+
* A dependency the change did not select is read the same way (#4104), so
|
|
23
|
+
* a change to one cluster plans it against the network it sits on. That is
|
|
24
|
+
* why `components` is every component in the project and not the selection.
|
|
25
|
+
* `--seed-outputs` wins over a read, and a dependency whose steps cannot say
|
|
26
|
+
* leaves its dependents' references unresolved. The apply stage's plan reads
|
|
27
|
+
* the same dependencies, so on the same estate it gets the digest the plan
|
|
28
|
+
* stage showed, and it applies against the outputs its plans read
|
|
29
|
+
* (`set.outputs`). A resume plans against the outputs the approved plans
|
|
30
|
+
* read, from the record (`planOutputs`), and reads nothing those cover.
|
|
31
|
+
*
|
|
22
32
|
* ## Finishing an apply that failed partway
|
|
23
33
|
*
|
|
24
34
|
* {@link resumePrSet} (#3464) is fan-out's resume (#2417, #3049) for a pull
|
|
@@ -43,7 +53,7 @@ import type { CapabilityRegistry } from "./capability.js";
|
|
|
43
53
|
import type { RunProgressEvent } from "./run-progress.js";
|
|
44
54
|
import type { RunEventSink } from "../run-event-stream.js";
|
|
45
55
|
export interface PrPlanSetOptions {
|
|
46
|
-
/** Every component in the project. */
|
|
56
|
+
/** Every component in the project, not the selection: a planned member's dependency outside it is read too (#4104). */
|
|
47
57
|
components: DriverComponent[];
|
|
48
58
|
/** The fan-out the change derives (`planFanOut`). Its `order` is what is planned. */
|
|
49
59
|
plan: FanOutPlan;
|
|
@@ -70,13 +80,21 @@ export interface PrPlanSet {
|
|
|
70
80
|
plans: Record<string, Record<string, unknown>>;
|
|
71
81
|
/** The outputs the plans read: the seeds, and each dependency's outputs as they stood. */
|
|
72
82
|
outputs: Record<string, Record<string, unknown>>;
|
|
83
|
+
/**
|
|
84
|
+
* Per dependency read from the deployed estate (#4104), the names of the
|
|
85
|
+
* outputs the read gave, sorted. The seeds are not here. Absent when
|
|
86
|
+
* nothing was read. The report's `deployedOutputs`.
|
|
87
|
+
*/
|
|
88
|
+
deployedOutputs?: Record<string, string[]>;
|
|
73
89
|
/** Whether any component failed to plan. */
|
|
74
90
|
failed: boolean;
|
|
75
91
|
}
|
|
76
92
|
/**
|
|
77
93
|
* Plan every component in `plan.order`, a wave at a time, each against the
|
|
78
94
|
* outputs its dependencies have now. Never throws for a component that fails
|
|
79
|
-
* to plan: it becomes a failed member, and `failed` is set.
|
|
95
|
+
* to plan: it becomes a failed member, and `failed` is set. Throws when a
|
|
96
|
+
* planned member's dependency is not among `components`, which means the
|
|
97
|
+
* caller passed the selection where the whole graph belongs.
|
|
80
98
|
*/
|
|
81
99
|
export declare function planPrSet(options: PrPlanSetOptions): Promise<PrPlanSet>;
|
|
82
100
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-run.d.ts","sourceRoot":"","sources":["../../src/components/pr-run.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pr-run.d.ts","sourceRoot":"","sources":["../../src/components/pr-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAA2C,KAAK,iBAAiB,EAA2C,MAAM,eAAe,CAAC;AACzI,OAAO,EAAgB,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAiB,KAAK,eAAe,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AAS,CAAC;IACf,wDAAwD;IACxD,KAAK,EAAE,SAAS,CAAC;CAClB,GACD;IACE,EAAE,EAAE,KAAK,CAAC;IACV,6EAA6E;IAC7E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEN;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,CA8B7E;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,GAAG,EAAE,SAAS,CAAC;IACf,QAAQ,EAAE,UAAU,CAAC;IACrB,MAAM,EAAE,QAAQ,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,iCAAiC;AACjC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ,CA8BvD"}
|
|
@@ -19,6 +19,16 @@
|
|
|
19
19
|
* its dependents in one rollout is what gated waves are for (#3049): each
|
|
20
20
|
* wave is planned after the one before it applied.
|
|
21
21
|
*
|
|
22
|
+
* A dependency the change did not select is read the same way (#4104), so
|
|
23
|
+
* a change to one cluster plans it against the network it sits on. That is
|
|
24
|
+
* why `components` is every component in the project and not the selection.
|
|
25
|
+
* `--seed-outputs` wins over a read, and a dependency whose steps cannot say
|
|
26
|
+
* leaves its dependents' references unresolved. The apply stage's plan reads
|
|
27
|
+
* the same dependencies, so on the same estate it gets the digest the plan
|
|
28
|
+
* stage showed, and it applies against the outputs its plans read
|
|
29
|
+
* (`set.outputs`). A resume plans against the outputs the approved plans
|
|
30
|
+
* read, from the record (`planOutputs`), and reads nothing those cover.
|
|
31
|
+
*
|
|
22
32
|
* ## Finishing an apply that failed partway
|
|
23
33
|
*
|
|
24
34
|
* {@link resumePrSet} (#3464) is fan-out's resume (#2417, #3049) for a pull
|
|
@@ -39,7 +49,7 @@ import { deployContext } from "./driver.js";
|
|
|
39
49
|
import { deployUnits } from "./deploy-units.js";
|
|
40
50
|
import { runFanOut } from "./fan-out-run.js";
|
|
41
51
|
import { remainingFanOut } from "./fan-out.js";
|
|
42
|
-
import { planWaveComponent,
|
|
52
|
+
import { planWaveComponent, readDeployedOutputs } from "./wave-plan.js";
|
|
43
53
|
/** The phase a pull request's planning is, in its run's events. */
|
|
44
54
|
export const PR_PLAN_PHASE = "plan";
|
|
45
55
|
/** A failed component's members: the units its steps target, else the component itself. */
|
|
@@ -53,12 +63,15 @@ function failedParts(component, error) {
|
|
|
53
63
|
/**
|
|
54
64
|
* Plan every component in `plan.order`, a wave at a time, each against the
|
|
55
65
|
* outputs its dependencies have now. Never throws for a component that fails
|
|
56
|
-
* to plan: it becomes a failed member, and `failed` is set.
|
|
66
|
+
* to plan: it becomes a failed member, and `failed` is set. Throws when a
|
|
67
|
+
* planned member's dependency is not among `components`, which means the
|
|
68
|
+
* caller passed the selection where the whole graph belongs.
|
|
57
69
|
*/
|
|
58
70
|
export async function planPrSet(options) {
|
|
59
71
|
const byName = new Map(options.components.map((c) => [c.name, c]));
|
|
60
72
|
const outputs = { ...(options.seededOutputs ?? {}) };
|
|
61
73
|
const read = new Set(Object.keys(outputs));
|
|
74
|
+
const deployed = {};
|
|
62
75
|
const parts = [];
|
|
63
76
|
const componentOf = new Map();
|
|
64
77
|
const plans = {};
|
|
@@ -68,17 +81,15 @@ export async function planPrSet(options) {
|
|
|
68
81
|
for (const wave of options.plan.waves) {
|
|
69
82
|
// The dependencies' outputs first, each read once. A dependency that
|
|
70
83
|
// cannot say leaves its references unresolved, which its dependent's
|
|
71
|
-
// plan reports if it needs them.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (found)
|
|
79
|
-
outputs[dep] = found;
|
|
80
|
-
}
|
|
84
|
+
// plan reports if it needs them. A dependency outside the selection is
|
|
85
|
+
// read the same way (#4104).
|
|
86
|
+
const deps = [...new Set(wave.flatMap((name) => byName.get(name)?.dependsOn ?? []))].filter((dep) => !read.has(dep));
|
|
87
|
+
for (const dep of deps) {
|
|
88
|
+
read.add(dep);
|
|
89
|
+
if (!byName.has(dep))
|
|
90
|
+
throw new Error(`planPrSet: ${dep}, a dependency of a planned member, is not among the components; pass every component in the project`);
|
|
81
91
|
}
|
|
92
|
+
Object.assign(deployed, await readDeployedOutputs(deps, byName, options.registry, (dep) => deployContext(options, dep), outputs));
|
|
82
93
|
const planned = await Promise.all(wave.map(async (name) => {
|
|
83
94
|
const at = { component: name, phase: PR_PLAN_PHASE, step: "plan" };
|
|
84
95
|
emit?.({ type: "step-start", ...at });
|
|
@@ -120,7 +131,8 @@ export async function planPrSet(options) {
|
|
|
120
131
|
counts: memberCounts(doc, m.member),
|
|
121
132
|
...(m.error ? { error: m.error } : {}),
|
|
122
133
|
}));
|
|
123
|
-
|
|
134
|
+
const deployedOutputs = Object.fromEntries(Object.entries(deployed).sort(([a], [b]) => a.localeCompare(b)));
|
|
135
|
+
return { doc, members, plans, outputs, failed, ...(Object.keys(deployedOutputs).length > 0 ? { deployedOutputs } : {}) };
|
|
124
136
|
}
|
|
125
137
|
/**
|
|
126
138
|
* A ledger that reads the real one and records nothing. The plan stage
|
|
@@ -368,6 +380,7 @@ export function prReport(input) {
|
|
|
368
380
|
...(input.refusal ? { refusal: input.refusal } : {}),
|
|
369
381
|
...(input.message ? { message: input.message } : {}),
|
|
370
382
|
...(input.resumed ? { resumed: { applied: [...input.resumed].sort() } } : {}),
|
|
383
|
+
...(input.set.deployedOutputs ? { deployedOutputs: input.set.deployedOutputs } : {}),
|
|
371
384
|
approval: input.approval,
|
|
372
385
|
selection: {
|
|
373
386
|
changed: input.plan.order.filter((c) => changed.has(c)),
|
|
@@ -41,6 +41,7 @@ import { type ReleaseRecord, type ReleaseRecordInput, type ReleaseAdmission, typ
|
|
|
41
41
|
import { CapabilityRegistry, type Capability } from "./capability.js";
|
|
42
42
|
import { type DriverComponent, type DriverComponentResult, type ReleaseGateBinding, type DriverRunResult } from "./driver.js";
|
|
43
43
|
import type { GateLedgerPort } from "../op/gate.js";
|
|
44
|
+
import type { Release } from "../lifecycle/release-store.js";
|
|
44
45
|
import type { RunProgressEvent } from "./run-progress.js";
|
|
45
46
|
import type { RunEventSink } from "../run-event-stream.js";
|
|
46
47
|
/**
|
|
@@ -132,6 +133,28 @@ export declare function planRollback(input: {
|
|
|
132
133
|
}): PromotionPlan | {
|
|
133
134
|
error: string;
|
|
134
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* Decide what a rollback to a release restores (#4035): every component of
|
|
138
|
+
* `release`, each at the newest record in `env`'s ledger that names the
|
|
139
|
+
* release, so the digest restored is the one the environment ran from it. A
|
|
140
|
+
* component of the release this checkout does not declare is reported and
|
|
141
|
+
* left alone. One the environment never ran from the release has no recorded
|
|
142
|
+
* digest, and is refused. So is a release the environment already runs,
|
|
143
|
+
* unless one of its components is `unsettled` (a run left it failed or gated):
|
|
144
|
+
* then the rollback is what puts that component back too.
|
|
145
|
+
*/
|
|
146
|
+
export declare function planReleaseRollback(input: {
|
|
147
|
+
env: string;
|
|
148
|
+
records: ReleaseRecord[];
|
|
149
|
+
declared: string[];
|
|
150
|
+
release: Pick<Release, "releaseDigest" | "artifactDigests" | "targets">;
|
|
151
|
+
/** The release's label, or null; used in messages. */
|
|
152
|
+
label: string | null;
|
|
153
|
+
/** Components a run left failed or gated in `env` (../lifecycle/mixed-environment.ts). */
|
|
154
|
+
unsettled?: ReadonlySet<string>;
|
|
155
|
+
}): PromotionPlan | {
|
|
156
|
+
error: string;
|
|
157
|
+
};
|
|
135
158
|
/**
|
|
136
159
|
* Decide what a redeploy deploys: the release of `component` the ledger in
|
|
137
160
|
* `env` records as current. A deploy that fails partway records nothing, so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promote.d.ts","sourceRoot":"","sources":["../../src/components/promote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,OAAO,EAAsB,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrJ,OAAO,EAAE,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAE1B,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EAErB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAM7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAK/C,CAAC;AAEF,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,MAAM,EAAE,aAA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GAAG,SAAS,CAOrG;AAED,+FAA+F;AAC/F,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AA+BD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAEvG;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAEvG;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,kBAAkB,CAEvG"}
|
|
@@ -198,6 +198,60 @@ export function planRollback(input) {
|
|
|
198
198
|
}
|
|
199
199
|
return { from: env, to: env, items: [{ component, digest: target.digest, source: target }], notPromoted: [] };
|
|
200
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Decide what a rollback to a release restores (#4035): every component of
|
|
203
|
+
* `release`, each at the newest record in `env`'s ledger that names the
|
|
204
|
+
* release, so the digest restored is the one the environment ran from it. A
|
|
205
|
+
* component of the release this checkout does not declare is reported and
|
|
206
|
+
* left alone. One the environment never ran from the release has no recorded
|
|
207
|
+
* digest, and is refused. So is a release the environment already runs,
|
|
208
|
+
* unless one of its components is `unsettled` (a run left it failed or gated):
|
|
209
|
+
* then the rollback is what puts that component back too.
|
|
210
|
+
*/
|
|
211
|
+
export function planReleaseRollback(input) {
|
|
212
|
+
const { env, records, declared, release } = input;
|
|
213
|
+
const name = input.label ?? release.releaseDigest;
|
|
214
|
+
const target = release.targets.find((t) => t.env === env);
|
|
215
|
+
const inRelease = new Set();
|
|
216
|
+
for (const t of target?.templates ?? [])
|
|
217
|
+
if (t.component !== null)
|
|
218
|
+
inRelease.add(t.component);
|
|
219
|
+
for (const a of release.artifactDigests)
|
|
220
|
+
inRelease.add(a.component);
|
|
221
|
+
const items = [];
|
|
222
|
+
const notPromoted = [];
|
|
223
|
+
const neverRan = [];
|
|
224
|
+
for (const component of [...inRelease].sort()) {
|
|
225
|
+
if (!declared.includes(component)) {
|
|
226
|
+
notPromoted.push({ component, reason: `in release ${name} but not declared in this checkout` });
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
const ran = records.filter((r) => r.component === component && r.releaseDigest === release.releaseDigest);
|
|
230
|
+
if (ran.length === 0) {
|
|
231
|
+
neverRan.push(component);
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
const record = latestPerComponent(ran).get(component);
|
|
235
|
+
items.push({ component, digest: record.digest, source: record });
|
|
236
|
+
}
|
|
237
|
+
if (neverRan.length > 0) {
|
|
238
|
+
return {
|
|
239
|
+
error: `release ${name} never deployed ${neverRan.map((c) => `"${c}"`).join(", ")} to "${env}", so no recorded digest can be restored; ` +
|
|
240
|
+
`promote it instead: chant components promote --to ${env} --release ${name}`,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
if (items.length === 0)
|
|
244
|
+
return { error: `release ${name} has no component declared in this checkout` };
|
|
245
|
+
const current = latestPerComponent(records);
|
|
246
|
+
const already = items.every((i) => {
|
|
247
|
+
const now = current.get(i.component);
|
|
248
|
+
return now !== undefined && now.releaseDigest === release.releaseDigest && now.digest === i.digest && !input.unsettled?.has(i.component);
|
|
249
|
+
});
|
|
250
|
+
if (already) {
|
|
251
|
+
return { error: `"${env}" already runs release ${name}; nothing to roll back. After a deploy that failed partway, chant components redeploy puts a component's release back` };
|
|
252
|
+
}
|
|
253
|
+
return { from: env, to: env, items, notPromoted };
|
|
254
|
+
}
|
|
201
255
|
/**
|
|
202
256
|
* Decide what a redeploy deploys: the release of `component` the ledger in
|
|
203
257
|
* `env` records as current. A deploy that fails partway records nothing, so
|
|
@@ -538,6 +592,10 @@ function sharedRecord(item, env, run) {
|
|
|
538
592
|
function refTo(record) {
|
|
539
593
|
return { env: record.env, runId: record.runId, timestamp: record.timestamp };
|
|
540
594
|
}
|
|
595
|
+
/** A rollback and a redeploy put an earlier deploy back, so they name the release it came from (#4043). */
|
|
596
|
+
function releaseOf(source) {
|
|
597
|
+
return source.releaseDigest !== undefined ? { releaseDigest: source.releaseDigest } : {};
|
|
598
|
+
}
|
|
541
599
|
/**
|
|
542
600
|
* The release record a successful promotion appends to the target ledger.
|
|
543
601
|
* The digest, git sha and archive identities are the source release's own,
|
|
@@ -553,7 +611,7 @@ export function promotionRecord(item, to, run) {
|
|
|
553
611
|
* release.
|
|
554
612
|
*/
|
|
555
613
|
export function rollbackRecord(item, env, run) {
|
|
556
|
-
return { ...sharedRecord(item, env, run), restores: refTo(item.source) };
|
|
614
|
+
return { ...sharedRecord(item, env, run), restores: refTo(item.source), ...releaseOf(item.source) };
|
|
557
615
|
}
|
|
558
616
|
/**
|
|
559
617
|
* The release record a successful redeploy appends. It carries the current
|
|
@@ -562,5 +620,5 @@ export function rollbackRecord(item, env, run) {
|
|
|
562
620
|
* change, and the record says when it was last put back.
|
|
563
621
|
*/
|
|
564
622
|
export function redeployRecord(item, env, run) {
|
|
565
|
-
return { ...sharedRecord(item, env, run), redeploys: refTo(item.source) };
|
|
623
|
+
return { ...sharedRecord(item, env, run), redeploys: refTo(item.source), ...releaseOf(item.source) };
|
|
566
624
|
}
|
|
@@ -54,6 +54,13 @@ export interface CompiledTarget {
|
|
|
54
54
|
components: string[];
|
|
55
55
|
/** Each component's build-time steps, as declared for this environment, in composition order. */
|
|
56
56
|
buildSteps: Record<string, unknown[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Each component's publish steps (`PUBLISH_STEP_KINDS`), as declared for
|
|
59
|
+
* this environment, in composition order (#4027). The cut's dry run shows
|
|
60
|
+
* them as what each environment's deploy publishes. Absent from a compiler
|
|
61
|
+
* that does not report them.
|
|
62
|
+
*/
|
|
63
|
+
publishSteps?: Record<string, unknown[]>;
|
|
57
64
|
/** For each component, the files its build steps read, relative to the member's directory. Used to tell whether an artifact's source changed. */
|
|
58
65
|
buildInputs: Record<string, string[]>;
|
|
59
66
|
/** For each component, the file that declares it, relative to the member's directory. */
|
|
@@ -69,6 +76,8 @@ export interface TargetCompiler {
|
|
|
69
76
|
export declare function templateRefs(component: DriverComponent): TemplateRef[];
|
|
70
77
|
/** A component's build-time steps ({@link BUILD_STEP_KINDS}), each as declared, in composition order. */
|
|
71
78
|
export declare function buildStepsOf(component: DriverComponent): DriverStep[];
|
|
79
|
+
/** A component's publish steps ({@link PUBLISH_STEP_KINDS}), each as declared, in composition order. */
|
|
80
|
+
export declare function publishStepsOf(component: DriverComponent): DriverStep[];
|
|
72
81
|
/** The literal paths a component's archive steps read: `docker-build`'s `context` and `dockerfile`, `zip-package`'s `source`, `jvm-build`'s `path`. */
|
|
73
82
|
export declare function buildInputPaths(component: DriverComponent): string[];
|
|
74
83
|
/** A component's composition with only its archive steps ({@link ARCHIVE_STEP_KINDS}) left, gates and every other step taken out. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-compile.d.ts","sourceRoot":"","sources":["../../src/components/release-compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAKH,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAO9D,OAAO,EAAwC,KAAK,eAAe,EAAqC,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAC1I,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEhF,mFAAmF;AACnF,eAAO,MAAM,eAAe,EA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AAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,OAAO,CAAC,eAAe,EAAE,CAAC,CAgC5B;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAG1C;AAkBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE,SAAS,MAAM,EAAsB,GAAG,cAAc,CA2BzH"}
|
|
@@ -27,7 +27,7 @@ import { spawn, spawnSync } from "node:child_process";
|
|
|
27
27
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
28
28
|
import { isAbsolute, relative, resolve } from "node:path";
|
|
29
29
|
import { loadChantConfig } from "../config.js";
|
|
30
|
-
import {
|
|
30
|
+
import { resolveFlaggedBuildParams } from "../flag-params.js";
|
|
31
31
|
import { discoverComponents } from "./discover.js";
|
|
32
32
|
import { withoutDisabled } from "./cli-support.js";
|
|
33
33
|
import { applyConfigDefaults } from "./config-defaults.js";
|
|
@@ -83,6 +83,10 @@ export function templateRefs(component) {
|
|
|
83
83
|
export function buildStepsOf(component) {
|
|
84
84
|
return stepsOf(component.deploy).map((s) => s.step).filter((s) => BUILD_STEP_KINDS.includes(s.kind));
|
|
85
85
|
}
|
|
86
|
+
/** A component's publish steps ({@link PUBLISH_STEP_KINDS}), each as declared, in composition order. */
|
|
87
|
+
export function publishStepsOf(component) {
|
|
88
|
+
return stepsOf(component.deploy).map((s) => s.step).filter((s) => PUBLISH_STEP_KINDS.includes(s.kind));
|
|
89
|
+
}
|
|
86
90
|
/** The literal paths a component's archive steps read: `docker-build`'s `context` and `dockerfile`, `zip-package`'s `source`, `jvm-build`'s `path`. */
|
|
87
91
|
export function buildInputPaths(component) {
|
|
88
92
|
const out = [];
|
|
@@ -133,10 +137,11 @@ export class ReleaseCompileError extends Error {
|
|
|
133
137
|
}
|
|
134
138
|
async function loadComponents(inputs, env) {
|
|
135
139
|
const { config } = await loadChantConfig(inputs.projectDir).catch(() => ({ config: {} }));
|
|
136
|
-
|
|
140
|
+
// #4024: a workspace member's flag records back their parameters, so a flag's value is a param with source flag:<name>.
|
|
141
|
+
const resolved = await resolveFlaggedBuildParams(inputs.projectDir, config.buildParams, {
|
|
137
142
|
...(inputs.params ? { cli: inputs.params } : {}),
|
|
138
143
|
...(inputs.paramsFile ? { paramsFile: inputs.paramsFile.replaceAll("{env}", env) } : {}),
|
|
139
|
-
});
|
|
144
|
+
}, env);
|
|
140
145
|
if (!resolved.success)
|
|
141
146
|
throw new ReleaseCompileError(`build parameters for "${env}" did not resolve:\n${resolved.errors.join("\n")}`);
|
|
142
147
|
const discovered = await discoverComponents(inputs.projectDir, { buildParams: resolved.provenance });
|
|
@@ -202,6 +207,7 @@ export async function compileEnvironment(inputs, env) {
|
|
|
202
207
|
params,
|
|
203
208
|
components: components.map((c) => c.component.name),
|
|
204
209
|
buildSteps: Object.fromEntries(components.map(({ component }) => [component.name, buildStepsOf(component)])),
|
|
210
|
+
publishSteps: Object.fromEntries(components.map(({ component }) => [component.name, publishStepsOf(component)])),
|
|
205
211
|
buildInputs: Object.fromEntries(components.map(({ component }) => [component.name, buildInputPaths(component)])),
|
|
206
212
|
componentFiles: Object.fromEntries(components.map(({ component, file }) => [component.name, rel(file)])),
|
|
207
213
|
templates,
|
|
@@ -47,7 +47,9 @@
|
|
|
47
47
|
* environment has no deploy of the component). When they are all equal the
|
|
48
48
|
* member has no entries. When the environment's deploy names no release, or
|
|
49
49
|
* the release it names can't be read, the member has a hole: nothing says
|
|
50
|
-
* what the environment runs, so the change can't be shown empty.
|
|
50
|
+
* what the environment runs, so the change can't be shown empty. So does a
|
|
51
|
+
* component a promote, rollback or redeploy left failed or gated with nothing
|
|
52
|
+
* recorded since (#4035): its record names what ran before that run.
|
|
51
53
|
*/
|
|
52
54
|
import type { CapabilityRegistry } from "./capability.js";
|
|
53
55
|
import { type DriverComponent } from "./driver.js";
|
|
@@ -79,6 +81,12 @@ export interface ReleaseChangeSetInput {
|
|
|
79
81
|
registry: CapabilityRegistry;
|
|
80
82
|
/** Per component, what `env` runs now. A component missing here has never been deployed to it. */
|
|
81
83
|
current: ReadonlyMap<string, CurrentDeploy>;
|
|
84
|
+
/**
|
|
85
|
+
* Components a promote, rollback or redeploy left failed or gated in `env`
|
|
86
|
+
* with nothing recorded since (#4035), each with why. What they run is not
|
|
87
|
+
* known, so each is a hole whatever its ledger record says.
|
|
88
|
+
*/
|
|
89
|
+
unsettled?: ReadonlyMap<string, string>;
|
|
82
90
|
/** Outputs supplied by the caller (`--seed-outputs`). */
|
|
83
91
|
seededOutputs?: Record<string, Record<string, unknown>>;
|
|
84
92
|
/** The chant version to record in the document. */
|
|
@@ -94,6 +102,8 @@ export declare function chantComponentPart(input: {
|
|
|
94
102
|
env: string;
|
|
95
103
|
digest: string;
|
|
96
104
|
current: CurrentDeploy | undefined;
|
|
105
|
+
/** Why the component is unsettled in `env` (#4035), when it is. */
|
|
106
|
+
unsettled?: string;
|
|
97
107
|
}): ChangeSetPart;
|
|
98
108
|
/**
|
|
99
109
|
* Plan the release's change set for `env`: one part per promoted component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-gate.d.ts","sourceRoot":"","sources":["../../src/components/release-gate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"release-gate.d.ts","sourceRoot":"","sources":["../../src/components/release-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAA0D,KAAK,eAAe,EAAsD,MAAM,UAAU,CAAC;AAE5J,OAAO,EAAY,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EAIL,KAAK,iBAAiB,EACtB,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