Skip to content

Exit Python Tests step after first failure#3382

Open
dsubak wants to merge 3 commits intomainfrom
dansubak/202603_can_we_terminate_early
Open

Exit Python Tests step after first failure#3382
dsubak wants to merge 3 commits intomainfrom
dansubak/202603_can_we_terminate_early

Conversation

@dsubak
Copy link
Contributor

@dsubak dsubak commented Mar 12, 2026

Description (What does it do?)

Sets -e and -o pipefail on the python test wrapper script.

The practical effect of this is that if any of the scripts in the Python Tests section where this is executed fail, it'll immediately terminate execution and the last output in the github UI for that step will be the script with the non-zero status code.

By way of example, in this commit I artificially induced the detect_missing_migration.sh command to fail. As seen in the corresponding CI run, no subsequent tests are run and the output stops there.

Screenshot 2026-03-12 at 4 10 17 PM

Additional Context

This is pretty low stakes, but I do want to make sure this is desirable behavior. As written python_tests.sh kinda looks like the current behavior of carrying forward a failing status code but still executing the rest may have been intentional.

This proposed behavior was only very lightly discussed by Chris and I in this thread because we found earlier failures to be inadequately discoverable and thought this might be a good QoL improvement, but maybe there's a reason it's set up this way! Would welcome opinions or historical context.

@github-actions
Copy link

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:


## Changes for v1.yaml:


## Changes for v2.yaml:


Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@dsubak dsubak marked this pull request as ready for review March 12, 2026 20:17
@dsubak dsubak changed the title Dansubak/202603 can we terminate early Exit Python Tests step after first failure Mar 12, 2026
@gumaerc gumaerc self-assigned this Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants