You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "henry3260 (via GitHub)" <gi...@apache.org> on 2026/07/30 13:51:35 UTC
[PR] Add regression test for SERVER_TERMINATED precedence over retry [airflow]
henry3260 opened a new pull request, #70774:
URL: https://github.com/apache/airflow/pull/70774
## Why
`ActivitySubprocess.final_state` resolves a task's final state through an ordered
chain of checks. The `SERVER_TERMINATED` check deliberately sits before the
`_should_retry` check: once the API server has told the supervisor to stop
(heartbeat returning 404 / 409 / 410), that TaskInstance is no longer the worker's
to decide on, so the worker must not independently mark it `UP_FOR_RETRY` even
when retries are configured.
That ordering is load-bearing, but nothing currently guards it. `TestSignalRetryLogic`
covers the retry and no-retry outcomes, and a separate integration test covers
`SERVER_TERMINATED`, but no test sets `_terminal_state = SERVER_TERMINATED` together
with `_should_retry = True` and a non-zero exit code — the only input combination
that distinguishes the current ordering from the reverse one. Reordering those two
branches would change behaviour silently.
## What
Adds `test_server_terminated_takes_precedence_over_retry` to `TestSignalRetryLogic`
in `task-sdk/tests/task_sdk/execution_time/test_supervisor.py`, asserting that
`final_state` returns `SERVER_TERMINATED` for a non-zero exit code with
`_should_retry = True`. Also imports `SERVER_TERMINATED` from
`airflow.sdk.execution_time.supervisor`.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 5)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add regression test for SERVER_TERMINATED precedence over retry [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #70774:
URL: https://github.com/apache/airflow/pull/70774#issuecomment-5175738769
### Backport successfully created: v3-3-test
Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.
In matter of doubt please ask in [#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>✅</td>
<td>v3-3-test</td>
<td><a href="https://github.com/apache/airflow/pull/71066"><img src="https://img.shields.io/badge/PR-71066-blue" alt="PR Link"></a></td>
</tr>
</table>
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add regression test for SERVER_TERMINATED precedence over retry [airflow]
Posted by "henry3260 (via GitHub)" <gi...@apache.org>.
henry3260 commented on PR #70774:
URL: https://github.com/apache/airflow/pull/70774#issuecomment-5131716777
The `if` conditions here are easy to reorder accidentally, so a regression test is worth adding.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add regression test for SERVER_TERMINATED precedence over retry [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 merged PR #70774:
URL: https://github.com/apache/airflow/pull/70774
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add regression test for SERVER_TERMINATED precedence over retry [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on PR #70774:
URL: https://github.com/apache/airflow/pull/70774#issuecomment-5162863942
LGTM, @amoghrajesh can you take a look as well?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org