@mutmutco/cli 4.5.125 → 4.5.126
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/main.cjs +37 -14
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -8766,8 +8766,9 @@ async function retireProject(slug, deps) {
|
|
|
8766
8766
|
async function setDeployCoords(slug, payload, deps) {
|
|
8767
8767
|
return postJson(`/projects/${encodeURIComponent(slug)}/deploy`, payload, deps);
|
|
8768
8768
|
}
|
|
8769
|
-
async function retireDeployCoords(slug, stage, deps) {
|
|
8770
|
-
|
|
8769
|
+
async function retireDeployCoords(slug, stage, deps, decommissioned = false) {
|
|
8770
|
+
const q = decommissioned ? "?decommissioned=1" : "";
|
|
8771
|
+
return postJson(`/projects/${encodeURIComponent(slug)}/deploy/${encodeURIComponent(stage)}${q}`, {}, deps, "DELETE", { noRetry: true });
|
|
8771
8772
|
}
|
|
8772
8773
|
async function postSchedulesLift(repo, schedules, deps) {
|
|
8773
8774
|
const res = await postJson("/schedules/lift", { repo, schedules }, deps);
|
|
@@ -18243,10 +18244,10 @@ var rollout_plan_default = {
|
|
|
18243
18244
|
note: "The v4.0.0 stamp happens at cut time (D6e #4463); until then the candidate is the origin/development head artifacts (built cli/dist + npm pack), identity proven by dist content hash (D6a)."
|
|
18244
18245
|
},
|
|
18245
18246
|
baseline: {
|
|
18246
|
-
version: "4.5.
|
|
18247
|
-
tag: "v4.5.
|
|
18248
|
-
commit: "
|
|
18249
|
-
npm: "@mutmutco/cli@4.5.
|
|
18247
|
+
version: "4.5.126",
|
|
18248
|
+
tag: "v4.5.126",
|
|
18249
|
+
commit: "bf7736630f4c",
|
|
18250
|
+
npm: "@mutmutco/cli@4.5.126"
|
|
18250
18251
|
},
|
|
18251
18252
|
exitCriterion: "fleet-n-of-n",
|
|
18252
18253
|
hubOnlyShortcut: "forbidden",
|
|
@@ -18263,14 +18264,14 @@ var rollout_plan_default = {
|
|
|
18263
18264
|
repo: "mutmutco/mmi-hub",
|
|
18264
18265
|
role: "canary",
|
|
18265
18266
|
schedule: "train",
|
|
18266
|
-
v3Target: "v4.5.
|
|
18267
|
+
v3Target: "v4.5.126"
|
|
18267
18268
|
}
|
|
18268
18269
|
],
|
|
18269
18270
|
rollbackTrigger: "Any red inside the post-contract soak window: `devops train gate` FAIL attributable to the v4 doors, Hub endpoint health probe failure, a pre-v4 client admitted instead of receiving actionable HTTP 426, or npm consumer install/doctor failure on the v4-only dist.",
|
|
18270
18271
|
rollback: {
|
|
18271
18272
|
independent: true,
|
|
18272
|
-
mechanism: "npm dist-tag latest -> 4.5.
|
|
18273
|
-
v3Target: "v4.5.
|
|
18273
|
+
mechanism: "npm dist-tag latest -> 4.5.126 and redeploy the Hub Lambda from tag v4.5.126 (bf7736630f4c); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
18274
|
+
v3Target: "v4.5.126 (@mutmutco/cli@4.5.126, tag commit bf7736630f4c \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
18274
18275
|
}
|
|
18275
18276
|
},
|
|
18276
18277
|
{
|
|
@@ -52870,7 +52871,10 @@ function buildDeployRetirePlan(input) {
|
|
|
52870
52871
|
if (!["dev", "rc", "main"].includes(input.stage)) {
|
|
52871
52872
|
throw new Error("org project deploy retire: --stage must be dev, rc, or main");
|
|
52872
52873
|
}
|
|
52873
|
-
|
|
52874
|
+
if (input.decommissioned && input.stage !== "main") {
|
|
52875
|
+
throw new Error("org project deploy retire: --decommissioned applies to --stage main only (dev/rc always retire)");
|
|
52876
|
+
}
|
|
52877
|
+
return { slug, stage: input.stage, apply: Boolean(input.apply), decommissioned: Boolean(input.decommissioned) };
|
|
52874
52878
|
}
|
|
52875
52879
|
async function runDeployRetire(input, deps) {
|
|
52876
52880
|
const plan = buildDeployRetirePlan(input);
|
|
@@ -52879,7 +52883,20 @@ async function runDeployRetire(input, deps) {
|
|
|
52879
52883
|
if (!plan.apply) {
|
|
52880
52884
|
return { slug: plan.slug, stage: plan.stage, applied: false, ok: facts !== null, existing };
|
|
52881
52885
|
}
|
|
52882
|
-
|
|
52886
|
+
if (plan.decommissioned) {
|
|
52887
|
+
const state = deps.boxServiceState ? await deps.boxServiceState(plan.stage) : "unknown";
|
|
52888
|
+
if (state !== "missing") {
|
|
52889
|
+
return {
|
|
52890
|
+
slug: plan.slug,
|
|
52891
|
+
stage: plan.stage,
|
|
52892
|
+
applied: false,
|
|
52893
|
+
ok: false,
|
|
52894
|
+
existing,
|
|
52895
|
+
error: `--decommissioned needs the box to show ${plan.stage} gone (tenant-control status serviceState=missing), got ${state} \u2014 run tenant control <repo> ${plan.stage} retire first`
|
|
52896
|
+
};
|
|
52897
|
+
}
|
|
52898
|
+
}
|
|
52899
|
+
const res = await retireDeployCoords(plan.slug, plan.stage, deps.registry, plan.decommissioned);
|
|
52883
52900
|
if (!res.ok) {
|
|
52884
52901
|
return { slug: plan.slug, stage: plan.stage, applied: true, ok: false, existing, error: writeError2(res) };
|
|
52885
52902
|
}
|
|
@@ -56155,7 +56172,7 @@ projectDeploy.command("doctor").description("read-only estate port scan; --box l
|
|
|
56155
56172
|
if (report.error && report.status !== 403) return failGraceful(`org project deploy doctor: ${report.error}`);
|
|
56156
56173
|
if (!report.ok && !report.error) process.exitCode = 1;
|
|
56157
56174
|
});
|
|
56158
|
-
projectDeploy.command("retire [owner/repo]").description("retire (tombstone) one stage's DEPLOY# row for a project that no longer deploys through it (#7095, master-only). --stage is required. DRY-RUN by default \u2014 pass --apply to actually write; defaults to the current repo. Refuses a tenant-container project's live main row.").addOption(new Option("--stage <stage>", "dev | rc | main (required)").choices(["dev", "rc", "main"])).option("--apply", "actually retire (default is a dry-run preview of the row that would be retired)").option("--json", "machine-readable output").action(async (repoOrSlug, o) => {
|
|
56175
|
+
projectDeploy.command("retire [owner/repo]").description("retire (tombstone) one stage's DEPLOY# row for a project that no longer deploys through it (#7095, master-only). --stage is required. DRY-RUN by default \u2014 pass --apply to actually write; defaults to the current repo. Refuses a tenant-container project's live main row.").addOption(new Option("--stage <stage>", "dev | rc | main (required)").choices(["dev", "rc", "main"])).option("--apply", "actually retire (default is a dry-run preview of the row that would be retired)").option("--decommissioned", "main only (#8148): retire a tenant-container main row after `runtime tenant control <repo> main retire`; the box must show main gone").option("--json", "machine-readable output").action(async (repoOrSlug, o) => {
|
|
56159
56176
|
const stage = projectDeploy.opts().stage;
|
|
56160
56177
|
if (!stage) return fail("org project deploy retire: --stage is required (dev | rc | main)");
|
|
56161
56178
|
const cfg = await loadConfig();
|
|
@@ -56168,8 +56185,14 @@ projectDeploy.command("retire [owner/repo]").description("retire (tombstone) one
|
|
|
56168
56185
|
let result;
|
|
56169
56186
|
try {
|
|
56170
56187
|
result = await runDeployRetire(
|
|
56171
|
-
{ target, stage, apply: Boolean(o.apply) },
|
|
56172
|
-
{
|
|
56188
|
+
{ target, stage, apply: Boolean(o.apply), decommissioned: Boolean(o.decommissioned) },
|
|
56189
|
+
{
|
|
56190
|
+
registry: registryClientDeps(cfg),
|
|
56191
|
+
boxServiceState: async (s) => {
|
|
56192
|
+
const r = await runTenantControl(trainApplyDeps(), { repo: target, stage: s, action: "status", watch: true });
|
|
56193
|
+
return r.conclusion === "success" ? r.serviceState ?? "unknown" : "error";
|
|
56194
|
+
}
|
|
56195
|
+
}
|
|
56173
56196
|
);
|
|
56174
56197
|
} catch (e) {
|
|
56175
56198
|
return fail(e.message);
|
package/package.json
CHANGED