@mutmutco/cli 4.5.169 → 4.5.170
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 +34 -7
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -10145,6 +10145,19 @@ function retriedFetch(deps, url, init) {
|
|
|
10145
10145
|
sleep: deps.retrySleep
|
|
10146
10146
|
});
|
|
10147
10147
|
}
|
|
10148
|
+
async function backfillDeployHistory(since, apply, deps) {
|
|
10149
|
+
if (!deps.baseUrl) throw new Error("Hub API URL not configured");
|
|
10150
|
+
const token = await deps.token();
|
|
10151
|
+
if (!token) throw new Error("no Hub session token (run `gh auth login`)");
|
|
10152
|
+
const res = await retriedFetch({ ...deps, timeoutMs: TENANT_DEPLOY_TIMEOUT_MS }, `${deps.baseUrl.replace(/\/$/, "")}/deploy-history/backfill`, {
|
|
10153
|
+
method: "POST",
|
|
10154
|
+
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
|
10155
|
+
body: JSON.stringify({ since, dryRun: !apply })
|
|
10156
|
+
});
|
|
10157
|
+
const body = await res.json();
|
|
10158
|
+
if (!res.ok) throw new Error(`deploy history backfill HTTP ${res.status}: ${body.error ?? res.statusText}`);
|
|
10159
|
+
return body;
|
|
10160
|
+
}
|
|
10148
10161
|
async function fetchTrainAuthority(repo, deps) {
|
|
10149
10162
|
if (!deps.baseUrl) return { ok: false, error: "Hub API URL not configured" };
|
|
10150
10163
|
const token = await deps.token();
|
|
@@ -19074,10 +19087,10 @@ var rollout_plan_default = {
|
|
|
19074
19087
|
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)."
|
|
19075
19088
|
},
|
|
19076
19089
|
baseline: {
|
|
19077
|
-
version: "4.5.
|
|
19078
|
-
tag: "v4.5.
|
|
19079
|
-
commit: "
|
|
19080
|
-
npm: "@mutmutco/cli@4.5.
|
|
19090
|
+
version: "4.5.170",
|
|
19091
|
+
tag: "v4.5.170",
|
|
19092
|
+
commit: "db6d0ad102a1",
|
|
19093
|
+
npm: "@mutmutco/cli@4.5.170"
|
|
19081
19094
|
},
|
|
19082
19095
|
exitCriterion: "fleet-n-of-n",
|
|
19083
19096
|
hubOnlyShortcut: "forbidden",
|
|
@@ -19094,14 +19107,14 @@ var rollout_plan_default = {
|
|
|
19094
19107
|
repo: "mutmutco/mmi-hub",
|
|
19095
19108
|
role: "canary",
|
|
19096
19109
|
schedule: "train",
|
|
19097
|
-
v3Target: "v4.5.
|
|
19110
|
+
v3Target: "v4.5.170"
|
|
19098
19111
|
}
|
|
19099
19112
|
],
|
|
19100
19113
|
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.",
|
|
19101
19114
|
rollback: {
|
|
19102
19115
|
independent: true,
|
|
19103
|
-
mechanism: "npm dist-tag latest -> 4.5.
|
|
19104
|
-
v3Target: "v4.5.
|
|
19116
|
+
mechanism: "npm dist-tag latest -> 4.5.170 and redeploy the Hub Lambda from tag v4.5.170 (db6d0ad102a1); installed clients repair via `mmi-cli doctor`. No other cohort is touched.",
|
|
19117
|
+
v3Target: "v4.5.170 (@mutmutco/cli@4.5.170, tag commit db6d0ad102a1 \u2014 last known-good release carrying the repo-index v4-only contract)"
|
|
19105
19118
|
}
|
|
19106
19119
|
},
|
|
19107
19120
|
{
|
|
@@ -31076,6 +31089,7 @@ function consolidateCommandNamespaces(program3) {
|
|
|
31076
31089
|
const runtimeDeploy = runtime.command("deploy").description("runtime deployment status");
|
|
31077
31090
|
const deploy = child(program3, "deploy");
|
|
31078
31091
|
move(deploy, runtimeDeploy, "status");
|
|
31092
|
+
move(deploy, runtimeDeploy, "history-backfill");
|
|
31079
31093
|
remove(program3, "deploy");
|
|
31080
31094
|
move(program3, runtime, "box");
|
|
31081
31095
|
move(program3, runtime, "edge");
|
|
@@ -37883,6 +37897,19 @@ function formatDeployStatus(r) {
|
|
|
37883
37897
|
var STAGES2 = ["dev", "rc", "main"];
|
|
37884
37898
|
function registerDeployCommands(program3) {
|
|
37885
37899
|
const deploy = program3.command("deploy").description("per-stage deploy observability \u2014 last run, health, and running version (#2688)");
|
|
37900
|
+
deploy.command("history-backfill").description("master-only registry history backfill from Hub tenant-deploy runs (dry-run by default; no dispatch)").requiredOption("--since <ISO>", "include runs created at or after this timestamp").option("--apply", "write successful runs to Hub deploy history").option("--json", "machine-readable counts").action(async (o) => {
|
|
37901
|
+
try {
|
|
37902
|
+
const report = await backfillDeployHistory(o.since, o.apply === true, registryClientDeps(await loadConfig()));
|
|
37903
|
+
if (o.json) console.log(JSON.stringify(report, null, 2));
|
|
37904
|
+
else {
|
|
37905
|
+
console.log(`${report.dryRun ? "Dry-run" : "Applied"} since ${report.since}: ${report.totalRuns} runs, ${report.written} written`);
|
|
37906
|
+
for (const [repo, counts] of Object.entries(report.perRepo)) console.log(`${repo}: ${counts.success} success, ${counts.failed} failed, ${counts.cancelled} cancelled, ${counts.other} other`);
|
|
37907
|
+
console.log(`Skipped: ${report.skipped.nonSha} non-SHA, ${report.skipped.unregistered} unregistered/ambiguous, ${report.skipped.badTitle} bad title`);
|
|
37908
|
+
}
|
|
37909
|
+
} catch (e) {
|
|
37910
|
+
return failGraceful(`deploy history-backfill: ${e.message}`);
|
|
37911
|
+
}
|
|
37912
|
+
});
|
|
37886
37913
|
deploy.command("status <stage>").description("last deploy run + runtime health probe + running version for a stage (defaults to the current repo); a root answering 401/403/404 is re-probed at /health and the `url` field names the endpoint that answered (#6137)").option("--repo <owner/repo>", "target repo (defaults to the current repo)").option("--json", "machine-readable output").action(async (stage, o) => {
|
|
37887
37914
|
if (!STAGES2.includes(stage)) {
|
|
37888
37915
|
return fail(`runtime deploy status: <stage> must be dev, rc, or main`);
|
package/package.json
CHANGED