fix(infra): use inputs.parameters for Argo template tag passing

Argo Workflows can't resolve {{tasks.X.outputs}} inside template
bodies — only in DAG task arguments. Pass tag via arguments →
inputs.parameters in compile-services, compile-training,
upload-release, and deploy-services templates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-07 20:44:52 +01:00
parent d7061ca2ac
commit 72bc133dba

View File

@@ -57,11 +57,19 @@ spec:
- name: compile-services
dependencies: [create-tag]
template: compile-services
arguments:
parameters:
- name: tag
value: "{{tasks.create-tag.outputs.parameters.tag}}"
when: "{{tasks.detect-changes.outputs.parameters.needs-services}} == true"
- name: compile-training
dependencies: [create-tag]
template: compile-training
arguments:
parameters:
- name: tag
value: "{{tasks.create-tag.outputs.parameters.tag}}"
when: "{{tasks.detect-changes.outputs.parameters.needs-training}} == true"
- name: gpu-warmup
@@ -77,11 +85,19 @@ spec:
- name: upload-release
dependencies: [compile-services, compile-training]
template: upload-release
arguments:
parameters:
- name: tag
value: "{{tasks.create-tag.outputs.parameters.tag}}"
when: "{{tasks.detect-changes.outputs.parameters.needs-code}} == true"
- name: deploy-services
dependencies: [upload-release]
template: deploy-services
arguments:
parameters:
- name: tag
value: "{{tasks.create-tag.outputs.parameters.tag}}"
when: "{{tasks.detect-changes.outputs.parameters.needs-services}} == true"
- name: rebuild-ci-builder
@@ -392,6 +408,9 @@ spec:
# ── compile-services: CPU-only, runs on ci-compile-cpu alongside compile-training ──
# sccache backed by MinIO (s3://foxhunt-sccache/cpu/) — shared across nodes
- name: compile-services
inputs:
parameters:
- name: tag
nodeSelector:
k8s.scaleway.com/pool-name: ci-compile-cpu
tolerations:
@@ -470,7 +489,7 @@ spec:
cd "$WORKSPACE"
echo "Checked out $(git rev-parse --short HEAD)"
export FOXHUNT_BUILD_VERSION="{{tasks.create-tag.outputs.parameters.tag}}"
export FOXHUNT_BUILD_VERSION="{{inputs.parameters.tag}}"
export RUSTC_WRAPPER=sccache
sccache --zero-stats || true
@@ -509,6 +528,9 @@ spec:
# ── compile-training: CUDA build, needs POP2 for speed ──
# sccache backed by MinIO (s3://foxhunt-sccache/cuda/sm_XX/) — persists across ephemeral nodes
- name: compile-training
inputs:
parameters:
- name: tag
nodeSelector:
k8s.scaleway.com/pool-name: ci-compile-cpu
tolerations:
@@ -585,7 +607,7 @@ spec:
cd "$WORKSPACE"
echo "Checked out $(git rev-parse --short HEAD)"
export FOXHUNT_BUILD_VERSION="{{tasks.create-tag.outputs.parameters.tag}}"
export FOXHUNT_BUILD_VERSION="{{inputs.parameters.tag}}"
export RUSTC_WRAPPER=sccache
export CUDA_COMPUTE_CAP={{workflow.parameters.cuda-compute-cap}}
export SCCACHE_S3_KEY_PREFIX="cuda/sm_${CUDA_COMPUTE_CAP}"
@@ -625,6 +647,9 @@ spec:
# ── upload-release: create GitLab Release with package links ──
- name: upload-release
inputs:
parameters:
- name: tag
nodeSelector:
k8s.scaleway.com/pool-name: platform
container:
@@ -648,7 +673,7 @@ spec:
set -e
GITLAB="http://gitlab-webservice-default.foxhunt.svc.cluster.local:8181"
PROJECT_ID=1
TAG="{{tasks.create-tag.outputs.parameters.tag}}"
TAG="{{inputs.parameters.tag}}"
echo "=== Creating GitLab Release ${TAG} ==="
@@ -742,6 +767,9 @@ spec:
# ── deploy-services: rolling restart after new binaries are uploaded ──
- name: deploy-services
inputs:
parameters:
- name: tag
serviceAccountName: argo-workflow
nodeSelector:
k8s.scaleway.com/pool-name: platform
@@ -765,7 +793,7 @@ spec:
export PATH="/tmp:$PATH"
fi
TAG="{{tasks.create-tag.outputs.parameters.tag}}"
TAG="{{inputs.parameters.tag}}"
echo "=== Deploying release ${TAG} ==="
SERVICES="api trading-service ml-training-service backtesting-service trading-agent-service broker-gateway data-acquisition-service"