fix: scope v03 secret-plane smoke to D601

This commit is contained in:
root
2026-06-27 13:33:45 +00:00
parent 367affeabb
commit aedc30c7c1
4 changed files with 122 additions and 8 deletions
+10 -1
View File
@@ -142,7 +142,9 @@ export function applyRuntimeLaneDeployConfig(args: GitOpsRenderArgs, deploy: Dep
if (!isRuntimeLane(args.lane)) return args;
const result: GitOpsRenderArgs = { ...args };
const laneConfig = runtimeLaneConfig(deploy, args.lane);
const nodeId = nodeIdForRuntimeLane(deploy, args.lane, defaults);
const configuredNodeId = nodeIdForRuntimeLane(deploy, args.lane, defaults);
const rootNodeId = nodeIdFromGitopsRoot(result.gitopsRoot);
const nodeId = result.nodeId && result.nodeId !== defaultNodeId ? result.nodeId : rootNodeId ?? configuredNodeId;
const node = nodeConfig(deploy, nodeId);
const versionName = versionNameForRuntimeLane(args.lane);
const defaultEndpointOptions: { host?: string; v02Endpoint?: string } = {};
@@ -172,6 +174,13 @@ export function applyRuntimeLaneDeployConfig(args: GitOpsRenderArgs, deploy: Dep
return result;
}
function nodeIdFromGitopsRoot(gitopsRoot: unknown): string | undefined {
if (typeof gitopsRoot !== "string") return undefined;
const normalized = normalizeRepoPath(gitopsRoot);
const match = normalized.match(/(?:^|\/)deploy\/gitops\/node\/([^/]+)$/u);
return match?.[1] ? match[1].toUpperCase() : undefined;
}
export function runtimeLaneMirrorSpecs(deploy: DeployConfig, defaults: RuntimeLaneDefaults = {}): RuntimeLaneMirrorSpec[] {
return Object.entries(deploy.lanes ?? {})
.filter(([lane, config]) => isRuntimeLane(lane) && isObject(config))