potiuk opened a new pull request, #74280:
URL: https://github.com/apache/airflow/pull/74280

   When pytest exits with a segfault (139), 
`scripts/in_container/run_ci_tests.sh` is meant to check the JUnit XML report 
and let the job pass if every test actually passed. It read the report path 
from `RESULT_LOG_FILE`, which nothing sets, so under `set -u` the script 
stopped with `RESULT_LOG_FILE: unbound variable` and every segfault failed the 
job with exit code 1. One recent example: 
https://github.com/apache/airflow/actions/runs/37321253685/job/111809018440. In 
that run pytest crashed mid-run, so the job still fails with this change, 
correctly; the fallback only helps when the segfault happens after all tests 
have run.
   
   The report path now comes from the `--junitxml=` argument Breeze passes to 
pytest. `check_junitxml_result.py` also treated a `<testsuite>` element without 
child elements as missing, because an empty ElementTree element is falsy; it 
now checks `is not None`.
   
   Checked locally with a stub `pytest` exiting 139: with no report the script 
keeps exit 139 (previously exit 1 with "unbound variable"), with a passing 
report it exits 0, with failures it exits 1; a normal pytest pass still exits 
0. `shellcheck` and `ruff` are clean.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Claude Opus 5)
   
   Generated-by: Claude Code (Claude Opus 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to