diff --git a/scripts/hwlab-g14-contract-test.ts b/scripts/hwlab-g14-contract-test.ts index 22af130d..6c549866 100644 --- a/scripts/hwlab-g14-contract-test.ts +++ b/scripts/hwlab-g14-contract-test.ts @@ -492,6 +492,7 @@ assertCondition( && sourceText.includes("control-plane cleanup-runs requires --lane v02|v03|g14|all") && sourceText.includes("printRuntimeLaneTriggerProgress") && sourceText.includes("hwlab.runtime-lane.trigger.progress") + && sourceText.includes("hwlab nodes control-plane trigger-current --node") && jobsSourceText.includes("hwlab-runtime-lane-trigger") && jobsSourceText.includes("hwlab.runtime-lane.trigger.progress") && jobsSourceText.includes("hwlab nodes control-plane status --node"), diff --git a/scripts/src/hwlab-g14.ts b/scripts/src/hwlab-g14.ts index 79aaf0d2..a1320638 100644 --- a/scripts/src/hwlab-g14.ts +++ b/scripts/src/hwlab-g14.ts @@ -5720,6 +5720,7 @@ function runGitMirrorApply(options: G14GitMirrorOptions): Record { const startedAtMs = Date.now(); + const spec = hwlabRuntimeLaneSpec(options.lane); const jobName = gitMirrorSyncJobName(); const manifest = gitMirrorSyncJobManifest(jobName); const manifestB64 = Buffer.from(JSON.stringify(manifest), "utf8").toString("base64"); @@ -5755,9 +5756,15 @@ function runGitMirrorSync(options: G14GitMirrorOptions): Record ].join("\n"), ].join("\n"); const result = g14K3s(["script", "--", script], options.timeoutSeconds * 1000 + 30_000); + const syncCommand = spec.lane === "v02" + ? "bun scripts/cli.ts hwlab g14 git-mirror sync --lane v02 --confirm" + : `bun scripts/cli.ts hwlab nodes git-mirror sync --node ${spec.nodeId} --lane ${spec.lane} --confirm`; + const triggerCommand = spec.lane === "v02" + ? "bun scripts/cli.ts hwlab g14 control-plane trigger-current --lane v02 --confirm" + : `bun scripts/cli.ts hwlab nodes control-plane trigger-current --node ${spec.nodeId} --lane ${spec.lane} --confirm`; return { ok: isCommandSuccess(result), - command: "hwlab g14 git-mirror sync", + command: spec.lane === "v02" ? "hwlab g14 git-mirror sync" : "hwlab nodes git-mirror sync", mode: options.dryRun ? "dry-run" : "confirmed-sync", namespace: GIT_MIRROR_NAMESPACE, jobName, @@ -5765,7 +5772,7 @@ function runGitMirrorSync(options: G14GitMirrorOptions): Record manifest: options.dryRun ? manifest : undefined, result: compactCommandResult(result), status: options.dryRun ? undefined : runGitMirrorStatus(), - next: options.dryRun ? { sync: "bun scripts/cli.ts hwlab g14 git-mirror sync --confirm" } : { triggerCurrent: "bun scripts/cli.ts hwlab g14 control-plane trigger-current --lane v02 --confirm" }, + next: options.dryRun ? { sync: syncCommand } : { triggerCurrent: triggerCommand }, }; }