Skip to content

Commit 9d38555

Browse files
committed
fix: print cluster-create's log on failure, not just success, and archive it in debug artifacts
Signed-off-by: Byron McAdams <bmcadams@nvidia.com>
1 parent ca904fa commit 9d38555

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/actions/e2e/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,13 @@ runs:
9999
# aicrd only needs the cluster/registry - build and push it (replaces
100100
# Tilt custom_build) as soon as that's ready, not gated behind the
101101
# unrelated validator/CLI builds above.
102-
wait $pid_cluster
102+
#
103+
# cluster-create's output was redirected to a file above so it
104+
# wouldn't interleave with the concurrent builds; print it on
105+
# failure too (not just success), since a failed `wait` here is the
106+
# most common, most opaque failure on this step and would otherwise
107+
# exit via the EXIT trap with zero diagnostic output.
108+
wait $pid_cluster || { cat /tmp/cluster-create.log; exit 1; }
103109
cat /tmp/cluster-create.log
104110
KO_DOCKER_REPO=localhost:5001/aicrd ko build --bare --tags=tilt ./cmd/aicrd
105111
@@ -199,6 +205,7 @@ runs:
199205
shell: bash
200206
run: |
201207
mkdir -p /tmp/debug-artifacts
208+
cp /tmp/cluster-create.log /tmp/debug-artifacts/cluster-create.log 2>/dev/null || true
202209
kubectl get all --all-namespaces > /tmp/debug-artifacts/all-resources.txt || true
203210
kubectl get events --all-namespaces --sort-by='.lastTimestamp' > /tmp/debug-artifacts/events.txt || true
204211
kubectl logs -n aicr -l app.kubernetes.io/name=aicrd --tail=500 > /tmp/debug-artifacts/aicrd-logs.txt || true

0 commit comments

Comments
 (0)