potiuk opened a new pull request, #69359:
URL: https://github.com/apache/airflow/pull/69359
Backport of #67877 to `v3-3-test`.
## Why
The OTel integration test on `v3-3-test`
(`test_dag_execution_succeeds[detail_spans]`)
expects operator-emitted spans (e.g. `sub_span1`) to nest under a
`task.execute` span,
but that span was never emitted on `v3-3-test`: the test-expectation update
(#69236,
backported as #69246) landed here **without** its source dependency #67877,
which adds
the `@detail_span("task.execute")` wrapper around the operator execute
callable.
As a result the test deterministically fails (`sub_span1` nests under
`_execute_task`
instead of `task.execute`). This surfaced now because #69285 makes CI
actually run the
OTel integration test on `v3-3-test`.
This backport restores the missing source change so the span hierarchy
matches the
already-backported test expectation, unblocking #69285.
## Verification
Cherry-picked from b006a978d2 (auto-merged cleanly; `task_runner.py` had
diverged but
without overlapping edits). Verified locally:
- `_execute_task` now calls the new `_run_execute_callable`
(`@detail_span("task.execute")`);
contextvars snapshot + `ExecutorSafeguard` tracker + execution-timeout
handling moved into it.
- `ruff` clean.
- `test_task_runner.py` execute suite passes (12 tests), including
`test_operator_child_spans_nest_under_task_execute`.
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 4.8)
Generated-by: 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]