99 description : ' Also wait for frontend health check (default: false)'
1010 required : false
1111 default : ' false'
12+ install-kueue :
13+ description : ' Install Kueue CRDs for executor pods (default: true)'
14+ required : false
15+ default : ' true'
1216
1317runs :
1418 using : ' composite'
@@ -26,18 +30,26 @@ runs:
2630 /home/runner/.kube/config > backend/kubeconfig.yaml
2731 chmod 644 backend/kubeconfig.yaml
2832
29- - name : Install Kueue
33+ - name : Install Kueue and wait for executor image pulls
34+ if : inputs.install-kueue == 'true'
3035 shell : bash
3136 run : |
37+ set -e
38+
3239 KUEUE_VERSION="${KUEUE_VERSION:-v0.16.1}"
3340 KUEUE_MANIFEST_SHA256="${KUEUE_MANIFEST_SHA256:-3201a66ff731be440ecfcf3c0fa5979d001b834f68389208fe7ee18017fbcfe8}"
3441 KUEUE_MANIFEST="/tmp/kueue-manifests.yaml"
35- curl -fsSL -o "$KUEUE_MANIFEST" "https://github.com/kubernetes-sigs/kueue/releases/download/${KUEUE_VERSION}/manifests.yaml"
42+
43+ timeout 120 tail --pid="$(cat /tmp/kueue-download.pid)" -f /dev/null 2>/dev/null || true
44+ cat /tmp/kueue-download.log 2>/dev/null || true
45+ [ "$(cat /tmp/kueue-download.exit)" = "0" ]
46+
3647 echo "${KUEUE_MANIFEST_SHA256} ${KUEUE_MANIFEST}" | sha256sum -c -
3748 kubectl apply --server-side -f "$KUEUE_MANIFEST"
3849 rm -f "$KUEUE_MANIFEST"
3950 kubectl wait --for=condition=Available --timeout=120s \
4051 deployment/kueue-controller-manager -n kueue-system
52+
4153 kubectl apply --server-side -f - <<'EOF'
4254 apiVersion: kueue.x-k8s.io/v1beta1
4355 kind: ResourceFlavor
@@ -69,34 +81,23 @@ runs:
6981 clusterQueue: executor-queue
7082 EOF
7183
72- - name : Use test environment config
73- shell : bash
74- run : cp backend/config.test.toml backend/config.toml
84+ timeout 120 tail --pid="$(cat /tmp/crictl-python.pid)" -f /dev/null 2>/dev/null || true
85+ cat /tmp/crictl-python.log 2>/dev/null || true
86+ [ "$(cat /tmp/crictl-python.exit)" = "0" ]
7587
76- - name : Pre-pull test runtime images into K3s
77- shell : bash
78- run : |
79- sudo k3s crictl pull docker.io/library/python:3.11-slim
80- sudo k3s crictl pull docker.io/library/busybox:1.36
88+ timeout 120 tail --pid="$(cat /tmp/crictl-busybox.pid)" -f /dev/null 2>/dev/null || true
89+ cat /tmp/crictl-busybox.log 2>/dev/null || true
90+ [ "$(cat /tmp/crictl-busybox.exit)" = "0" ]
8191
82- - name : Wait for image pull and infra
92+ - name : Prepare config, wait for infra
8393 shell : bash
8494 run : |
85- if [ -f /tmp/infra-pull.pid ]; then
86- PID=$(cat /tmp/infra-pull.pid)
87- if kill -0 "$PID" 2>/dev/null; then
88- echo "Waiting for image pull + infra startup..."
89- tail --pid="$PID" -f /dev/null 2>/dev/null || true
90- fi
91- fi
95+ set -e
96+ cp backend/config.test.toml backend/config.toml
97+
98+ timeout 120 tail --pid="$(cat /tmp/infra-pull.pid)" -f /dev/null 2>/dev/null || true
9299 cat /tmp/infra-pull.log 2>/dev/null || true
93- if [ -f /tmp/infra-pull.exit ]; then
94- EXIT_CODE=$(cat /tmp/infra-pull.exit)
95- if [ "$EXIT_CODE" != "0" ]; then
96- echo "::error::Background image pull / infra pre-warm failed (exit $EXIT_CODE)"
97- exit 1
98- fi
99- fi
100+ [ "$(cat /tmp/infra-pull.exit)" = "0" ]
100101
101102 - name : Start stack
102103 shell : bash
@@ -110,11 +111,10 @@ runs:
110111 WAIT_FOR_FRONTEND : ${{ inputs.wait-for-frontend }}
111112 run : |
112113 echo "Waiting for backend health..."
113- timeout 120 bash -c 'until curl -ksf https://localhost/api/v1/health/live 2>/dev/null; do sleep 2 ; done'
114+ timeout 120 bash -c 'until curl -ksf https://localhost/api/v1/health/live 2>/dev/null; do sleep 1 ; done'
114115 echo "Backend ready"
115116 if [ "$WAIT_FOR_FRONTEND" = "true" ]; then
116117 echo "Waiting for frontend health..."
117- timeout 60 bash -c 'until curl -ksf https://localhost:5001 2>/dev/null; do sleep 2 ; done'
118+ timeout 60 bash -c 'until curl -ksf https://localhost:5001 2>/dev/null; do sleep 1 ; done'
118119 echo "Frontend ready"
119120 fi
120-
0 commit comments