Skip to content

Commit

Permalink
correct error handling for periodic pagebench runner status (#8274)
Browse files Browse the repository at this point in the history
## Problem

the following periodic pagebench run was failed but was still shown as
successful


https://github.com/neondatabase/neon/actions/runs/9798909458/job/27058179993#step:9:47

## Summary of changes

if the ec2 test runner reports a failure fail the job step and thus the
workflow

---------

Co-authored-by: Alexander Bayandin <alexander@neon.tech>
  • Loading branch information
Bodobolero and bayandin committed Jul 5, 2024
1 parent e25ac31 commit 6876f0d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/periodic_pagebench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ jobs:
set +x
status=$(echo $response | jq -r '.status')
echo "Test status: $status"
if [[ "$status" == "failure" || "$status" == "success" || "$status" == "null" ]]; then
if [[ "$status" == "failure" ]]; then
echo "Test failed"
exit 1 # Fail the job step if status is failure
elif [[ "$status" == "success" || "$status" == "null" ]]; then
break
fi
if [[ "$status" == "too_many_runs" ]]; then
elif [[ "$status" == "too_many_runs" ]]; then
echo "Too many runs already running"
echo "too_many_runs=true" >> "$GITHUB_OUTPUT"
exit 1
Expand All @@ -107,6 +109,7 @@ jobs:
done
- name: Retrieve Test Logs
if: always() && steps.poll_step.outputs.too_many_runs != 'true'
run: |
curl -k -X 'GET' \
"${EC2_MACHINE_URL_US}/test_log/${GITHUB_RUN_ID}" \
Expand All @@ -115,6 +118,7 @@ jobs:
--output "test_log_${GITHUB_RUN_ID}.gz"
- name: Unzip Test Log and Print it into this job's log
if: always() && steps.poll_step.outputs.too_many_runs != 'true'
run: |
gzip -d "test_log_${GITHUB_RUN_ID}.gz"
cat "test_log_${GITHUB_RUN_ID}"
Expand Down

1 comment on commit 6876f0d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3111 tests run: 2984 passed, 0 failed, 127 skipped (full report)


Flaky tests (2)

Postgres 15

Postgres 14

  • test_tenant_creation_fails: debug

Code coverage* (full report)

  • functions: 32.6% (6930 of 21268 functions)
  • lines: 50.0% (54448 of 108884 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
6876f0d at 2024-07-05T10:58:56.222Z :recycle:

Please sign in to comment.