@intentius/chant-lexicon-pulumi 0.124.55 → 0.124.56
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/check-step.d.ts +61 -0
- package/dist/check-step.d.ts.map +1 -0
- package/dist/check-step.js +270 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/dist/member-outputs.d.ts +10 -3
- package/dist/member-outputs.d.ts.map +1 -1
- package/dist/member-outputs.js +11 -3
- package/dist/planned-output-changes.d.ts +60 -0
- package/dist/planned-output-changes.d.ts.map +1 -0
- package/dist/planned-output-changes.js +94 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +13 -0
- package/dist/preview-tips.d.ts +71 -0
- package/dist/preview-tips.d.ts.map +1 -0
- package/dist/preview-tips.js +76 -0
- package/dist/pulumi-up.d.ts +8 -0
- package/dist/pulumi-up.d.ts.map +1 -1
- package/dist/pulumi-up.js +15 -2
- package/dist/run.d.ts +23 -4
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +51 -10
- package/package.json +2 -2
- package/src/check-step.test.ts +191 -0
- package/src/check-step.ts +316 -0
- package/src/index.ts +2 -0
- package/src/member-outputs.test.ts +28 -6
- package/src/member-outputs.ts +22 -4
- package/src/planned-output-changes.test.ts +85 -0
- package/src/planned-output-changes.ts +141 -0
- package/src/plugin.ts +14 -0
- package/src/preview-tips.test.ts +135 -0
- package/src/preview-tips.ts +128 -0
- package/src/pulumi-up.ts +23 -2
- package/src/run-plan-flags.test.ts +53 -0
- package/src/run.test.ts +1 -1
- package/src/run.ts +53 -10
package/dist/plugin.js
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
* takes a `<project>/<stack>` template, and `prEnvTeardown` removes the
|
|
38
38
|
* environment's `pr-<n>` stacks (`./review-stack.ts`).
|
|
39
39
|
*/
|
|
40
|
+
import { pulumiCheckSteps } from "./check-step.js";
|
|
40
41
|
import { pulumiCiSetup } from "./ci-setup.js";
|
|
41
42
|
import { basename, isAbsolute, resolve } from "node:path";
|
|
42
43
|
import { createSkillsLoader } from "@intentius/chant/lexicon-plugin-helpers";
|
|
@@ -84,6 +85,18 @@ export const pulumiPlugin = {
|
|
|
84
85
|
prEnvTeardown(ctx) {
|
|
85
86
|
return reviewStackTeardown({ cwd: ctx.cwd });
|
|
86
87
|
},
|
|
88
|
+
// #4633: pulumi install, each stack's config against the project's schema, and pulumi about --json, per pulumi member in chant's check stage.
|
|
89
|
+
checkSteps() {
|
|
90
|
+
return pulumiCheckSteps();
|
|
91
|
+
},
|
|
92
|
+
// #4634: preview tips (rename without aliases, a replace forced by a name, what may register at up) as a note section per member.
|
|
93
|
+
async prNoteDetail(input) {
|
|
94
|
+
if (input.stage !== "plan")
|
|
95
|
+
return undefined;
|
|
96
|
+
const [{ pulumiTipsDetail }, { activeProductWords }] = await Promise.all([import("./preview-tips.js"), import("@intentius/chant/ci-product-words")]);
|
|
97
|
+
const words = activeProductWords();
|
|
98
|
+
return pulumiTipsDetail({ member: input.member, changeSet: input.changeSet, words: { product: words.product, noun: words.noun } });
|
|
99
|
+
},
|
|
87
100
|
// A pulumi workspace member's reader project (#3179): its stack export from
|
|
88
101
|
// the index store, else the checked-in one, never the program. See ./workspace-member.ts. `chant workspace
|
|
89
102
|
// graph` writes `dir` absolute; a project that writes the namespace itself
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview tips from a Pulumi member's change set (#4634). A tip names a
|
|
3
|
+
* pattern in a preview that usually wants a fix before the update: the
|
|
4
|
+
* product holds each tip's words and fix (plywood's `src/tips.ts` and
|
|
5
|
+
* `plywood tips <id>`), and this module finds the pattern in the change set
|
|
6
|
+
* the preview became (`./change-set.ts`). The note shows each tip as a row
|
|
7
|
+
* with its id, through the lexicon's `prNoteDetail`.
|
|
8
|
+
*
|
|
9
|
+
* | id | found when |
|
|
10
|
+
* |---|---|
|
|
11
|
+
* | `rename-without-aliases` | the preview deletes a resource and creates one of the same type whose name has the same stem, or the same name under another parent |
|
|
12
|
+
* | `replace-on-name` | a replace that creates before it deletes, forced by a name input (`name`, `<x>Name`, `bucket`) |
|
|
13
|
+
* | `unknown-in-apply` | an entry the preview could not list (`mayAppear`): something registers inside an `apply()` |
|
|
14
|
+
*
|
|
15
|
+
* A rename with `aliases` is not a delete and a create: Pulumi follows the
|
|
16
|
+
* alias and the preview shows the resource under its new URN as `same` or
|
|
17
|
+
* `update`. So a delete and a create of one type and stem in one preview is
|
|
18
|
+
* the rename without them. The stem is the name up to its first `-`, `_`,
|
|
19
|
+
* `.`, `:` or `/`, lowercased, so `assets` and `assets-v2` pair, and so
|
|
20
|
+
* does `worker-2` with a new `worker-3`; each delete pairs with one create
|
|
21
|
+
* at most.
|
|
22
|
+
*
|
|
23
|
+
* Tips plywood lists that a change set cannot show are left out:
|
|
24
|
+
* `secret-in-plain-config` reads stack config, which no preview step holds,
|
|
25
|
+
* and `no-protect-on-data` reads `protect`, which the change set does not
|
|
26
|
+
* carry.
|
|
27
|
+
*/
|
|
28
|
+
import type { ChangeSetDocument, ChangeSetEntry } from "@intentius/chant/change-set";
|
|
29
|
+
/** The tip ids this module finds, as plywood's tips page names them. */
|
|
30
|
+
export declare const PULUMI_PREVIEW_TIP_IDS: readonly ["rename-without-aliases", "replace-on-name", "unknown-in-apply"];
|
|
31
|
+
export type PulumiPreviewTipId = (typeof PULUMI_PREVIEW_TIP_IDS)[number];
|
|
32
|
+
/** One tip found in a member's change set. */
|
|
33
|
+
export interface PulumiPreviewTip {
|
|
34
|
+
id: PulumiPreviewTipId;
|
|
35
|
+
member: string;
|
|
36
|
+
/** The entry's address (a URN, or a may-appear address). */
|
|
37
|
+
address: string;
|
|
38
|
+
type: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
/** For a rename: the created resource's address and name. */
|
|
41
|
+
created?: {
|
|
42
|
+
address: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
};
|
|
45
|
+
/** For a replace: the name inputs that force it. */
|
|
46
|
+
inputs?: string[];
|
|
47
|
+
}
|
|
48
|
+
/** The stem a rename keeps: the name up to its first separator, lowercased. */
|
|
49
|
+
export declare function nameStem(name: string): string;
|
|
50
|
+
/** The tips in `entries`, in order: renames, then replaces, then what may register at up. Only pulumi entries are read. */
|
|
51
|
+
export declare function pulumiPreviewTips(entries: readonly ChangeSetEntry[]): PulumiPreviewTip[];
|
|
52
|
+
/** The words the detail section reads: the product's name and its noun. */
|
|
53
|
+
export interface PulumiTipWords {
|
|
54
|
+
product: string;
|
|
55
|
+
noun: [string, string];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The note's detail section for one member's tips (`prNoteDetail`), or
|
|
59
|
+
* undefined when it has none. One row per tip, with its id first. A product
|
|
60
|
+
* other than chant gets a closing line naming `<product> tips <id>`, the
|
|
61
|
+
* command its words give the fix with.
|
|
62
|
+
*/
|
|
63
|
+
export declare function pulumiTipsDetail(input: {
|
|
64
|
+
member: string;
|
|
65
|
+
changeSet: Pick<ChangeSetDocument, "entries">;
|
|
66
|
+
words?: PulumiTipWords;
|
|
67
|
+
}): {
|
|
68
|
+
title: string;
|
|
69
|
+
lines: string[];
|
|
70
|
+
} | undefined;
|
|
71
|
+
//# sourceMappingURL=preview-tips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-tips.d.ts","sourceRoot":"","sources":["../src/preview-tips.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAErF,wEAAwE;AACxE,eAAO,MAAM,sBAAsB,YAAI,wBAAwB,EAAE,iBAAiB,EAAE,kBAAkB,CAAU,CAAC;AAEjH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,8CAA8C;AAC9C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,kBAAkB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C;AAKD,2HAA2H;AAC3H,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,gBAAgB,EAAE,CA8BxF;AAgBD,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,cAAc,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAYjL"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** The tip ids this module finds, as plywood's tips page names them. */
|
|
2
|
+
export const PULUMI_PREVIEW_TIP_IDS = ["rename-without-aliases", "replace-on-name", "unknown-in-apply"];
|
|
3
|
+
/** The stem a rename keeps: the name up to its first separator, lowercased. */
|
|
4
|
+
export function nameStem(name) {
|
|
5
|
+
return name.toLowerCase().split(/[-_.:/]/)[0] ?? "";
|
|
6
|
+
}
|
|
7
|
+
/** A name input: `name`, `<x>Name`, `<x>_name`, or an S3 bucket's `bucket`. */
|
|
8
|
+
const NAME_INPUT = /^(name|bucket|[a-z][A-Za-z0-9]*Name|[a-z0-9_]+_name)$/;
|
|
9
|
+
/** The tips in `entries`, in order: renames, then replaces, then what may register at up. Only pulumi entries are read. */
|
|
10
|
+
export function pulumiPreviewTips(entries) {
|
|
11
|
+
const mine = entries.filter((e) => e.lexicon === "pulumi");
|
|
12
|
+
const tips = [];
|
|
13
|
+
const base = (e) => ({ member: e.member, address: e.address, type: e.type, ...(e.name !== undefined ? { name: e.name } : {}) });
|
|
14
|
+
// rename-without-aliases
|
|
15
|
+
const creates = mine.filter((e) => e.action === "create" && e.mayAppear !== true && e.name !== undefined);
|
|
16
|
+
const taken = new Set();
|
|
17
|
+
for (const del of mine) {
|
|
18
|
+
if (del.action !== "delete" || del.mayAppear === true || del.name === undefined)
|
|
19
|
+
continue;
|
|
20
|
+
const stem = nameStem(del.name);
|
|
21
|
+
if (!stem)
|
|
22
|
+
continue;
|
|
23
|
+
const match = creates.find((c) => !taken.has(c.address) && c.member === del.member && c.type === del.type && c.address !== del.address && nameStem(c.name) === stem);
|
|
24
|
+
if (!match)
|
|
25
|
+
continue;
|
|
26
|
+
taken.add(match.address);
|
|
27
|
+
tips.push({ id: "rename-without-aliases", ...base(del), created: { address: match.address, ...(match.name !== undefined ? { name: match.name } : {}) } });
|
|
28
|
+
}
|
|
29
|
+
// replace-on-name
|
|
30
|
+
for (const e of mine) {
|
|
31
|
+
if (e.action !== "replace" || e.disruption === "destroy")
|
|
32
|
+
continue;
|
|
33
|
+
const inputs = e.attributes.filter((a) => a.forcesReplacement === true && NAME_INPUT.test(a.path)).map((a) => a.path);
|
|
34
|
+
if (inputs.length > 0)
|
|
35
|
+
tips.push({ id: "replace-on-name", ...base(e), inputs });
|
|
36
|
+
}
|
|
37
|
+
// unknown-in-apply
|
|
38
|
+
for (const e of mine) {
|
|
39
|
+
if (e.mayAppear === true)
|
|
40
|
+
tips.push({ id: "unknown-in-apply", ...base(e) });
|
|
41
|
+
}
|
|
42
|
+
return tips;
|
|
43
|
+
}
|
|
44
|
+
const code = (s) => "`" + s.replace(/`/g, "'") + "`";
|
|
45
|
+
/** What the row says the preview showed. */
|
|
46
|
+
function seen(t) {
|
|
47
|
+
switch (t.id) {
|
|
48
|
+
case "rename-without-aliases":
|
|
49
|
+
return `deleted, and ${code(t.created?.name ?? t.created?.address ?? "?")} of the same type created, with no alias between them`;
|
|
50
|
+
case "replace-on-name":
|
|
51
|
+
return `replaced because ${t.inputs.map(code).join(", ")} changed, creating the new one before deleting the old`;
|
|
52
|
+
case "unknown-in-apply":
|
|
53
|
+
return "may register at up: the preview could not list it";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The note's detail section for one member's tips (`prNoteDetail`), or
|
|
58
|
+
* undefined when it has none. One row per tip, with its id first. A product
|
|
59
|
+
* other than chant gets a closing line naming `<product> tips <id>`, the
|
|
60
|
+
* command its words give the fix with.
|
|
61
|
+
*/
|
|
62
|
+
export function pulumiTipsDetail(input) {
|
|
63
|
+
const tips = pulumiPreviewTips(input.changeSet.entries.filter((e) => e.member === input.member));
|
|
64
|
+
if (tips.length === 0)
|
|
65
|
+
return undefined;
|
|
66
|
+
const words = input.words ?? { product: "chant", noun: ["member", "members"] };
|
|
67
|
+
const lines = ["| Tip | Resource | Preview |", "|---|---|---|"];
|
|
68
|
+
for (const t of tips)
|
|
69
|
+
lines.push(`| ${code(t.id)} | ${code(t.type)} ${code(t.name ?? t.address)} | ${seen(t)} |`);
|
|
70
|
+
if (words.product !== "chant") {
|
|
71
|
+
const ids = [...new Set(tips.map((t) => t.id))];
|
|
72
|
+
lines.push("", `${ids.map((id) => code(`${words.product} tips ${id}`)).join(", ")} ${ids.length === 1 ? "prints the fix" : "print the fixes"}.`);
|
|
73
|
+
}
|
|
74
|
+
const noun = words.noun[0];
|
|
75
|
+
return { title: `Tips for ${noun} ${code(input.member)} (${tips.length})`, lines };
|
|
76
|
+
}
|
package/dist/pulumi-up.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ import type { GatePolicyFindings } from "@intentius/chant/gate-policy";
|
|
|
133
133
|
import type { SnapshotStore } from "@intentius/chant/lifecycle/snapshot-store";
|
|
134
134
|
import { type PulumiApplySummary } from "./engine-events.js";
|
|
135
135
|
import { type PulumiMemberEngine, type PulumiMemberEngineSource } from "./member-engine.js";
|
|
136
|
+
import type { PulumiOutputChange } from "./planned-output-changes.js";
|
|
136
137
|
import { type PulumiPolicyPack, type PulumiRunner } from "./run.js";
|
|
137
138
|
import { type PulumiExportWrite } from "./stack-export-snapshot.js";
|
|
138
139
|
/** The lock grain values of `ci.lockGrain` (#4552's ruling A). */
|
|
@@ -245,6 +246,13 @@ export interface PulumiUpArtifact {
|
|
|
245
246
|
}[];
|
|
246
247
|
lastUpdate?: string;
|
|
247
248
|
};
|
|
249
|
+
/**
|
|
250
|
+
* Each stack output's verdict from the preview (#4635,
|
|
251
|
+
* `./planned-output-changes.ts`): `changing` and `untraced` ones are
|
|
252
|
+
* unknown to the stacks that read them, `unchanged` ones keep the
|
|
253
|
+
* export's value. Absent when the preview planned nothing to apply.
|
|
254
|
+
*/
|
|
255
|
+
plannedOutputs?: PulumiOutputChange[];
|
|
248
256
|
}
|
|
249
257
|
/** The CrossGuard packs a plan read at base (#4613). */
|
|
250
258
|
export interface PulumiUpPolicyPacks {
|
package/dist/pulumi-up.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi-up.d.ts","sourceRoot":"","sources":["../src/pulumi-up.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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I,CAAC,iBAAiB,EAAE,eAAe,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAWhJ;AAwND,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIrE;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,SAAS,kBAAkB,EAAE,EACtC,IAAI,GAAE;IAAE,WAAW,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;CAAO,GAChD,OAAO,CAAC,YAAY,EAAE,CAAC,CAuBzB;AAyBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAK9E;AAgHD,0GAA0G;AAC1G,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,oBAAoB,GAAG,aAAa,GAAG,oBAAoB,GAAG,IAAI,CAqBpI;AAED,qEAAqE;AACrE,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,eAAoB,GAAG,UAAU,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CA+CtH;AAED,eAAO,MAAM,kBAAkB,mDAA6B,CAAC"}
|
package/dist/pulumi-up.js
CHANGED
|
@@ -406,7 +406,10 @@ async function previewStack(ctx, r, input, opts, files) {
|
|
|
406
406
|
stack: input.stack,
|
|
407
407
|
...(files.planFile ? { savePlan: files.planFile } : {}),
|
|
408
408
|
...(files.configFile ? { configFile: files.configFile } : {}),
|
|
409
|
+
// #4627: --refresh and --target-dependents pass to the preview as they came.
|
|
410
|
+
...(ctx.refresh ? { refresh: true } : {}),
|
|
409
411
|
...(targets ? { targets } : {}),
|
|
412
|
+
...(targets && ctx.targetDependents ? { targetDependents: true } : {}),
|
|
410
413
|
...(packs.length ? { policyPacks: packs } : {}),
|
|
411
414
|
});
|
|
412
415
|
let stdout;
|
|
@@ -509,7 +512,12 @@ async function planStack(ctx, original, opts) {
|
|
|
509
512
|
}
|
|
510
513
|
const planDigest = read.part.member.planDigest;
|
|
511
514
|
const references = stackReferencesOf(read.prior, input);
|
|
512
|
-
const planned = pulumiMemberPlannedOutputs(r.member, {
|
|
515
|
+
const planned = pulumiMemberPlannedOutputs(r.member, {
|
|
516
|
+
part: read.part,
|
|
517
|
+
preview: read.preview,
|
|
518
|
+
...(read.prior !== undefined ? { exported: read.prior } : {}),
|
|
519
|
+
...(ctx.targets?.length ? { targeted: true } : {}),
|
|
520
|
+
});
|
|
513
521
|
const artifact = {
|
|
514
522
|
kind: "pulumi-up",
|
|
515
523
|
member: r.member,
|
|
@@ -525,6 +533,7 @@ async function planStack(ctx, original, opts) {
|
|
|
525
533
|
policy: read.policy,
|
|
526
534
|
...(packs.read ? { policyPacks: packs.read } : {}),
|
|
527
535
|
...(references ? { stackReferences: references } : {}),
|
|
536
|
+
...(planned.outputChanges ? { plannedOutputs: planned.outputChanges } : {}),
|
|
528
537
|
};
|
|
529
538
|
return {
|
|
530
539
|
member: r.member,
|
|
@@ -676,6 +685,7 @@ async function runStack(ctx, original, opts) {
|
|
|
676
685
|
const tail = {
|
|
677
686
|
...(configFile ? { configFile } : {}),
|
|
678
687
|
...(targets ? { targets } : {}),
|
|
688
|
+
...(targets && ctx.targetDependents ? { targetDependents: true } : {}),
|
|
679
689
|
...(policyPacks?.length ? { policyPacks } : {}),
|
|
680
690
|
};
|
|
681
691
|
try {
|
|
@@ -700,7 +710,8 @@ async function runStack(ctx, original, opts) {
|
|
|
700
710
|
throw new PlanShapeMovedError(r.member, differences);
|
|
701
711
|
}
|
|
702
712
|
try {
|
|
703
|
-
|
|
713
|
+
// #4627: stock up plans again, so it refreshes as its preview did; plunge applies the saved plan, whose preview refreshed.
|
|
714
|
+
({ stdout } = await runApplyPulumi(runnersFor(r, opts).pulumi, pulumiUpArgs({ stack: input.stack, ...tail, ...(ctx.refresh ? { refresh: true } : {}) }), r.dir));
|
|
704
715
|
}
|
|
705
716
|
catch (err) {
|
|
706
717
|
throw upFailure(r, err, approved.policy);
|
|
@@ -779,6 +790,8 @@ export function createPulumiUpCapability(opts = {}) {
|
|
|
779
790
|
rollbackPolicy: "needs-opt-out",
|
|
780
791
|
// Each target passes as `--target <urn>` to the preview and to `up`.
|
|
781
792
|
targets: "accept",
|
|
793
|
+
// #4627: `--refresh` and `--target-dependents` pass to the preview, and to `pulumi up`; the digest binds them.
|
|
794
|
+
planFlags: { refresh: "accept", targetDependents: "accept" },
|
|
782
795
|
plan: (ctx, input) => planStack(ctx, input, opts),
|
|
783
796
|
run: (ctx, input) => runStack(ctx, input, opts),
|
|
784
797
|
// The outputs standing now, for a dependent planned before this stack applies.
|
package/dist/run.d.ts
CHANGED
|
@@ -71,10 +71,13 @@ export declare function engineRunnerAt(bin: string): PulumiRunner;
|
|
|
71
71
|
* that is not empty and does not start with `-`; `[…]` is optional; `…`
|
|
72
72
|
* repeats.
|
|
73
73
|
*
|
|
74
|
-
* `up` is refused with `--skip-preview`, `--
|
|
75
|
-
* `--replace`, `--
|
|
76
|
-
* `--
|
|
77
|
-
*
|
|
74
|
+
* `up` is refused with `--skip-preview`, `--show-secrets`, `--replace`,
|
|
75
|
+
* `--target-replace`, `--exclude`, `--remote`, `--continue-on-error`,
|
|
76
|
+
* `--config` and any flag not here, since none of them is in the list.
|
|
77
|
+
* `--refresh` and `--target-dependents` (#4627) come in the tail's order,
|
|
78
|
+
* `--target-dependents` only after a `--target`. plunge's `up --plan`
|
|
79
|
+
* applies a saved plan whose preview did the refresh, so it takes no
|
|
80
|
+
* `--refresh`.
|
|
78
81
|
*/
|
|
79
82
|
export declare const PULUMI_APPLY_COMMANDS: readonly string[];
|
|
80
83
|
/** A CrossGuard pack the preview and `up` run (ruling 7: in the preview job, feeding chant's gate). */
|
|
@@ -89,6 +92,10 @@ export interface PulumiApplyTail {
|
|
|
89
92
|
/** A scratch copy of the stack's config file, passed as `--config-file` (#4541): never `--config`, which writes the working tree's file. */
|
|
90
93
|
configFile?: string;
|
|
91
94
|
targets?: readonly string[];
|
|
95
|
+
/** `--refresh` (#4627): refresh the stack's state before the preview or `pulumi up`. */
|
|
96
|
+
refresh?: boolean;
|
|
97
|
+
/** `--target-dependents` (#4627): with `targets`, their dependents too. */
|
|
98
|
+
targetDependents?: boolean;
|
|
92
99
|
policyPacks?: readonly PulumiPolicyPack[];
|
|
93
100
|
}
|
|
94
101
|
/**
|
|
@@ -258,6 +265,18 @@ export declare const PULUMI_INSTALL_COMMANDS: readonly string[];
|
|
|
258
265
|
export declare function runReleaseInstall(run: PulumiRunner, args: string[], cwd: string, env?: Record<string, string>): Promise<{
|
|
259
266
|
stdout: string;
|
|
260
267
|
}>;
|
|
268
|
+
/**
|
|
269
|
+
* The two argv the check stage runs for a member (#4633, `./check-step.ts`):
|
|
270
|
+
* `install` with no flag, and `about --json`, optionally with `--stack
|
|
271
|
+
* <stack>`. Under `pulumi` or `plunge`; the runner picks the binary.
|
|
272
|
+
*/
|
|
273
|
+
export declare const PULUMI_CHECK_COMMANDS: readonly string[];
|
|
274
|
+
/** Whether `args` is one of {@link PULUMI_CHECK_COMMANDS}' argv. */
|
|
275
|
+
export declare function allowedCheck(args: readonly string[]): boolean;
|
|
276
|
+
/** Run a check-stage argv, refusing any other. The runner picks the binary. */
|
|
277
|
+
export declare function runCheckPulumi(run: PulumiRunner, args: string[], cwd: string, env?: Record<string, string>): Promise<{
|
|
278
|
+
stdout: string;
|
|
279
|
+
}>;
|
|
261
280
|
export { pulumiMemberEngine, readPlywoodEngine, type PulumiMemberEngine, type PulumiMemberEngineSource, type PulumiMemberEngineOptions } from "./member-engine.js";
|
|
262
281
|
/** The argv chant runs for a member's applied outputs, after `pulumi` (#4455). Secrets stay blinded. */
|
|
263
282
|
export declare function pulumiStackOutputArgs(opts?: {
|
package/dist/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":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AAC,WAAW,EAAE,CAAC,CA4DlG;AAED,MAAM,WAAW,wBAAwB;IACvC,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2HAA2H;IAC3H,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,qIAAqI;IACrI,WAAW,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACpC;AAED,mFAAmF;AACnF,MAAM,MAAM,qBAAqB,GAC7B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7F;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAmBtG"}
|
package/dist/run.js
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
* - for a review stack alone (`pr-<n>`, INTENTIUS/plywood#15), `stack
|
|
29
29
|
* init`, `destroy --yes` and `stack rm --yes`, through
|
|
30
30
|
* {@link runReviewStackPulumi} and {@link runReviewStackPlunge} only;
|
|
31
|
+
* - for the check stage (#4633, `./check-step.ts`), `pulumi install` and
|
|
32
|
+
* `pulumi about --json [--stack <stack>]`, or the same under `plunge`,
|
|
33
|
+
* through {@link runCheckPulumi} alone. The install fetches the program's
|
|
34
|
+
* dependencies and plugins; `about` reads the engine, plugins and backend.
|
|
35
|
+
* Neither writes a stack, and both run with no forge token or cloud
|
|
36
|
+
* credential in their environment;
|
|
31
37
|
* - for a member on plunge, its engine graph (#4529, ruled on #4520), as
|
|
32
38
|
* exactly one of `plunge graph --json`, `plunge graph --json --stack
|
|
33
39
|
* <stack>`, `plunge graph --json --versions` and `plunge graph --json
|
|
@@ -267,19 +273,25 @@ export function engineRunnerAt(bin) {
|
|
|
267
273
|
* that is not empty and does not start with `-`; `[…]` is optional; `…`
|
|
268
274
|
* repeats.
|
|
269
275
|
*
|
|
270
|
-
* `up` is refused with `--skip-preview`, `--
|
|
271
|
-
* `--replace`, `--
|
|
272
|
-
* `--
|
|
273
|
-
*
|
|
276
|
+
* `up` is refused with `--skip-preview`, `--show-secrets`, `--replace`,
|
|
277
|
+
* `--target-replace`, `--exclude`, `--remote`, `--continue-on-error`,
|
|
278
|
+
* `--config` and any flag not here, since none of them is in the list.
|
|
279
|
+
* `--refresh` and `--target-dependents` (#4627) come in the tail's order,
|
|
280
|
+
* `--target-dependents` only after a `--target`. plunge's `up --plan`
|
|
281
|
+
* applies a saved plan whose preview did the refresh, so it takes no
|
|
282
|
+
* `--refresh`.
|
|
274
283
|
*/
|
|
275
284
|
export const PULUMI_APPLY_COMMANDS = [
|
|
276
|
-
"plunge up --plan <file> --yes --json --stack <stack> [--config-file <file>] [--target <urn
|
|
277
|
-
"pulumi up --yes --json --stack <stack> [--config-file <file>] [--target <urn
|
|
285
|
+
"plunge up --plan <file> --yes --json --stack <stack> [--config-file <file>] [--target <urn>... [--target-dependents]] [--policy-pack <dir> [--policy-pack-config <file>]]...",
|
|
286
|
+
"pulumi up --yes --json --stack <stack> [--config-file <file>] [--refresh] [--target <urn>... [--target-dependents]] [--policy-pack <dir> [--policy-pack-config <file>]]...",
|
|
278
287
|
];
|
|
279
288
|
function tailArgs(t) {
|
|
289
|
+
const targets = t.targets ?? [];
|
|
280
290
|
return [
|
|
281
291
|
...(t.configFile ? ["--config-file", t.configFile] : []),
|
|
282
|
-
...(t.
|
|
292
|
+
...(t.refresh ? ["--refresh"] : []),
|
|
293
|
+
...targets.flatMap((u) => ["--target", u]),
|
|
294
|
+
...(t.targetDependents && targets.length > 0 ? ["--target-dependents"] : []),
|
|
283
295
|
...(t.policyPacks ?? []).flatMap((p) => ["--policy-pack", p.dir, ...(p.config ? ["--policy-pack-config", p.config] : [])]),
|
|
284
296
|
];
|
|
285
297
|
}
|
|
@@ -301,19 +313,25 @@ export function pulumiUpArgs(opts) {
|
|
|
301
313
|
return ["up", "--yes", "--json", "--stack", opts.stack, ...tailArgs(opts)];
|
|
302
314
|
}
|
|
303
315
|
const isValue = (v) => typeof v === "string" && v.length > 0 && !v.startsWith("-");
|
|
304
|
-
/** Whether `rest` is exactly an apply tail, in its order. */
|
|
305
|
-
function wellFormedTail(rest) {
|
|
316
|
+
/** Whether `rest` is exactly an apply tail, in its order; `refresh` says whether `--refresh` may stand in it (#4627). */
|
|
317
|
+
function wellFormedTail(rest, refresh = true) {
|
|
306
318
|
let i = 0;
|
|
307
319
|
if (rest[i] === "--config-file") {
|
|
308
320
|
if (!isValue(rest[i + 1]))
|
|
309
321
|
return false;
|
|
310
322
|
i += 2;
|
|
311
323
|
}
|
|
324
|
+
if (refresh && rest[i] === "--refresh")
|
|
325
|
+
i += 1;
|
|
326
|
+
let targets = 0;
|
|
312
327
|
while (rest[i] === "--target") {
|
|
313
328
|
if (!isValue(rest[i + 1]))
|
|
314
329
|
return false;
|
|
315
330
|
i += 2;
|
|
331
|
+
targets++;
|
|
316
332
|
}
|
|
333
|
+
if (targets > 0 && rest[i] === "--target-dependents")
|
|
334
|
+
i += 1;
|
|
317
335
|
while (rest[i] === "--policy-pack") {
|
|
318
336
|
if (!isValue(rest[i + 1]))
|
|
319
337
|
return false;
|
|
@@ -335,7 +353,7 @@ function allowedPlungeUp(args) {
|
|
|
335
353
|
args[4] === "--json" &&
|
|
336
354
|
args[5] === "--stack" &&
|
|
337
355
|
isValue(args[6]) &&
|
|
338
|
-
wellFormedTail(args.slice(7)));
|
|
356
|
+
wellFormedTail(args.slice(7), false));
|
|
339
357
|
}
|
|
340
358
|
/** Exactly `pulumi up --yes --json --stack <stack>` and a tail. */
|
|
341
359
|
function allowedPulumiUp(args) {
|
|
@@ -573,6 +591,29 @@ export async function runReleaseInstall(run, args, cwd, env) {
|
|
|
573
591
|
}
|
|
574
592
|
return run(args, env ? { cwd, env } : { cwd });
|
|
575
593
|
}
|
|
594
|
+
/**
|
|
595
|
+
* The two argv the check stage runs for a member (#4633, `./check-step.ts`):
|
|
596
|
+
* `install` with no flag, and `about --json`, optionally with `--stack
|
|
597
|
+
* <stack>`. Under `pulumi` or `plunge`; the runner picks the binary.
|
|
598
|
+
*/
|
|
599
|
+
export const PULUMI_CHECK_COMMANDS = ["pulumi install", "pulumi about --json [--stack <stack>]", "plunge install", "plunge about --json [--stack <stack>]"];
|
|
600
|
+
/** Whether `args` is one of {@link PULUMI_CHECK_COMMANDS}' argv. */
|
|
601
|
+
export function allowedCheck(args) {
|
|
602
|
+
if (args.length === 1)
|
|
603
|
+
return args[0] === "install";
|
|
604
|
+
if (args[0] !== "about" || args[1] !== "--json")
|
|
605
|
+
return false;
|
|
606
|
+
if (args.length === 2)
|
|
607
|
+
return true;
|
|
608
|
+
return args.length === 4 && args[2] === "--stack" && isValue(args[3]);
|
|
609
|
+
}
|
|
610
|
+
/** Run a check-stage argv, refusing any other. The runner picks the binary. */
|
|
611
|
+
export async function runCheckPulumi(run, args, cwd, env) {
|
|
612
|
+
if (!allowedCheck(args)) {
|
|
613
|
+
throw new Error(`the check stage runs only ${PULUMI_CHECK_COMMANDS.join(", ")} for a Pulumi member, not ${args.join(" ")}`);
|
|
614
|
+
}
|
|
615
|
+
return run(args, env ? { cwd, env } : { cwd });
|
|
616
|
+
}
|
|
576
617
|
export { pulumiMemberEngine, readPlywoodEngine } from "./member-engine.js";
|
|
577
618
|
/** The argv chant runs for a member's applied outputs, after `pulumi` (#4455). Secrets stay blinded. */
|
|
578
619
|
export function pulumiStackOutputArgs(opts = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-pulumi",
|
|
3
|
-
"version": "0.124.
|
|
3
|
+
"version": "0.124.56",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@intentius/chant": "^0.124.
|
|
57
|
+
"@intentius/chant": "^0.124.56",
|
|
58
58
|
"zod": "^4.3.6"
|
|
59
59
|
},
|
|
60
60
|
"description": "pulumi lexicon for chant: a Pulumi program as a workspace member, its preview in the change set and its refresh as drift records",
|