Skip to content

Comments

Better error handling to prevent flaky test_last_chance_exception_handling test#44909

Merged
ashb merged 1 commit intoapache:mainfrom
astronomer:handle-early-taskrunner-abort
Dec 13, 2024
Merged

Better error handling to prevent flaky test_last_chance_exception_handling test#44909
ashb merged 1 commit intoapache:mainfrom
astronomer:handle-early-taskrunner-abort

Conversation

@ashb
Copy link
Member

@ashb ashb commented Dec 13, 2024

If the launched subprocess (which in tests just immediately raises an
Exception) exits very quickly before we even try to send the startup message
it would fail with a BrokenPipeError. All we need to do in this case is handle
it as the exit code of the task and it's message (which we already test) will
cover it.

This particular behaviour is hard to reliably catch in tests, so no tests are
added here.

…dling test

If the launched subprocess (which in tests just _immediately_ raises an
Exception) exits very quickly before we even try to send the startup message
it would fail with a BrokenPipeError. All we need to do in this case is handle
it as the exit code of the task and it's message (which we already test) will
cover it.

This particular behaviour is hard to reliably catch in tests, so no tests are
added here.
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Nice!

@ashb ashb merged commit a56b03b into apache:main Dec 13, 2024
@ashb ashb deleted the handle-early-taskrunner-abort branch December 13, 2024 11:25
ellisms pushed a commit to ellisms/airflow that referenced this pull request Dec 13, 2024
…dling test (apache#44909)

If the launched subprocess (which in tests just _immediately_ raises an
Exception) exits very quickly before we even try to send the startup message
it would fail with a BrokenPipeError. All we need to do in this case is handle
it as the exit code of the task and it's message (which we already test) will
cover it.

This particular behaviour is hard to reliably catch in tests, so no tests are
added here.
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
…dling test (apache#44909)

If the launched subprocess (which in tests just _immediately_ raises an
Exception) exits very quickly before we even try to send the startup message
it would fail with a BrokenPipeError. All we need to do in this case is handle
it as the exit code of the task and it's message (which we already test) will
cover it.

This particular behaviour is hard to reliably catch in tests, so no tests are
added here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants