chore: sync hwlab node control-plane state
Capture D601 v03 control-plane YAML/CLI changes, update CI/CD skill notes, and document the hwlab.pikapython.com admin password reset boundary with follow-up issue #319.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1
-9
@@ -418,8 +418,6 @@ function summarizeRuntimeLaneTriggerJobProgress(job: JobRecord, stdoutTail: stri
|
||||
const stageStatus = stringField(lastEvent.status);
|
||||
const sourceCommit = stringField(lastEvent.sourceCommit) ?? firstMatch(stdoutTail, /"sourceCommit"\s*:\s*"([0-9a-f]{40})"/iu);
|
||||
const pipelineRun = stringField(lastEvent.pipelineRun) ?? firstMatch(stdoutTail, /"pipelineRun"\s*:\s*"([^"]+)"/u);
|
||||
const node = stringField(lastEvent.node) ?? commandOption(job.command, "--node") ?? "G14";
|
||||
const lane = stringField(lastEvent.lane) ?? commandOption(job.command, "--lane") ?? "v03";
|
||||
const pipelineCreated = /pipelinerun\.tekton\.dev\/[^ \n]+ created/u.test(stdoutTail)
|
||||
? true
|
||||
: stage === "create-pipelinerun" && stageStatus === "failed"
|
||||
@@ -467,19 +465,13 @@ function summarizeRuntimeLaneTriggerJobProgress(job: JobRecord, stdoutTail: stri
|
||||
slow ? "visibility-warning" : null,
|
||||
].filter(Boolean).join(" "),
|
||||
nextCommand: pipelineRun
|
||||
? `bun scripts/cli.ts hwlab nodes control-plane status --node ${node} --lane ${lane} --pipeline-run ${pipelineRun}`
|
||||
? `bun scripts/cli.ts hwlab nodes control-plane status --node ${stringField(lastEvent.node) ?? "G14"} --lane ${stringField(lastEvent.lane) ?? "v03"} --pipeline-run ${pipelineRun}`
|
||||
: job.status === "running"
|
||||
? `bun scripts/cli.ts job status ${job.id} --tail-bytes 12000`
|
||||
: null,
|
||||
};
|
||||
}
|
||||
|
||||
function commandOption(command: readonly string[], name: string): string | null {
|
||||
const index = command.indexOf(name);
|
||||
const value = index >= 0 ? command[index + 1] : undefined;
|
||||
return typeof value === "string" && value.trim().length > 0 && !value.startsWith("--") ? value.trim() : null;
|
||||
}
|
||||
|
||||
function genericJobProgress(job: JobRecord, stderrTailOverride?: string): JobProgressSummary {
|
||||
const nowMs = Date.now();
|
||||
const stderrTail = stderrTailOverride ?? tailFile(job.stderrFile, 96_000);
|
||||
|
||||
@@ -878,7 +878,7 @@ function connectionStringExport(item: Record<string, unknown>, path: string): Co
|
||||
consumers: arrayOfRecords(item.consumers, `${path}.consumers`).map((consumer, index) => ({
|
||||
scope: stringField(consumer, "scope", `${path}.consumers[${index}]`),
|
||||
secret: stringField(consumer, "secret", `${path}.consumers[${index}]`),
|
||||
key: kubernetesSecretKey(stringField(consumer, "key", `${path}.consumers[${index}]`), `${path}.consumers[${index}].key`),
|
||||
key: envKey(stringField(consumer, "key", `${path}.consumers[${index}]`), `${path}.consumers[${index}].key`),
|
||||
})),
|
||||
};
|
||||
}
|
||||
@@ -909,11 +909,6 @@ function envKey(value: string, path: string): string {
|
||||
return value;
|
||||
}
|
||||
|
||||
function kubernetesSecretKey(value: string, path: string): string {
|
||||
if (!/^[A-Za-z0-9._-]+$/u.test(value)) throw new Error(`${path} must be a Kubernetes Secret key`);
|
||||
return value;
|
||||
}
|
||||
|
||||
function configSummary(pg: PostgresHostConfig): Record<string, unknown> {
|
||||
return {
|
||||
path: pg.configPath,
|
||||
|
||||
Reference in New Issue
Block a user