fix: show runtime lane git mirror next commands

This commit is contained in:
Codex
2026-06-08 16:33:08 +00:00
parent 3a51785805
commit 59b3b15328
2 changed files with 10 additions and 2 deletions
+1
View File
@@ -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"),
+9 -2
View File
@@ -5720,6 +5720,7 @@ function runGitMirrorApply(options: G14GitMirrorOptions): Record<string, unknown
function runGitMirrorSync(options: G14GitMirrorOptions): Record<string, unknown> {
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<string, unknown>
].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<string, unknown>
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 },
};
}