@intentius/chant-lexicon-pulumi 0.124.56 → 0.124.57
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/README.md +1 -1
- package/dist/changed-units.d.ts +5 -0
- package/dist/changed-units.d.ts.map +1 -0
- package/dist/changed-units.js +101 -0
- package/dist/composites/pulumi-adopt-op.d.ts.map +1 -1
- package/dist/composites/pulumi-adopt-op.js +4 -2
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/dist/op/activities/pulumi-adopt.d.ts +5 -0
- package/dist/op/activities/pulumi-adopt.d.ts.map +1 -1
- package/dist/op/activities/pulumi-adopt.js +7 -2
- package/dist/op/activity-contracts.d.ts +2 -0
- package/dist/op/activity-contracts.d.ts.map +1 -1
- package/dist/op/activity-contracts.js +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +11 -0
- package/dist/pulumi-up.d.ts +16 -1
- package/dist/pulumi-up.d.ts.map +1 -1
- package/dist/pulumi-up.js +49 -14
- package/dist/release-copy.d.ts +42 -2
- package/dist/release-copy.d.ts.map +1 -1
- package/dist/release-copy.js +96 -22
- package/dist/run.d.ts +4 -4
- package/dist/run.js +4 -4
- package/package.json +2 -2
- package/src/changed-units.test.ts +87 -0
- package/src/changed-units.ts +96 -0
- package/src/composites/pulumi-adopt-op.test.ts +35 -0
- package/src/composites/pulumi-adopt-op.ts +4 -2
- package/src/op/activities/pulumi-adopt.ts +13 -2
- package/src/op/activity-contracts.ts +2 -2
- package/src/plugin.ts +12 -0
- package/src/pulumi-up.test.ts +100 -0
- package/src/pulumi-up.ts +61 -16
- package/src/release-copy.test.ts +90 -2
- package/src/release-copy.ts +103 -22
- package/src/run.ts +4 -4
- package/src/stack-export-snapshot.test.ts +3 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ A step pinned to its own engine release sets `engineVersion` (and `engineRoot` w
|
|
|
27
27
|
|
|
28
28
|
The CI install lines take a version, download the release's Linux archive and its checksums file, and fail unless the archive matches its line there. For the default releases (Pulumi 3.272.0, plunge 0.1.0) the line must also hold the sha256 the lexicon records per architecture. Each release goes under its own versioned directory and is linked into `/usr/local/bin`, and a line skips the download when that directory already holds the binary, or for Pulumi when the `pulumi` on PATH is that version.
|
|
29
29
|
|
|
30
|
-
The preview streams its engine events (`PULUMI_ENABLE_STREAMING_JSON_PREVIEW=true`, `src/engine-events.ts`), so one run gives the change set and CrossGuard's findings. A mandatory violation denies the plan. On plunge the saved plan's stamp refuses a plan whose records moved (plunge exit 40, chant's moved code 4). On stock Pulumi the apply previews again, then compares the steps in `up`'s event stream with the approved shape (`src/plan-shape.ts`), and a step outside it fails the apply. A member on the resource lock grain, the default on plunge, leaves `same` and `read` steps out of its digest. The step's `config` is written into a scratch copy of `Pulumi.<stack>.yaml` and passed with `--config-file`, never `--config`, which writes the working tree's file. A release cut records the stack's directory (`releaseInputs`), unless its backend is a file path relative to that directory. Under a release, a promote or rollback previews and applies the recorded copy, after `pulumi install` (or `plunge install`) in the copy when its runtime needs one (`src/release-copy.ts`); a Node copy with no recorded lockfile is refused by name.
|
|
30
|
+
The preview streams its engine events (`PULUMI_ENABLE_STREAMING_JSON_PREVIEW=true`, `src/engine-events.ts`), so one run gives the change set and CrossGuard's findings. A mandatory violation denies the plan. On plunge the saved plan's stamp refuses a plan whose records moved (plunge exit 40, chant's moved code 4). On stock Pulumi the apply previews again, then compares the steps in `up`'s event stream with the approved shape (`src/plan-shape.ts`), and a step outside it fails the apply. A member on the resource lock grain, the default on plunge, leaves `same` and `read` steps out of its digest. The step's `config` is written into a scratch copy of `Pulumi.<stack>.yaml` and passed with `--config-file`, never `--config`, which writes the working tree's file. A release cut records the stack's directory (`releaseInputs`), unless its backend is a file path relative to that directory. Under a release, a promote or rollback previews and applies the recorded copy, after `pulumi install` (or `plunge install`) in the copy when its runtime needs one (`src/release-copy.ts`); a Node copy with no recorded lockfile is refused by name. A job's checkout gets the same install before its first engine run when nothing installed the program there (`prepareProgram`), and a Node checkout with no lockfile is refused by name.
|
|
31
31
|
|
|
32
32
|
After `up`, the capability runs `stack export --stack <s>`, replaces every secret with `[secret]`, drops the secrets provider's state, and writes the export through chant's index store as `<env>/<stack>__pulumi-export` ([#4546](https://github.com/INTENTIUS/chant/issues/4546), `refs/chant/snapshots` by default). The graph, the preview's prior state and the drift read take that export first, so a stack chant applies needs no checked-in `stack-export.json`. A failed export leaves the apply standing and says why in the step's `exportSnapshot` output.
|
|
33
33
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** The unit core names for a `pulumi-up` step on `stack` in `dir` (deploy-units.ts `pulumiStackUnit`). */
|
|
2
|
+
export declare function pulumiStackUnit(dir: string, stack: string): string;
|
|
3
|
+
/** The stack units `changedFiles` (relative to `projectRoot`, `/` separators) touch, sorted. */
|
|
4
|
+
export declare function pulumiChangedUnits(projectRoot: string, changedFiles: readonly string[]): string[];
|
|
5
|
+
//# sourceMappingURL=changed-units.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changed-units.d.ts","sourceRoot":"","sources":["../src/changed-units.ts"],"names":[],"mappings":"AAgCA,0GAA0G;AAC1G,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGlE;AA2CD,gGAAgG;AAChG,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAejG"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Pulumi stacks a change touched, judged from the changed files alone
|
|
3
|
+
* (`LexiconPlugin.changedUnits`, #3183; INTENTIUS/plywood#22). A Pulumi
|
|
4
|
+
* program and its stack configs are not chant source, so `chant lifecycle
|
|
5
|
+
* affected`'s artifact diff never shows them, and without this a pull request
|
|
6
|
+
* that edits `Pulumi.dev.yaml` selects no component at all.
|
|
7
|
+
*
|
|
8
|
+
* A file belongs to the nearest directory at or above it holding a
|
|
9
|
+
* `Pulumi.yaml` (or `Pulumi.yml`), the project, never above the project root:
|
|
10
|
+
*
|
|
11
|
+
* - `Pulumi.<stack>.yaml` in that directory is the stack's config, so it
|
|
12
|
+
* touches that stack alone;
|
|
13
|
+
* - any other file there or below (the program, `Pulumi.yaml`, the
|
|
14
|
+
* package files) touches every stack of the project, which is each
|
|
15
|
+
* `Pulumi.<stack>.yaml` beside `Pulumi.yaml` at head and any the change
|
|
16
|
+
* deleted. A stack with no config file has no file to find it by, so a
|
|
17
|
+
* program change does not reach it.
|
|
18
|
+
*
|
|
19
|
+
* Files under a directory whose name starts with a dot (`.forgejo`, `.chant`,
|
|
20
|
+
* `.git`) or under `node_modules` are not the program. A file outside every
|
|
21
|
+
* project, such as a module the program imports from `../shared`, is not
|
|
22
|
+
* claimed.
|
|
23
|
+
*
|
|
24
|
+
* Each unit is named as core's `DEPLOY_UNIT_RULES` names a `pulumi-up` step:
|
|
25
|
+
* `<dir>/<stack>`, or `<stack>` for a project at the project root.
|
|
26
|
+
*/
|
|
27
|
+
import { existsSync, readdirSync } from "node:fs";
|
|
28
|
+
import { join, posix } from "node:path";
|
|
29
|
+
const PROJECT_FILES = ["Pulumi.yaml", "Pulumi.yml"];
|
|
30
|
+
const STACK_CONFIG = /^Pulumi\.(.+)\.ya?ml$/;
|
|
31
|
+
/** The unit core names for a `pulumi-up` step on `stack` in `dir` (deploy-units.ts `pulumiStackUnit`). */
|
|
32
|
+
export function pulumiStackUnit(dir, stack) {
|
|
33
|
+
const d = dir.replace(/\\/g, "/").replace(/^(\.\/)+/, "").replace(/\/+$/, "");
|
|
34
|
+
return d === "" || d === "." ? stack : `${d}/${stack}`;
|
|
35
|
+
}
|
|
36
|
+
/** The project directory (relative, `""` for the root) holding `file`, or undefined when none does. */
|
|
37
|
+
function projectOf(projectRoot, file, changed) {
|
|
38
|
+
let dir = posix.dirname(file);
|
|
39
|
+
for (;;) {
|
|
40
|
+
const rel = dir === "." ? "" : dir;
|
|
41
|
+
for (const name of PROJECT_FILES) {
|
|
42
|
+
const p = rel === "" ? name : `${rel}/${name}`;
|
|
43
|
+
// A deleted Pulumi.yaml still names its project for the change that deleted it.
|
|
44
|
+
if (existsSync(join(projectRoot, p)) || changed.has(p))
|
|
45
|
+
return rel;
|
|
46
|
+
}
|
|
47
|
+
if (rel === "")
|
|
48
|
+
return undefined;
|
|
49
|
+
dir = posix.dirname(dir);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/** The stacks of the project in `dir`: the stack configs at head, and the ones the change names. */
|
|
53
|
+
function stacksOf(projectRoot, dir, changed) {
|
|
54
|
+
const out = new Set();
|
|
55
|
+
let names = [];
|
|
56
|
+
try {
|
|
57
|
+
names = readdirSync(join(projectRoot, dir));
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// The project directory is gone at head; the change's own files still name stacks.
|
|
61
|
+
}
|
|
62
|
+
for (const n of names) {
|
|
63
|
+
const m = STACK_CONFIG.exec(n);
|
|
64
|
+
if (m)
|
|
65
|
+
out.add(m[1]);
|
|
66
|
+
}
|
|
67
|
+
for (const f of changed) {
|
|
68
|
+
if (posix.dirname(f) !== (dir === "" ? "." : dir))
|
|
69
|
+
continue;
|
|
70
|
+
const m = STACK_CONFIG.exec(posix.basename(f));
|
|
71
|
+
if (m)
|
|
72
|
+
out.add(m[1]);
|
|
73
|
+
}
|
|
74
|
+
return [...out];
|
|
75
|
+
}
|
|
76
|
+
function ignored(file) {
|
|
77
|
+
const parts = file.split("/");
|
|
78
|
+
return parts.slice(0, -1).some((p) => p.startsWith(".") || p === "node_modules");
|
|
79
|
+
}
|
|
80
|
+
/** The stack units `changedFiles` (relative to `projectRoot`, `/` separators) touch, sorted. */
|
|
81
|
+
export function pulumiChangedUnits(projectRoot, changedFiles) {
|
|
82
|
+
const files = changedFiles.map((f) => f.replace(/\\/g, "/").replace(/^\.\//, "")).filter((f) => f !== "" && !f.startsWith("../") && !ignored(f));
|
|
83
|
+
const changed = new Set(files);
|
|
84
|
+
const units = new Set();
|
|
85
|
+
const whole = new Set();
|
|
86
|
+
for (const f of files) {
|
|
87
|
+
const dir = projectOf(projectRoot, f, changed);
|
|
88
|
+
if (dir === undefined)
|
|
89
|
+
continue;
|
|
90
|
+
const here = posix.dirname(f) === (dir === "" ? "." : dir);
|
|
91
|
+
const m = STACK_CONFIG.exec(posix.basename(f));
|
|
92
|
+
if (here && m && !PROJECT_FILES.includes(posix.basename(f)))
|
|
93
|
+
units.add(pulumiStackUnit(dir, m[1]));
|
|
94
|
+
else
|
|
95
|
+
whole.add(dir);
|
|
96
|
+
}
|
|
97
|
+
for (const dir of whole)
|
|
98
|
+
for (const stack of stacksOf(projectRoot, dir, files))
|
|
99
|
+
units.add(pulumiStackUnit(dir, stack));
|
|
100
|
+
return [...units].sort();
|
|
101
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi-adopt-op.d.ts","sourceRoot":"","sources":["../../src/composites/pulumi-adopt-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,EAA6B,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG5E,0BAA0B;AAC1B,MAAM,WAAW,gBAAgB;IAC/B,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,mFAAmF;IACnF,GAAG,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,mHAAmH;IACnH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,sHAAsH;IACtH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,iF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AAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,sHAAsH;IACtH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,qFAAqF;IACrF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2HAA2H;IAC3H,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,OAAO,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7D;AAED,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAID,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,sBAAsB,CAwFjF"}
|
|
@@ -96,9 +96,11 @@ export function PulumiAdoptOp(config) {
|
|
|
96
96
|
}));
|
|
97
97
|
const waves = config.stacks.flatMap((s, i) => {
|
|
98
98
|
const file = s.from ? { file: exports[i].out.file } : {};
|
|
99
|
-
|
|
99
|
+
// Every step gets the stack's backend, so Preview and Adopt read the store Check and Export read.
|
|
100
|
+
const backend = s.backend ? { backend: s.backend } : {};
|
|
101
|
+
const preview = pulumiAdoptPreview(s.member, { dir: s.dir, stack: s.stack, ...where, ...file, ...backend, id: `preview-${i}` });
|
|
100
102
|
preview.outcomeAttribute = { name: single ? "Adoptable" : `Adoptable-${slug(s.member)}-${slug(s.stack)}`, from: "resources" };
|
|
101
|
-
const adopt = pulumiAdopt(s.member, { dir: s.dir, stack: s.stack, ...where, ...file, planDigest: preview.out.planDigest, id: `adopt-${i}` });
|
|
103
|
+
const adopt = pulumiAdopt(s.member, { dir: s.dir, stack: s.stack, ...where, ...file, ...backend, planDigest: preview.out.planDigest, id: `adopt-${i}` });
|
|
102
104
|
adopt.outcomeAttribute = { name: single ? "Adopted" : `Adopted-${slug(s.member)}-${slug(s.stack)}`, from: "resources" };
|
|
103
105
|
const label = single ? "" : ` ${s.member}/${s.stack}`;
|
|
104
106
|
return [
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "bd4f4c6d8c0e2162c083f09b24e92eaef8d4d6000a8a3754a20051c8d325e939",
|
|
5
5
|
"meta.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
|
|
6
6
|
"types/index.d.ts": "883bcdf6a960e21360e79df010ca2087719fffec60fc39541c5ecd32d661e328",
|
|
7
7
|
"rules/member-dir-absolute.ts": "4805d5e247ad544f942e1b2c36fc15a5087ca0aacaf804183a269021bd60e276",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"skills/chant-pulumi-stack-export.md": "aadd67f5e067de61dfda43d57492bca08bd22429e4baf314d6856a810dc0e8dc",
|
|
26
26
|
"skills/chant-pulumi-plunge.md": "8a7f2f9f1124744dee9645905f141057ca01f5a88e34e1bc3858d69406d7ff3a"
|
|
27
27
|
},
|
|
28
|
-
"composite": "
|
|
28
|
+
"composite": "24002abc5170f337f1d8d38e0a8be8e4aa119a771e14ed829945a0ebbc198060"
|
|
29
29
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -59,6 +59,11 @@ export interface PulumiAdoptExportResult {
|
|
|
59
59
|
export interface PulumiAdoptPreviewArgs extends PulumiAdoptStackArgs {
|
|
60
60
|
/** `--file`: the export to adopt, from the Export step when `adoptFromFile`. */
|
|
61
61
|
file?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The plunge backend URL plunge adopts onto, passed as `PULUMI_BACKEND_URL`. Default, as the Check
|
|
64
|
+
* step resolves it: `plywood.yml`'s, `PULUMI_BACKEND_URL`, `Pulumi.yaml`'s.
|
|
65
|
+
*/
|
|
66
|
+
backend?: string;
|
|
62
67
|
}
|
|
63
68
|
export interface PulumiAdoptPreviewResult {
|
|
64
69
|
member: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulumi-adopt.d.ts","sourceRoot":"","sources":["../../../src/op/activities/pulumi-adopt.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACpG,OAAO,EAQL,KAAK,iBAAiB,EAEvB,MAAM,aAAa,CAAC;AAErB,OAAO,EAQL,KAAK,YAAY,EAClB,MAAM,WAAW,CAAC;AAGnB,6CAA6C;AAC7C,MAAM,WAAW,oBAAoB;IACnC,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,mHAAmH;IACnH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mHAAmH;IACnH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,yHAAyH;IACzH,aAAa,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AAO,CAAC,YAAY,CAAC,CAAC;CAC5F;AAeD,mGAAmG;AACnG,wBAAsB,UAAU,CAAC,CAAC,EAAE,oBAAoB,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAuCrH;AAED,gEAAgE;AAChE,wBAAsB,WAAW,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAmDxH;AAsCD,kGAAkG;AAClG,wBAAsB,YAAY,CAAC,CAAC,EAAE,sBAAsB,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAS3H;AAED,kHAAkH;AAClH,wBAAsB,UAAU,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAU3G;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAErG;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAEvG;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAEzG;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAE3F"}
|
|
@@ -179,12 +179,17 @@ function summary(a, view) {
|
|
|
179
179
|
changed: view.status !== "already-adopted",
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
+
/** The backend plunge adopts onto, resolved as the Check step resolves it, as plunge's environment. */
|
|
183
|
+
function adoptEnv(a, dir, deps) {
|
|
184
|
+
const backend = pulumiStackBackend(dir, { ...(a.backend ? { configured: a.backend } : {}), env: deps.env ?? process.env });
|
|
185
|
+
return backend ? { PULUMI_BACKEND_URL: backend.url } : undefined;
|
|
186
|
+
}
|
|
182
187
|
/** `plunge stack adopt --json`: the classification, written nowhere. A refusal fails the step. */
|
|
183
188
|
export async function adoptPreview(a, deps = {}) {
|
|
184
189
|
requireStack(a, "pulumiAdoptPreview");
|
|
185
190
|
const dir = stackDir(a);
|
|
186
191
|
const args = plungeAdoptArgs({ stack: a.stack, ...(a.file ? { file: a.file } : {}) });
|
|
187
|
-
const view = await adoptView(() => runAllowedPlunge(deps.plunge ?? defaultPlungeRunner, args, dir), "pulumiAdoptPreview", `plunge ${args.join(" ")}`);
|
|
192
|
+
const view = await adoptView(() => runAllowedPlunge(deps.plunge ?? defaultPlungeRunner, args, dir, adoptEnv(a, dir, deps)), "pulumiAdoptPreview", `plunge ${args.join(" ")}`);
|
|
188
193
|
if (view.status === "refused") {
|
|
189
194
|
throw new Error(`pulumiAdoptPreview: plunge refuses to adopt "${a.member}/${a.stack}": ${refusalText(view.refusals)}. Nothing was written.`);
|
|
190
195
|
}
|
|
@@ -195,7 +200,7 @@ export async function adoptStack(a, deps = {}) {
|
|
|
195
200
|
requireStack(a, "pulumiAdopt");
|
|
196
201
|
const dir = stackDir(a);
|
|
197
202
|
const args = plungeAdoptArgs({ stack: a.stack, yes: true, ...(a.file ? { file: a.file } : {}) });
|
|
198
|
-
const view = await adoptView(() => runAdoptPlunge(deps.plunge ?? defaultPlungeRunner, args, dir), "pulumiAdopt", `plunge ${args.join(" ")}`);
|
|
203
|
+
const view = await adoptView(() => runAdoptPlunge(deps.plunge ?? defaultPlungeRunner, args, dir, adoptEnv(a, dir, deps)), "pulumiAdopt", `plunge ${args.join(" ")}`);
|
|
199
204
|
if (view.status === "refused") {
|
|
200
205
|
throw new Error(`pulumiAdopt: plunge refused to adopt "${a.member}/${a.stack}": ${refusalText(view.refusals)}. Nothing was written.`);
|
|
201
206
|
}
|
|
@@ -76,6 +76,7 @@ export declare const pulumiAdoptPreviewContract: import("@intentius/chant/op").A
|
|
|
76
76
|
cwd?: string | undefined;
|
|
77
77
|
stack: string;
|
|
78
78
|
file?: string | undefined;
|
|
79
|
+
backend?: string | undefined;
|
|
79
80
|
}, {
|
|
80
81
|
member: string;
|
|
81
82
|
stack: string;
|
|
@@ -92,6 +93,7 @@ export declare const pulumiAdoptContract: import("@intentius/chant/op").Activity
|
|
|
92
93
|
cwd?: string | undefined;
|
|
93
94
|
stack: string;
|
|
94
95
|
file?: string | undefined;
|
|
96
|
+
backend?: string | undefined;
|
|
95
97
|
planDigest?: string | undefined;
|
|
96
98
|
}, {
|
|
97
99
|
member: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-contracts.d.ts","sourceRoot":"","sources":["../../src/op/activity-contracts.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAiBjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;EAW/B,CAAC;AAqBF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAoBpC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;EAkBrC,CAAC;AAEF,eAAO,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"activity-contracts.d.ts","sourceRoot":"","sources":["../../src/op/activity-contracts.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAiBjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;EAW/B,CAAC;AAqBF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAoBpC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;EAkBrC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAKtC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAK/B,CAAC"}
|
|
@@ -85,5 +85,5 @@ export const pulumiAdoptExportContract = activityContract("pulumiAdoptExport", z
|
|
|
85
85
|
source: z.string(),
|
|
86
86
|
adoptFromFile: z.boolean(),
|
|
87
87
|
}), memberEntity);
|
|
88
|
-
export const pulumiAdoptPreviewContract = activityContract("pulumiAdoptPreview", z.strictObject({ ...adoptStackArgs, file: z.string().optional() }), z.object(adoptPreviewReturns), memberEntity);
|
|
89
|
-
export const pulumiAdoptContract = activityContract("pulumiAdopt", z.strictObject({ ...adoptStackArgs, file: z.string().optional(), planDigest: z.string().optional() }), z.object({ ...adoptPreviewReturns, matchesApproved: z.boolean().optional() }), memberEntity);
|
|
88
|
+
export const pulumiAdoptPreviewContract = activityContract("pulumiAdoptPreview", z.strictObject({ ...adoptStackArgs, file: z.string().optional(), backend: z.string().optional() }), z.object(adoptPreviewReturns), memberEntity);
|
|
89
|
+
export const pulumiAdoptContract = activityContract("pulumiAdopt", z.strictObject({ ...adoptStackArgs, file: z.string().optional(), backend: z.string().optional(), planDigest: z.string().optional() }), z.object({ ...adoptPreviewReturns, matchesApproved: z.boolean().optional() }), memberEntity);
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAoC/E,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAoC/E,eAAO,MAAM,YAAY,EAAE,aAiM1B,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -123,6 +123,17 @@ export const pulumiPlugin = {
|
|
|
123
123
|
});
|
|
124
124
|
return { entities: read.entities, warnings: read.warnings };
|
|
125
125
|
},
|
|
126
|
+
/**
|
|
127
|
+
* The stacks a change touched (#3183, INTENTIUS/plywood#22): a changed
|
|
128
|
+
* `Pulumi.<stack>.yaml` is that stack, any other file of a project is every
|
|
129
|
+
* stack with a config beside its `Pulumi.yaml`. Named as a `pulumi-up`
|
|
130
|
+
* step's deploy unit, so `chant components pr-plan` and `fan-out --base`
|
|
131
|
+
* select the components that update them. See ./changed-units.ts.
|
|
132
|
+
*/
|
|
133
|
+
async changedUnits(ctx) {
|
|
134
|
+
const { pulumiChangedUnits } = await import("./changed-units.js");
|
|
135
|
+
return pulumiChangedUnits(ctx.projectRoot, ctx.changedFiles);
|
|
136
|
+
},
|
|
126
137
|
graphMeta() {
|
|
127
138
|
const report = lastMemberReport();
|
|
128
139
|
return report ? { pulumiMember: report } : undefined;
|
package/dist/pulumi-up.d.ts
CHANGED
|
@@ -107,11 +107,17 @@
|
|
|
107
107
|
*
|
|
108
108
|
* The cut records tracked files, so a Node program's copy has no
|
|
109
109
|
* `node_modules`. Before the copy's first preview, `plan` and `run` call
|
|
110
|
-
* `
|
|
110
|
+
* `prepareProgram` (`./release-copy.ts`), which runs `pulumi install`
|
|
111
111
|
* (`plunge install`) in the copy when its runtime needs one, and refuses a
|
|
112
112
|
* Node copy with no lockfile by name, since an install would take today's
|
|
113
113
|
* versions rather than the release's.
|
|
114
114
|
*
|
|
115
|
+
* A CI job's checkout has the same gap, so the same call prepares the
|
|
116
|
+
* step's own directory by the same rule (plywood#22): a Node program with
|
|
117
|
+
* no `node_modules` in its directory or above it, and a lockfile beside its
|
|
118
|
+
* package.json, gets one `<engine> install` before the job's first engine
|
|
119
|
+
* run; with no lockfile the step refuses by name.
|
|
120
|
+
*
|
|
115
121
|
* ## review stacks (#4609)
|
|
116
122
|
*
|
|
117
123
|
* When `DeployContext.env` is a pull request's environment `pr-<n>` (`chant
|
|
@@ -150,6 +156,15 @@ export interface PulumiUpStepInput {
|
|
|
150
156
|
config?: Record<string, unknown>;
|
|
151
157
|
/** `pulumi` or `plunge`; see `pulumiMemberEngine`. */
|
|
152
158
|
engine?: PulumiMemberEngine;
|
|
159
|
+
/**
|
|
160
|
+
* The stack's backend URL (INTENTIUS/plywood#22), such as
|
|
161
|
+
* `plunge+s3://...` or `s3://...`: every engine command the step runs
|
|
162
|
+
* (preview, up, the stack output and export reads, a review stack's init)
|
|
163
|
+
* gets it as `PULUMI_BACKEND_URL`, over the job's own. It also answers the
|
|
164
|
+
* engine where `pulumiMemberEngine` would read `PULUMI_BACKEND_URL`.
|
|
165
|
+
* Absent: the job's `PULUMI_BACKEND_URL` or `Pulumi.yaml`'s, as before.
|
|
166
|
+
*/
|
|
167
|
+
backend?: string;
|
|
153
168
|
/**
|
|
154
169
|
* The engine release this stack is pinned to (#4592): the step runs
|
|
155
170
|
* `<engineRoot>/<engine>-<engineVersion>/<engine>`, the path the pulumi
|
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
|
|
1
|
+
{"version":3,"file":"pulumi-up.d.ts","sourceRoot":"","sources":["../src/pulumi-up.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsIG;AAMH,OAAO,KAAK,EACV,UAAU,EAEV,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EAEpB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2CA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AAQ,CAAC,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAOvL;AA+DD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,eAAe,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAWhJ;AA4ND,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,CAwDtH;AAED,eAAO,MAAM,kBAAkB,mDAA6B,CAAC"}
|
package/dist/pulumi-up.js
CHANGED
|
@@ -107,11 +107,17 @@
|
|
|
107
107
|
*
|
|
108
108
|
* The cut records tracked files, so a Node program's copy has no
|
|
109
109
|
* `node_modules`. Before the copy's first preview, `plan` and `run` call
|
|
110
|
-
* `
|
|
110
|
+
* `prepareProgram` (`./release-copy.ts`), which runs `pulumi install`
|
|
111
111
|
* (`plunge install`) in the copy when its runtime needs one, and refuses a
|
|
112
112
|
* Node copy with no lockfile by name, since an install would take today's
|
|
113
113
|
* versions rather than the release's.
|
|
114
114
|
*
|
|
115
|
+
* A CI job's checkout has the same gap, so the same call prepares the
|
|
116
|
+
* step's own directory by the same rule (plywood#22): a Node program with
|
|
117
|
+
* no `node_modules` in its directory or above it, and a lockfile beside its
|
|
118
|
+
* package.json, gets one `<engine> install` before the job's first engine
|
|
119
|
+
* run; with no lockfile the step refuses by name.
|
|
120
|
+
*
|
|
115
121
|
* ## review stacks (#4609)
|
|
116
122
|
*
|
|
117
123
|
* When `DeployContext.env` is a pull request's environment `pr-<n>` (`chant
|
|
@@ -142,12 +148,13 @@ import { ciEngineDir, ciRelease, CI_ENGINE_ROOT } from "./ci-setup.js";
|
|
|
142
148
|
import { pulumiMemberPlannedOutputs } from "./member-outputs.js";
|
|
143
149
|
import { pulumiPlanShape, pulumiShapeDifferences } from "./plan-shape.js";
|
|
144
150
|
import { pulumiLockRows } from "./lock-rows.js";
|
|
151
|
+
import { stackRowKey } from "@intentius/chant/lifecycle/lock-rows";
|
|
145
152
|
import { pulumiTraceFacts } from "./trace-facts.js";
|
|
146
153
|
import { defaultPlungeRunner, defaultPulumiRunner, engineRunnerAt, plungeUpArgs, pulumiMemberStackOutputs, pulumiRunFailure, pulumiUpArgs, pulumiUpPreviewArgs, memberExportOf, runAllowedPlunge, runAllowedPulumi, runApplyPlunge, runApplyPulumi, } from "./run.js";
|
|
147
154
|
import { writePulumiExportSnapshot } from "./stack-export-snapshot.js";
|
|
148
155
|
import { pointerSegment, pulumiStackReferences, stackReferenceOwner } from "./stack-references.js";
|
|
149
156
|
import { isObject } from "./values.js";
|
|
150
|
-
import {
|
|
157
|
+
import { prepareProgram } from "./release-copy.js";
|
|
151
158
|
import { initReviewStack, reviewConfigSource, reviewStackFor, reviewStackLocation } from "./review-stack.js";
|
|
152
159
|
/**
|
|
153
160
|
* The packs a preview runs (#4613). With `ctx.policyBase` each step pack in
|
|
@@ -328,17 +335,30 @@ function locationOf(r, stack) {
|
|
|
328
335
|
}
|
|
329
336
|
/** A plan file name with nothing a path could read into. */
|
|
330
337
|
const fileSafe = (s) => s.replace(/[^A-Za-z0-9._-]+/g, "_");
|
|
338
|
+
/** The environment the engine is picked from: the job's, with the step's backend as `PULUMI_BACKEND_URL`. */
|
|
339
|
+
function engineEnv(input, opts) {
|
|
340
|
+
if (input.backend === undefined)
|
|
341
|
+
return opts.env ? { env: opts.env } : {};
|
|
342
|
+
return { env: { ...(opts.env ?? process.env), PULUMI_BACKEND_URL: input.backend } };
|
|
343
|
+
}
|
|
344
|
+
/** `run` with `PULUMI_BACKEND_URL` set to the step's backend over whatever env the call passes. */
|
|
345
|
+
function withBackend(run, backend) {
|
|
346
|
+
return (args, o) => run(args, { ...o, env: { ...(o.env ?? {}), PULUMI_BACKEND_URL: backend } });
|
|
347
|
+
}
|
|
331
348
|
function resolveStep(input, opts, declared) {
|
|
332
349
|
requireInput(input);
|
|
350
|
+
if (input.backend !== undefined && (typeof input.backend !== "string" || input.backend.trim() === "")) {
|
|
351
|
+
throw new Error('pulumi-up: "backend" is the stack\'s backend URL, such as plunge+s3://<bucket> or s3://<bucket>');
|
|
352
|
+
}
|
|
333
353
|
const dir = stackDir(input);
|
|
334
354
|
const member = pulumiUpMember(input);
|
|
335
|
-
const picked = pulumiMemberEngine(dir, input.engine,
|
|
355
|
+
const picked = pulumiMemberEngine(dir, input.engine, engineEnv(input, opts));
|
|
336
356
|
// #4552: the step's own grain, else ci.lockGrain as the caller read it at base, else the engine's default.
|
|
337
357
|
const grain = input.lockGrain ?? declared ?? pulumiDefaultLockGrain(picked.engine);
|
|
338
358
|
if (grain === "resource" && picked.engine === "pulumi")
|
|
339
359
|
throw new PulumiResourceGrainRefusedError(member);
|
|
340
360
|
const engineBin = pulumiUpEngineBin(input, picked.engine);
|
|
341
|
-
return { dir, member, engine: picked.engine, ...(engineBin ? { engineBin } : {}), engineSource: picked.source, engineBecause: picked.because, grain };
|
|
361
|
+
return { dir, member, engine: picked.engine, ...(engineBin ? { engineBin } : {}), engineSource: picked.source, engineBecause: picked.because, grain, ...(input.backend ? { backend: input.backend } : {}) };
|
|
342
362
|
}
|
|
343
363
|
/**
|
|
344
364
|
* The binary a step pinned with `engineVersion` runs (#4592): the versioned
|
|
@@ -362,7 +382,7 @@ export function pulumiUpEngineBin(input, engine) {
|
|
|
362
382
|
}
|
|
363
383
|
/** The `run` and `plunge` options for the stack output and export reads: the pinned binary's for both when the step names one (#4592), else the caller's. */
|
|
364
384
|
function runnerOptions(r, opts) {
|
|
365
|
-
if (r.engineBin) {
|
|
385
|
+
if (r.engineBin || r.backend) {
|
|
366
386
|
const { pulumi, plunge } = runnersFor(r, opts);
|
|
367
387
|
return { run: pulumi, plunge };
|
|
368
388
|
}
|
|
@@ -370,11 +390,16 @@ function runnerOptions(r, opts) {
|
|
|
370
390
|
}
|
|
371
391
|
/** The runners a resolved step uses: the pinned binary's when it names one, else the options' or the PATH default. */
|
|
372
392
|
function runnersFor(r, opts) {
|
|
393
|
+
let out;
|
|
373
394
|
if (r.engineBin) {
|
|
374
395
|
const pinned = opts.runAt ? opts.runAt(r.engineBin) : engineRunnerAt(r.engineBin);
|
|
375
|
-
|
|
396
|
+
out = { pulumi: pinned, plunge: pinned };
|
|
376
397
|
}
|
|
377
|
-
|
|
398
|
+
else {
|
|
399
|
+
out = { pulumi: opts.run ?? defaultPulumiRunner, plunge: opts.plunge ?? defaultPlungeRunner };
|
|
400
|
+
}
|
|
401
|
+
// plywood#22: the step's backend reaches every command, whichever call site runs it.
|
|
402
|
+
return r.backend ? { pulumi: withBackend(out.pulumi, r.backend), plunge: withBackend(out.plunge, r.backend) } : out;
|
|
378
403
|
}
|
|
379
404
|
/** The scratch directory, the config copy in it and plunge's plan file path. */
|
|
380
405
|
function scratchFor(r, input, opts) {
|
|
@@ -475,10 +500,10 @@ function isArtifact(value) {
|
|
|
475
500
|
const v = value;
|
|
476
501
|
return v?.kind === "pulumi-up" && typeof v.planDigest === "string" && typeof v.shape === "object" && v.shape !== null;
|
|
477
502
|
}
|
|
478
|
-
/**
|
|
479
|
-
async function
|
|
503
|
+
/** The program's directory, a release's copy (#4542) or the checkout in place (plywood#22), made runnable before its first engine run. */
|
|
504
|
+
async function readyProgram(r, opts) {
|
|
480
505
|
const runners = runnersFor(r, opts);
|
|
481
|
-
await
|
|
506
|
+
await prepareProgram({ dir: r.dir, member: r.member, engine: r.engine, run: r.engine === "plunge" ? runners.plunge : runners.pulumi });
|
|
482
507
|
}
|
|
483
508
|
async function planStack(ctx, original, opts) {
|
|
484
509
|
// #4609: in pr-<n>, the review stack, made from the template before its first preview.
|
|
@@ -488,7 +513,7 @@ async function planStack(ctx, original, opts) {
|
|
|
488
513
|
const unresolved = [...(ctx.unresolvedInputs ?? [])].sort();
|
|
489
514
|
if (unresolved.length > 0)
|
|
490
515
|
return { ...waitingStack(ctx, r, input, unresolved), ...location };
|
|
491
|
-
await
|
|
516
|
+
await readyProgram(r, opts);
|
|
492
517
|
if (review) {
|
|
493
518
|
const runners = runnersFor(r, opts);
|
|
494
519
|
await initReviewStack({
|
|
@@ -648,7 +673,7 @@ async function runStack(ctx, original, opts) {
|
|
|
648
673
|
const handed = ctx.plans?.[r.member];
|
|
649
674
|
const fromWave = isArtifact(handed);
|
|
650
675
|
const targets = ctx.targets && ctx.targets.length > 0 ? ctx.targets : undefined;
|
|
651
|
-
await
|
|
676
|
+
await readyProgram(r, opts);
|
|
652
677
|
// Ruling D: no approved plan handed in, so plan here and apply that.
|
|
653
678
|
let approved;
|
|
654
679
|
if (fromWave) {
|
|
@@ -809,16 +834,26 @@ export function createPulumiUpCapability(opts = {}) {
|
|
|
809
834
|
// #4552: resource on plunge, the stack (target) on stock Pulumi.
|
|
810
835
|
defaultLockGrain(input) {
|
|
811
836
|
requireInput(input);
|
|
812
|
-
return pulumiDefaultLockGrain(pulumiMemberEngine(stackDir(input), input.engine,
|
|
837
|
+
return pulumiDefaultLockGrain(pulumiMemberEngine(stackDir(input), input.engine, engineEnv(input, opts)).engine);
|
|
813
838
|
},
|
|
814
839
|
// Stock Pulumi keeps the stack grain: its backend's stack lock already orders updates, and nothing in it is per resource.
|
|
815
840
|
lockGrainRefusal(input, grain) {
|
|
816
841
|
if (grain !== "resource")
|
|
817
842
|
return undefined;
|
|
818
843
|
requireInput(input);
|
|
819
|
-
const engine = pulumiMemberEngine(stackDir(input), input.engine,
|
|
844
|
+
const engine = pulumiMemberEngine(stackDir(input), input.engine, engineEnv(input, opts)).engine;
|
|
820
845
|
return engine === "pulumi" ? new PulumiResourceGrainRefusedError(pulumiUpMember(input)).message : undefined;
|
|
821
846
|
},
|
|
847
|
+
// The ruling for ci-products (2026-10-28): a stock stack waits for its stack row on the ledger in place of the backend's lock.
|
|
848
|
+
// plunge keeps the resource grain, and a plunge stack declared on the target grain waits on the same row.
|
|
849
|
+
targetLockRow(input, plan) {
|
|
850
|
+
requireInput(input);
|
|
851
|
+
const project = readProject(stackDir(input))?.name;
|
|
852
|
+
const stack = plan && isArtifact(plan.artifact) ? plan.artifact.stack : input.stack;
|
|
853
|
+
if (typeof project !== "string" || !stack)
|
|
854
|
+
return undefined;
|
|
855
|
+
return { key: stackRowKey(project, stack), target: pulumiUpMember(input), address: `${project}/${stack}` };
|
|
856
|
+
},
|
|
822
857
|
// URN rows, object rows, and the stack row when something may appear only at apply (./lock-rows.ts).
|
|
823
858
|
lockRows(input, plan) {
|
|
824
859
|
if (!plan.changeSet)
|
package/dist/release-copy.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ export declare class PulumiReleaseCopyRefusedError extends Error {
|
|
|
16
16
|
readonly member: string;
|
|
17
17
|
constructor(member: string, reason: string);
|
|
18
18
|
}
|
|
19
|
+
/** An in-place program that cannot be made runnable, with the reason (plywood#22). */
|
|
20
|
+
export declare class PulumiProgramNotReadyError extends Error {
|
|
21
|
+
readonly member: string;
|
|
22
|
+
readonly dir: string;
|
|
23
|
+
constructor(member: string, dir: string, reason: string);
|
|
24
|
+
}
|
|
19
25
|
/** What preparing a copy did. */
|
|
20
26
|
export type ReleaseCopyPrepared = {
|
|
21
27
|
action: "not-a-copy";
|
|
@@ -26,15 +32,49 @@ export type ReleaseCopyPrepared = {
|
|
|
26
32
|
action: "installed";
|
|
27
33
|
command: string;
|
|
28
34
|
};
|
|
35
|
+
/** What preparing a program's directory did: a release copy or an in-place checkout. */
|
|
36
|
+
export type ProgramPrepared = {
|
|
37
|
+
place: "copy" | "checkout";
|
|
38
|
+
} & ({
|
|
39
|
+
action: "none";
|
|
40
|
+
reason: string;
|
|
41
|
+
} | {
|
|
42
|
+
action: "installed";
|
|
43
|
+
command: string;
|
|
44
|
+
});
|
|
29
45
|
/** Why the copy needs an install, or why not; throws when it cannot be prepared. */
|
|
30
46
|
export declare function releaseCopyNeeds(dir: string, member: string): {
|
|
31
47
|
install: boolean;
|
|
32
48
|
reason: string;
|
|
33
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* Why a program's directory needs an install, or why not: a release copy
|
|
52
|
+
* (`copy`) or an in-place checkout (`checkout`). Throws when it cannot be
|
|
53
|
+
* prepared: a Node program with no lockfile beside its package.json.
|
|
54
|
+
*/
|
|
55
|
+
export declare function programNeeds(dir: string, member: string, place: "copy" | "checkout"): {
|
|
56
|
+
install: boolean;
|
|
57
|
+
reason: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Make a program's directory runnable before its first engine run, once per
|
|
61
|
+
* directory in this process: `install` there when {@link programNeeds} says
|
|
62
|
+
* so. A release copy follows the copy's rules, any other directory the
|
|
63
|
+
* checkout's. Throws for a directory that cannot be prepared, or an install
|
|
64
|
+
* that fails. The first caller's engine runs the install; a second engine
|
|
65
|
+
* asking for the same directory waits on it.
|
|
66
|
+
*/
|
|
67
|
+
export declare function prepareProgram(opts: {
|
|
68
|
+
dir: string;
|
|
69
|
+
member: string;
|
|
70
|
+
engine: PulumiMemberEngine;
|
|
71
|
+
run: PulumiRunner;
|
|
72
|
+
}): Promise<ProgramPrepared>;
|
|
34
73
|
/**
|
|
35
74
|
* Make a release copy runnable, once per directory in this process: `install`
|
|
36
75
|
* in the copy when {@link releaseCopyNeeds} says so. Throws for a copy that
|
|
37
|
-
* cannot be prepared, or an install that fails.
|
|
76
|
+
* cannot be prepared, or an install that fails. A directory that is not a
|
|
77
|
+
* copy is left alone; {@link prepareProgram} prepares both.
|
|
38
78
|
*/
|
|
39
79
|
export declare function prepareReleaseCopy(opts: {
|
|
40
80
|
dir: string;
|
|
@@ -42,6 +82,6 @@ export declare function prepareReleaseCopy(opts: {
|
|
|
42
82
|
engine: PulumiMemberEngine;
|
|
43
83
|
run: PulumiRunner;
|
|
44
84
|
}): Promise<ReleaseCopyPrepared>;
|
|
45
|
-
/** Forget every prepared
|
|
85
|
+
/** Forget every prepared directory. For tests. */
|
|
46
86
|
export declare function resetPreparedReleaseCopies(): void;
|
|
47
87
|
//# sourceMappingURL=release-copy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-copy.d.ts","sourceRoot":"","sources":["../src/release-copy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"release-copy.d.ts","sourceRoot":"","sources":["../src/release-copy.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAuC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAG/E,qIAAqI;AACrI,eAAO,MAAM,gBAAgB,6BAA6B,CAAC;AAE3D,4DAA4D;AAC5D,eAAO,MAAM,cAAc,UAAuG,CAAC;AAEnI,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGlD;AAED,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,CAAC,EAAE,MAA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