@intentius/chant 0.41.12 → 0.41.14
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/cli/handlers/components.d.ts.map +1 -1
- package/dist/lifecycle/status.d.ts +24 -0
- package/dist/lifecycle/status.d.ts.map +1 -1
- package/dist/op/builders.d.ts +18 -6
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/handlers/components.ts +7 -0
- package/src/lifecycle/status.test.ts +44 -0
- package/src/lifecycle/status.ts +28 -2
- package/src/op/activity-registry.test.ts +10 -3
- package/src/op/builders.ts +18 -6
- package/src/yaml.test.ts +48 -0
- package/src/yaml.ts +16 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAGnE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4ErF;AA4DD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;6EAQ6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAMzD;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/components.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,EAAa,MAAM,4BAA4B,CAAC;AAGnE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA4ErF;AA4DD;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;6EAQ6E;AAC7E,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAMzD;AAmED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA6R9E;AAED,kEAAkE;AAClE,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/E"}
|
|
@@ -100,6 +100,17 @@ export interface ComponentStatusRow {
|
|
|
100
100
|
* where it exists.
|
|
101
101
|
*/
|
|
102
102
|
resources?: ComponentResourceRollup;
|
|
103
|
+
/**
|
|
104
|
+
* Set when some but not all of this component's deploy units were observed
|
|
105
|
+
* present (#1528). `live` is `false` — deployed means all of it — but a
|
|
106
|
+
* consumer painting the row can distinguish "half up" from "gone", and the
|
|
107
|
+
* missing unit names are the actionable part.
|
|
108
|
+
*/
|
|
109
|
+
partial?: {
|
|
110
|
+
present: number;
|
|
111
|
+
total: number;
|
|
112
|
+
missing: string[];
|
|
113
|
+
};
|
|
103
114
|
}
|
|
104
115
|
/** A component's owning deploy unit and its provider-native status. */
|
|
105
116
|
export interface LiveStackInfo {
|
|
@@ -143,6 +154,19 @@ export interface LiveComponentEvidence {
|
|
|
143
154
|
/** The owning deploy unit's raw status, when observed (AWS: the component's own
|
|
144
155
|
* CFN stack). Surfaced onto `ComponentStatusRow.stack` for a richer palette. */
|
|
145
156
|
stack?: LiveStackInfo;
|
|
157
|
+
/**
|
|
158
|
+
* Set when some but not all of the component's deploy units were observed
|
|
159
|
+
* present (#1528). `live` is `false` — a component is deployed when all of
|
|
160
|
+
* it is — but "nothing observed live" would be a lie, and it was one: a
|
|
161
|
+
* multi-unit component with a single absent unit reported exactly that
|
|
162
|
+
* while its Helm releases sat deployed and healthy in the same row's
|
|
163
|
+
* `stack` field. Consumers get the split and the names of what is missing.
|
|
164
|
+
*/
|
|
165
|
+
partial?: {
|
|
166
|
+
present: number;
|
|
167
|
+
total: number;
|
|
168
|
+
missing: string[];
|
|
169
|
+
};
|
|
146
170
|
/**
|
|
147
171
|
* How the component's own resources answered, before any merge collapsed
|
|
148
172
|
* them (behold#98). Always present when evidence exists — a component that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/lifecycle/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,+FAA+F;AAC/F,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,+IAA+I;IAC/I,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,gDAAgD;IAChD,cAAc,EAAE,YAAY,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAC9E,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE;QAAE,MAAM,EAAE,gBAAgB,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D;;;;;OAKG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC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M,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,IAAI,EAAE,OAAO,CAAC;CACf;AAED,oGAAoG;AACpG,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,aAAa,EAAE,CAAA;CAAE,EAChD,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,aAAa,EAAE,CAAA;CAAE,GAC/C,kBAAkB,CAWpB"}
|
package/dist/op/builders.d.ts
CHANGED
|
@@ -58,16 +58,28 @@ export declare const shell: (cmd: string, opts?: {
|
|
|
58
58
|
/** Run `chant teardown` in the given project directory. Uses `longInfra` profile. */
|
|
59
59
|
export declare const teardown: (path: string) => ActivityStep;
|
|
60
60
|
/**
|
|
61
|
-
* Create a local k3d cluster (vanilla Kubernetes in Docker)
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
61
|
+
* Create a local k3d cluster (vanilla Kubernetes in Docker). Idempotent: skips
|
|
62
|
+
* creation if a cluster of the same name already exists. Defaults to the
|
|
63
|
+
* `longInfra` profile (creating a cluster may pull the k3s image); override via
|
|
64
|
+
* `opts.profile`.
|
|
65
|
+
*
|
|
66
|
+
* The implementation lives in the k3d lexicon (chant #1410) — the project's
|
|
67
|
+
* `chant.config.ts` must list `"k3d"` in `lexicons` for the activity to load.
|
|
68
|
+
* Unlike the upstream CLI, the activity leaves the caller's default kubeconfig
|
|
69
|
+
* and current context alone by default (chant #1411); pass
|
|
70
|
+
* `updateDefaultKubeconfig: true` / `switchCurrentContext: true` to opt back
|
|
71
|
+
* in. It resolves `{ context, kubeconfigPath? }` for reaching the cluster.
|
|
65
72
|
*
|
|
66
73
|
* `opts` accepts `servers`, `agents`, `image`, `ports` (e.g.
|
|
67
|
-
* `["8080:80@loadbalancer"]`), `registryCreate`, `configFile`,
|
|
74
|
+
* `["8080:80@loadbalancer"]`), `registryCreate`, `configFile`, `timeout`,
|
|
75
|
+
* `updateDefaultKubeconfig`, and `switchCurrentContext`.
|
|
68
76
|
*/
|
|
69
77
|
export declare const k3dUp: (name: string, opts?: Record<string, unknown>) => ActivityStep;
|
|
70
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* Delete a local k3d cluster. Defaults to the `fastIdempotent` profile
|
|
80
|
+
* (override via `opts.profile`). Implementation lives in the k3d lexicon
|
|
81
|
+
* (chant #1410) — requires `"k3d"` in the project's `lexicons`.
|
|
82
|
+
*/
|
|
71
83
|
export declare const k3dDown: (name: string, opts?: Record<string, unknown>) => ActivityStep;
|
|
72
84
|
/**
|
|
73
85
|
* Boot a local Floci AWS emulator in Docker and point subsequent steps at it —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/op/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIjG;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,EAAE,CAAC,MAAM,EAAE,QAAQ,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAEpE;AAED,mEAAmE;AACnE,wBAAgB,KAAK,CACnB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,cAAc,EAAE,EACvB,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5B,eAAe,CAEjB;AAED,iEAAiE;AACjE,wBAAgB,QAAQ,CACtB,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,GAChC,YAAY,CAOd;AAED,oFAAoF;AACpF,wBAAgB,I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"}
|
package/dist/yaml.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../src/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CA2G/D;AAMD,sCAAsC;AACtC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASlE;AAiFD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,WAAW,CA8Eb;AA0GD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,WAAW,
|
|
1
|
+
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../src/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CA2G/D;AAMD,sCAAsC;AACtC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CASlE;AAiFD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,WAAW,CA8Eb;AA0GD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,WAAW,CAqGb;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAelD"}
|
package/package.json
CHANGED
|
@@ -286,10 +286,17 @@ async function observeComponentStacks(
|
|
|
286
286
|
// palette than the reconciliation verdict. One cfn-deploy stack per component
|
|
287
287
|
// is the norm; a multi-stack component reports its representative unit.
|
|
288
288
|
const repr = determinate.find((o) => o.present) ?? determinate[0];
|
|
289
|
+
// Some-but-not-all present is its own answer (#1528): `live` stays false —
|
|
290
|
+
// deployed means all of it — but the split and the missing unit names ride
|
|
291
|
+
// along, so the row can say "half up" instead of "nothing observed live"
|
|
292
|
+
// while its own `stack` field shows a healthy unit.
|
|
293
|
+
const presentCount = determinate.filter((o) => o.present).length;
|
|
294
|
+
const missing = determinate.filter((o) => !o.present).map((o) => o.stack);
|
|
289
295
|
evidence.set(name, {
|
|
290
296
|
live: present,
|
|
291
297
|
ownership: present ? "owned" : undefined,
|
|
292
298
|
stack: { name: repr.stack, status: repr.status, healthy: repr.healthy },
|
|
299
|
+
...(presentCount > 0 && !present ? { partial: { present: presentCount, total: determinate.length, missing } } : {}),
|
|
293
300
|
});
|
|
294
301
|
}
|
|
295
302
|
return evidence;
|
|
@@ -549,3 +549,47 @@ describe("status", () => {
|
|
|
549
549
|
});
|
|
550
550
|
});
|
|
551
551
|
});
|
|
552
|
+
|
|
553
|
+
describe("partial unit presence is said, not rounded down to nothing (#1528)", () => {
|
|
554
|
+
// The lie this fixes, verbatim from a real estate: a three-unit component
|
|
555
|
+
// (CRDs by kubectl-apply, two Helm releases) whose one absent unit produced
|
|
556
|
+
// `detail: "no release record and nothing observed live"` in the same row
|
|
557
|
+
// whose `stack` field showed a deployed, healthy release.
|
|
558
|
+
const partial = { present: 2, total: 3, missing: ["kmv-crds"] };
|
|
559
|
+
|
|
560
|
+
test("unrecorded + partial names the split and the missing units", () => {
|
|
561
|
+
const liveEvidence = new Map<string, LiveComponentEvidence>([
|
|
562
|
+
["operator", { live: false, partial, stack: { name: "cert-manager", status: "deployed", healthy: true } }],
|
|
563
|
+
]);
|
|
564
|
+
const rows = reconcileStatus("prod", [], { liveEvidence, allComponents: ["operator"] });
|
|
565
|
+
expect(rows[0].reconciliation).toBe("unrecorded");
|
|
566
|
+
expect(rows[0].detail).toContain("2 of 3 deploy units observed live");
|
|
567
|
+
expect(rows[0].detail).toContain("missing: kmv-crds");
|
|
568
|
+
expect(rows[0].detail).not.toContain("nothing observed live");
|
|
569
|
+
expect(rows[0].partial).toEqual(partial);
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
test("recorded + partial is stale, with the split instead of 'nothing'", () => {
|
|
573
|
+
const liveEvidence = new Map<string, LiveComponentEvidence>([
|
|
574
|
+
["search-service", { live: false, partial }],
|
|
575
|
+
]);
|
|
576
|
+
const rows = reconcileStatus("prod", [record()], { liveEvidence });
|
|
577
|
+
expect(rows[0].reconciliation).toBe("stale");
|
|
578
|
+
expect(rows[0].detail).toContain("only 2 of 3 deploy units observed live now");
|
|
579
|
+
expect(rows[0].detail).toContain("missing: kmv-crds");
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
test("wholly absent still reads as nothing observed live, no split invented", () => {
|
|
583
|
+
const liveEvidence = new Map<string, LiveComponentEvidence>([["gone", { live: false }]]);
|
|
584
|
+
const rows = reconcileStatus("prod", [], { liveEvidence, allComponents: ["gone"] });
|
|
585
|
+
expect(rows[0].detail).toContain("no release record and nothing observed live");
|
|
586
|
+
expect(rows[0].partial).toBeUndefined();
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
test("the split survives mergeLiveEvidence's field-by-field rebuild", () => {
|
|
590
|
+
const base = new Map<string, LiveComponentEvidence>([["operator", { live: false }]]);
|
|
591
|
+
const supplement = new Map<string, LiveComponentEvidence>([["operator", { live: false, partial }]]);
|
|
592
|
+
const merged = mergeLiveEvidence(base, supplement);
|
|
593
|
+
expect(merged.get("operator")!.partial).toEqual(partial);
|
|
594
|
+
});
|
|
595
|
+
});
|
package/src/lifecycle/status.ts
CHANGED
|
@@ -99,6 +99,13 @@ export interface ComponentStatusRow {
|
|
|
99
99
|
* where it exists.
|
|
100
100
|
*/
|
|
101
101
|
resources?: ComponentResourceRollup;
|
|
102
|
+
/**
|
|
103
|
+
* Set when some but not all of this component's deploy units were observed
|
|
104
|
+
* present (#1528). `live` is `false` — deployed means all of it — but a
|
|
105
|
+
* consumer painting the row can distinguish "half up" from "gone", and the
|
|
106
|
+
* missing unit names are the actionable part.
|
|
107
|
+
*/
|
|
108
|
+
partial?: { present: number; total: number; missing: string[] };
|
|
102
109
|
}
|
|
103
110
|
|
|
104
111
|
/** A component's owning deploy unit and its provider-native status. */
|
|
@@ -142,6 +149,15 @@ export interface LiveComponentEvidence {
|
|
|
142
149
|
/** The owning deploy unit's raw status, when observed (AWS: the component's own
|
|
143
150
|
* CFN stack). Surfaced onto `ComponentStatusRow.stack` for a richer palette. */
|
|
144
151
|
stack?: LiveStackInfo;
|
|
152
|
+
/**
|
|
153
|
+
* Set when some but not all of the component's deploy units were observed
|
|
154
|
+
* present (#1528). `live` is `false` — a component is deployed when all of
|
|
155
|
+
* it is — but "nothing observed live" would be a lie, and it was one: a
|
|
156
|
+
* multi-unit component with a single absent unit reported exactly that
|
|
157
|
+
* while its Helm releases sat deployed and healthy in the same row's
|
|
158
|
+
* `stack` field. Consumers get the split and the names of what is missing.
|
|
159
|
+
*/
|
|
160
|
+
partial?: { present: number; total: number; missing: string[] };
|
|
145
161
|
/**
|
|
146
162
|
* How the component's own resources answered, before any merge collapsed
|
|
147
163
|
* them (behold#98). Always present when evidence exists — a component that
|
|
@@ -189,6 +205,9 @@ export function mergeLiveEvidence(
|
|
|
189
205
|
ownership: sup.ownership ?? b?.ownership,
|
|
190
206
|
action: b?.action,
|
|
191
207
|
stack: sup.stack ?? b?.stack,
|
|
208
|
+
// The unit split rides the same direct observation `live` came from —
|
|
209
|
+
// dropping it here would resurrect the lie the field exists to fix.
|
|
210
|
+
...(sup.partial ? { partial: sup.partial } : {}),
|
|
192
211
|
// Base first: the counts come from the change set, and a stack
|
|
193
212
|
// observation has none to offer.
|
|
194
213
|
...(b?.rollup ?? sup.rollup ? { rollup: b?.rollup ?? sup.rollup } : {}),
|
|
@@ -408,10 +427,16 @@ export function reconcileStatus(
|
|
|
408
427
|
detail = `live${evidence.ownership === "owned" ? " and chant-owned" : ""}, but no release record exists — deployed outside the recorded path`;
|
|
409
428
|
} else if (!recorded && !evidence?.live) {
|
|
410
429
|
reconciliation = "unrecorded";
|
|
411
|
-
|
|
430
|
+
// "Nothing observed live" was a lie for a partially-present component
|
|
431
|
+
// (#1528) — say what was seen and name what was not.
|
|
432
|
+
detail = evidence?.partial
|
|
433
|
+
? `no release record; ${evidence.partial.present} of ${evidence.partial.total} deploy units observed live (missing: ${evidence.partial.missing.join(", ")})`
|
|
434
|
+
: "no release record and nothing observed live";
|
|
412
435
|
} else if (recorded && !evidence?.live) {
|
|
413
436
|
reconciliation = "stale";
|
|
414
|
-
detail =
|
|
437
|
+
detail = evidence?.partial
|
|
438
|
+
? `recorded ${recorded.timestamp} (digest ${recorded.digest}), but only ${evidence.partial.present} of ${evidence.partial.total} deploy units observed live now (missing: ${evidence.partial.missing.join(", ")})`
|
|
439
|
+
: `recorded ${recorded.timestamp} (digest ${recorded.digest}), but nothing observed live now`;
|
|
415
440
|
} else if (recorded && evidence?.action === "update") {
|
|
416
441
|
reconciliation = "drifted";
|
|
417
442
|
detail = `recorded ${recorded.timestamp} (digest ${recorded.digest}), but live configuration has drifted since`;
|
|
@@ -435,6 +460,7 @@ export function reconcileStatus(
|
|
|
435
460
|
...(evidence?.unobserved ? { unobserved: evidence.unobserved } : {}),
|
|
436
461
|
...(evidence?.stack ? { stack: evidence.stack } : {}),
|
|
437
462
|
...(evidence?.rollup ? { resources: evidence.rollup } : {}),
|
|
463
|
+
...(evidence?.partial ? { partial: evidence.partial } : {}),
|
|
438
464
|
});
|
|
439
465
|
}
|
|
440
466
|
|
|
@@ -67,7 +67,7 @@ describe("loadActivities — multi-lexicon (#706)", () => {
|
|
|
67
67
|
expect(a.has("waitForStack")).toBe(true); // temporal base
|
|
68
68
|
expect(a.has("shellCmd")).toBe(true); // temporal base
|
|
69
69
|
expect(a.has("kubectlApply")).toBe(false); // relocated to k8s (#809)
|
|
70
|
-
expect(a.has("k3dUp")).toBe(false); // relocated to k8s (#809)
|
|
70
|
+
expect(a.has("k3dUp")).toBe(false); // relocated to k8s (#809), then k3d (#1410)
|
|
71
71
|
expect(a.has("gcpApply")).toBe(false); // relocated to gcp
|
|
72
72
|
expect(a.has("flociUp")).toBe(false); // relocated to aws
|
|
73
73
|
expect(a.has("azGroupEnsure")).toBe(false); // relocated to azure
|
|
@@ -79,12 +79,19 @@ describe("loadActivities — multi-lexicon (#706)", () => {
|
|
|
79
79
|
expect(a.has("waitForStack")).toBe(true); // base still loaded alongside
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
test("k8s lexicon contributes kubectl /
|
|
82
|
+
test("k8s lexicon contributes kubectl / argo activities (#809)", async () => {
|
|
83
83
|
const a = await loadActivities(["k8s"]);
|
|
84
84
|
expect(a.has("kubectlApply")).toBe(true);
|
|
85
|
+
expect(a.has("k3dUp")).toBe(false); // moved on to the k3d lexicon (#1410)
|
|
86
|
+
expect(a.has("k3dDown")).toBe(false); // moved on to the k3d lexicon (#1410)
|
|
87
|
+
expect(a.has("waitForArgoSync")).toBe(true);
|
|
88
|
+
expect(a.has("waitForStack")).toBe(true); // base still loaded alongside
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("k3d lexicon contributes the local-cluster lifecycle (#1410)", async () => {
|
|
92
|
+
const a = await loadActivities(["k3d"]);
|
|
85
93
|
expect(a.has("k3dUp")).toBe(true);
|
|
86
94
|
expect(a.has("k3dDown")).toBe(true);
|
|
87
|
-
expect(a.has("waitForArgoSync")).toBe(true);
|
|
88
95
|
expect(a.has("waitForStack")).toBe(true); // base still loaded alongside
|
|
89
96
|
});
|
|
90
97
|
|
package/src/op/builders.ts
CHANGED
|
@@ -138,20 +138,32 @@ export const teardown = (path: string): ActivityStep =>
|
|
|
138
138
|
activity("chantTeardown", { path }, "longInfra");
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
|
-
* Create a local k3d cluster (vanilla Kubernetes in Docker)
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
141
|
+
* Create a local k3d cluster (vanilla Kubernetes in Docker). Idempotent: skips
|
|
142
|
+
* creation if a cluster of the same name already exists. Defaults to the
|
|
143
|
+
* `longInfra` profile (creating a cluster may pull the k3s image); override via
|
|
144
|
+
* `opts.profile`.
|
|
145
|
+
*
|
|
146
|
+
* The implementation lives in the k3d lexicon (chant #1410) — the project's
|
|
147
|
+
* `chant.config.ts` must list `"k3d"` in `lexicons` for the activity to load.
|
|
148
|
+
* Unlike the upstream CLI, the activity leaves the caller's default kubeconfig
|
|
149
|
+
* and current context alone by default (chant #1411); pass
|
|
150
|
+
* `updateDefaultKubeconfig: true` / `switchCurrentContext: true` to opt back
|
|
151
|
+
* in. It resolves `{ context, kubeconfigPath? }` for reaching the cluster.
|
|
145
152
|
*
|
|
146
153
|
* `opts` accepts `servers`, `agents`, `image`, `ports` (e.g.
|
|
147
|
-
* `["8080:80@loadbalancer"]`), `registryCreate`, `configFile`,
|
|
154
|
+
* `["8080:80@loadbalancer"]`), `registryCreate`, `configFile`, `timeout`,
|
|
155
|
+
* `updateDefaultKubeconfig`, and `switchCurrentContext`.
|
|
148
156
|
*/
|
|
149
157
|
export const k3dUp = (name: string, opts?: Record<string, unknown>): ActivityStep => {
|
|
150
158
|
const { args, profile } = takeProfile(opts);
|
|
151
159
|
return activity("k3dUp", { name, ...args }, profile ?? "longInfra");
|
|
152
160
|
};
|
|
153
161
|
|
|
154
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* Delete a local k3d cluster. Defaults to the `fastIdempotent` profile
|
|
164
|
+
* (override via `opts.profile`). Implementation lives in the k3d lexicon
|
|
165
|
+
* (chant #1410) — requires `"k3d"` in the project's `lexicons`.
|
|
166
|
+
*/
|
|
155
167
|
export const k3dDown = (name: string, opts?: Record<string, unknown>): ActivityStep => {
|
|
156
168
|
const { args, profile } = takeProfile(opts);
|
|
157
169
|
return activity("k3dDown", { name, ...args }, profile ?? "fastIdempotent");
|
package/src/yaml.test.ts
CHANGED
|
@@ -243,6 +243,54 @@ describe("parseYAML block scalars (#910)", () => {
|
|
|
243
243
|
test("folded > folds line breaks to spaces, blank line to one newline", () => {
|
|
244
244
|
expect(parseYAML("msg: >\n a\n b\n\n c\n")).toEqual({ msg: "a b\nc\n" });
|
|
245
245
|
});
|
|
246
|
+
|
|
247
|
+
// #1482 — a block scalar as the sequence ITEM itself (`- |`), not as an
|
|
248
|
+
// item key's value. The header parsed as the literal string "|" and the
|
|
249
|
+
// body lines leaked upward: inside a container list, every key after
|
|
250
|
+
// `args:` — securityContext, even the following `containers:` — was
|
|
251
|
+
// hoisted to the document root, so the post-synth security checks read a
|
|
252
|
+
// manifest that had quietly lost the app containers.
|
|
253
|
+
test("literal | as a sequence item (#1482)", () => {
|
|
254
|
+
expect(parseYAML("args:\n - |\n set -eu\n echo done\n")).toEqual({
|
|
255
|
+
args: ["set -eu\necho done\n"],
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
test("the #1482 shape: keys after a block-scalar arg stay on the item, and later keys stay nested", () => {
|
|
260
|
+
const doc = [
|
|
261
|
+
"spec:",
|
|
262
|
+
" initContainers:",
|
|
263
|
+
" - name: wait",
|
|
264
|
+
" args:",
|
|
265
|
+
" - |",
|
|
266
|
+
" line one",
|
|
267
|
+
" line two",
|
|
268
|
+
" securityContext:",
|
|
269
|
+
" runAsNonRoot: true",
|
|
270
|
+
" containers:",
|
|
271
|
+
" - name: app",
|
|
272
|
+
" image: x:1",
|
|
273
|
+
"",
|
|
274
|
+
].join("\n");
|
|
275
|
+
expect(parseYAML(doc)).toEqual({
|
|
276
|
+
spec: {
|
|
277
|
+
initContainers: [
|
|
278
|
+
{
|
|
279
|
+
name: "wait",
|
|
280
|
+
args: ["line one\nline two\n"],
|
|
281
|
+
securityContext: { runAsNonRoot: true },
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
containers: [{ name: "app", image: "x:1" }],
|
|
285
|
+
},
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
test("folded >- as a sequence item strips the trailing newline", () => {
|
|
290
|
+
expect(parseYAML("cmds:\n - >-\n a\n b\n - plain\n")).toEqual({
|
|
291
|
+
cmds: ["a b", "plain"],
|
|
292
|
+
});
|
|
293
|
+
});
|
|
246
294
|
});
|
|
247
295
|
|
|
248
296
|
// #1311 — a sequence item's sibling keys survive a nested block, whichever key
|
package/src/yaml.ts
CHANGED
|
@@ -510,8 +510,22 @@ export function parseYAMLArray(
|
|
|
510
510
|
result.push(obj);
|
|
511
511
|
i = j;
|
|
512
512
|
} else {
|
|
513
|
-
|
|
514
|
-
|
|
513
|
+
const header = blockScalarHeader(itemValue);
|
|
514
|
+
if (header) {
|
|
515
|
+
// A block scalar as the item itself (`- |`). Without this branch the
|
|
516
|
+
// header parsed as the literal string "|" and the body lines leaked
|
|
517
|
+
// into whatever came next — inside a container list that hoisted the
|
|
518
|
+
// sibling keys after `args:` (securityContext, even the following
|
|
519
|
+
// `containers:` key) to the document root, so post-synth checks read
|
|
520
|
+
// a manifest that had lost them (#1482). The body is indented past
|
|
521
|
+
// the dash's column.
|
|
522
|
+
const block = parseBlockScalar(lines, i + 1, indent, header);
|
|
523
|
+
result.push(block.value);
|
|
524
|
+
i = block.endIndex;
|
|
525
|
+
} else {
|
|
526
|
+
result.push(parseScalar(itemValue));
|
|
527
|
+
i++;
|
|
528
|
+
}
|
|
515
529
|
}
|
|
516
530
|
} else {
|
|
517
531
|
break;
|