kaxil commented on PR #73027:
URL: https://github.com/apache/airflow/pull/73027#issuecomment-5779084321
Round 3, verified at 524f00d against `apache/main`. Nothing here blocks. The
code paths (FAIL branch, exhausted-budget branch, supervisor capture, route
write, both version gates) do what the description says, and the round 2 fixes
landed as described. The Tests workflow has not run on the latest push (only
Mergeable and WIP show on 524f00d), so I ran the affected task-sdk and core
modules locally: 153 task-sdk and 57 core tests pass. Four things:
`providers/common/ai/docs/retry_policies.rst` now says the value "is exposed
by the REST API as `state_reason` ... and the Task Instance page in the UI
shows it under **Reason for state**". Neither exists on main or on this branch;
both come from #73030, and #73030's own copy of this page does not carry the
paragraph (it still has the `; retries exhausted (N of M)` sentence). If this
merges first, the published page points at a field that does not exist. Moving
that paragraph to #73030 keeps each PR's docs matching its own code.
The same file is the one conflict `git merge-tree` reports, because main
reorganized the page in #73523 and #73526. After resolving, the sentences to
change are now at :132 ("on a RETRY, written to the task instance's
`retry_reason`") and :420-423 ("The `retry_reason` is only recorded on a RETRY
... On a FAIL it is not written anywhere"). One more outside this diff:
`airflow-core/docs/core-concepts/tasks.rst:299-300` from #73508 (merged today)
says "on FAIL, or when no policy decided, it appears in the task log as the
`Retry policy decision` line", which this PR makes false for the FAIL half.
`task_runner.py:1942` logs a second `Retry policy decision` line with the
opposite action. `_evaluate_retry_policy` has already logged `Retry policy
decision action=retry reason=<same text>` a moment earlier, so the
exhausted-budget path now emits the same event name twice for one decision,
once as `retry` and once as `fail`. What actually happened is "policy asked to
retry, no attempts remain", and saying that (with `try_number` and `max_tries`)
is what an on-call reader needs. `tasks.rst:300` on main points them at "the
`Retry policy decision` line", so two of them disagreeing is what they would
hit.
`test_migrator.py:57` imports `TaskInstanceState` from
`airflow.utils.state`. It is the only task-sdk test importing from core's
`utils`; the other six use `from airflow.sdk import TaskInstanceState`, and
`task-sdk/src` never imports `airflow.utils.state`.
Two housekeeping notes: the PR description still describes the `; retries
exhausted (3 of 3)` suffix and shows it in the Testing sample, which round 3
removed; and #73030 still carries both that suffix and the duplicate log line,
so it will want the same two changes when it rebases onto this.
--
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]