From fc3c559e4f5843817bff696a3cc66913d5ffaa6e Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Fri, 1 May 2026 16:08:59 +1000 Subject: [PATCH] move test summary generation above check job status if check job status was a failure (eg when a test failed), then the test summary generation was being skipped. Moving the test summary generation step above the job status check avoids this. --- .github/workflows/release.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68b3df7e..b23d05d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -360,22 +360,6 @@ jobs: # API server closes the connection before the pod exits. kubectl logs $POD -n default --follow || true - - name: Check job status - run: | - # 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 \ - --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" - [[ "$job_status" == "SuccessCriteriaMet" ]] || exit 1 - - name: Generate test summary env: GCP_PROJECT: ${{ vars.RELEASE_TESTS_GCP_PROJECT }} @@ -403,6 +387,22 @@ jobs: python3 .github/scripts/generate_test_summary.py rm -f "$ENTRIES_FILE" + - name: Check job status + run: | + # 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 \ + --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" + [[ "$job_status" == "SuccessCriteriaMet" ]] || exit 1 + - name: Delete PVCs before cluster teardown if: always() && steps.tf-apply.conclusion != 'skipped' run: |