Merge pull request #1438 from pikasTech/fix/1422-runtime-ready-render-source

fix: track gitops render source in runtime readiness
This commit is contained in:
Lyon
2026-06-17 22:44:10 +08:00
committed by GitHub
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -291,7 +291,7 @@ lanes:
- skills/hwlab-agent-runtime/
env:
HWLAB_METRICS_NAMESPACE: hwlab-v03
HWLAB_OBSERVABILITY_CONFIG_REVISION: PJ2026-01060505-20260617-render-env
HWLAB_OBSERVABILITY_CONFIG_REVISION: PJ2026-01060505-20260617-render-source
observable: true
hwlab-user-billing:
runtimeKind: go-service
+9 -1
View File
@@ -1038,11 +1038,13 @@ function transformWorkloads({ workloads, deploy, catalog, source, sourceBranch =
label(item.metadata, {
...stableRuntimeLabels,
"hwlab.pikastech.local/gitops-target": gitopsTarget,
"hwlab.pikastech.local/gitops-render-source-commit": source.full,
"hwlab.pikastech.local/source-commit": source.full,
"unidesk.ai/node-staging": profile === "dev" ? "true" : "false"
});
annotate(item.metadata, {
"hwlab.pikastech.local/gitops-note": profile === "v02" ? "HWLAB v0.2 GitOps target." : profile === "prod" ? "node PROD GitOps target." : "node DEV GitOps target.",
"hwlab.pikastech.local/gitops-render-source-commit": source.full,
"hwlab.pikastech.local/source-commit": source.full
});
if (item.kind === "Job") {
@@ -1064,6 +1066,7 @@ function transformWorkloads({ workloads, deploy, catalog, source, sourceBranch =
label(podTemplate.metadata ??= {}, {
...stableRuntimeLabels,
"hwlab.pikastech.local/gitops-target": gitopsTarget,
"hwlab.pikastech.local/gitops-render-source-commit": source.full,
"hwlab.pikastech.local/source-commit": templateSourceCommit,
"hwlab.pikastech.local/artifact-source-commit": templateArtifactCommit
});
@@ -1080,6 +1083,7 @@ function transformWorkloads({ workloads, deploy, catalog, source, sourceBranch =
};
}
annotate(podTemplate.metadata, {
"hwlab.pikastech.local/gitops-render-source-commit": source.full,
"hwlab.pikastech.local/source-commit": templateSourceCommit,
"hwlab.pikastech.local/artifact-source-commit": templateArtifactCommit,
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs"
@@ -2939,7 +2943,11 @@ async function runtimeItems() {
}
function runtimeSourceCommit(item) {
return item.spec?.template?.metadata?.labels?.["hwlab.pikastech.local/source-commit"] ||
return item.spec?.template?.metadata?.labels?.["hwlab.pikastech.local/gitops-render-source-commit"] ||
item.spec?.template?.metadata?.annotations?.["hwlab.pikastech.local/gitops-render-source-commit"] ||
item.metadata?.labels?.["hwlab.pikastech.local/gitops-render-source-commit"] ||
item.metadata?.annotations?.["hwlab.pikastech.local/gitops-render-source-commit"] ||
item.spec?.template?.metadata?.labels?.["hwlab.pikastech.local/source-commit"] ||
item.spec?.template?.metadata?.annotations?.["hwlab.pikastech.local/source-commit"] ||
item.metadata?.labels?.["hwlab.pikastech.local/source-commit"] ||
item.metadata?.annotations?.["hwlab.pikastech.local/source-commit"] ||