From 4dc2fb9a79cf3dadd9a3008e5aba49810ea0dba4 Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Thu, 30 Apr 2026 15:23:01 +1000 Subject: [PATCH] avoid sleeping a full 60s to wait for job completion Instead, wait for a job condition using kubectl wait --- .github/workflows/release.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b90de38f..325b4f9e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -364,12 +364,11 @@ jobs: # kubectl logs may have exited early (API server closed the stream). # Wait for the job to reach a terminal state before checking the result. kubectl wait job/$NAMEPREFIX -n default \ - --for=condition=complete,failed \ - --timeout=3300s - # Give the Cloud Logging agent time to export the final log burst - # (NUnit pass/fail lines written near pod exit) before Terraform - # destroy removes the cluster. - sleep 60 + --for=condition=Complete \ + --timeout=300s \ + || kubectl wait job/$NAMEPREFIX -n default \ + --for=condition=Failed \ + --timeout=0s job_status=$(kubectl get jobs $NAMEPREFIX -n default \ -o jsonpath='{.status.conditions[0].type}') echo "Job status: $job_status"