fix: select gitops mirror lane from yaml

This commit is contained in:
Codex
2026-07-10 05:19:29 +02:00
parent 7da82fb0be
commit 0e01090bb3
2 changed files with 5 additions and 1 deletions
@@ -130,6 +130,7 @@ interface PacConsumer {
} | null;
repositoryRef: string;
closeoutGitOpsMirrorFlush: boolean;
closeoutGitOpsMirrorLane: "v02" | "v03" | null;
}
interface CommonOptions {
@@ -343,6 +344,7 @@ function parseConsumer(consumer: Record<string, unknown>, path: string, defaultR
},
repositoryRef: typeof consumer.repositoryRef === "string" && consumer.repositoryRef.length > 0 ? consumer.repositoryRef : defaultRepositoryRef,
closeoutGitOpsMirrorFlush: consumer.closeoutGitOpsMirrorFlush === undefined ? false : y.booleanField(consumer, "closeoutGitOpsMirrorFlush", path),
closeoutGitOpsMirrorLane: consumer.closeoutGitOpsMirrorLane === undefined ? null : y.enumField(consumer, "closeoutGitOpsMirrorLane", path, ["v02", "v03"] as const),
};
}
@@ -1530,12 +1532,13 @@ async function runCloseoutGitOpsMirrorFlush(config: UniDeskConfig, pac: PacConfi
};
}
const deadlineMs = Date.now() + (cfg.waitTimeoutSeconds * 1000);
const gitOpsMirrorLane = consumer.closeoutGitOpsMirrorLane ?? consumer.lane;
const scoped = parseNodeScopedDelegatedOptions("git-mirror", [
"flush",
"--node",
consumer.node,
"--lane",
consumer.lane,
gitOpsMirrorLane,
"--confirm",
"--wait",
"--timeout-seconds",