From 88c83c17ceee2182631fab785a287eee5cd4e810 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Mon, 9 Mar 2026 22:35:16 +0100 Subject: [PATCH] fix(train): use correct Argo Events label selector for CI workflow lookup Argo Events labels workflows with events.argoproj.io/trigger, not workflows.argoproj.io/workflow-template. Fixed find_ci_workflow() so ci-train preset can actually find CI pipeline runs. Co-Authored-By: Claude Opus 4.6 --- infra/scripts/train.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infra/scripts/train.sh b/infra/scripts/train.sh index ad08081e8..6a1e704a3 100755 --- a/infra/scripts/train.sh +++ b/infra/scripts/train.sh @@ -172,10 +172,10 @@ find_ci_workflow() { local sha="$1" local short_sha="${sha:0:8}" # List recent ci-pipeline workflows and find the one matching our commit. - # Argo labels the workflow with the template name; we also grep for the SHA - # in the workflow spec parameters. + # Argo Events labels workflows with events.argoproj.io/trigger (not + # workflows.argoproj.io/workflow-template), so use that selector. kubectl -n "${NAMESPACE}" get workflows \ - -l "workflows.argoproj.io/workflow-template=ci-pipeline" \ + -l "events.argoproj.io/trigger=ci-pipeline" \ -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.phase}{"\t"}{range .spec.arguments.parameters[*]}{.name}={.value}{","}{end}{"\n"}{end}' \ 2>/dev/null \ | grep "commit-sha=${sha}\|commit-sha=${short_sha}" \