jason810496 opened a new pull request, #68555:
URL: https://github.com/apache/airflow/pull/68555
- related: #67936 (original SDK fix, cherry-picked here)
- closes: #67798
## Why
In coordinator mode a failing Java task with retries left was reported as a
terminal `TaskState(FAILED)` frame, so the supervisor never retried it.
## What
- `java-sdk` `Task.kt`: return `RetryTask` on a task exception when
`should_retry` is true.
- `AnnotationExample.load` task read `context.ti.tryNumber`, throw on the
first attempt and return normally on the retry; wire it into the
`java_annotation_example` Dag with `retries=1`.
- e2e (`java_sdk_tests`): assert `load` transitions through UP_FOR_RETRY and
ends `success` on `try_number` 2.
## Verification
All 3 `java_sdk` e2e tests pass:
```
E2E_TEST_MODE=java_sdk uv run --project airflow-e2e-tests pytest \
airflow-e2e-tests/tests/airflow_e2e_tests/java_sdk_tests/test_java_sdk_dag.py
-xvs
```
---
##### Was generative AI tooling used to co-author this PR?
- [x] Yes, with help of Claude Code Opus 4.8 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]