This is an automated email from the ASF dual-hosted git repository.
dstandish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new d7d84b46d81 Indent dag-run span TODO comment continuation lines
(#68643)
d7d84b46d81 is described below
commit d7d84b46d819ab0194f9ca7c6dd918e0da72ae4e
Author: Daniel Standish <[email protected]>
AuthorDate: Thu Jun 18 09:53:04 2026 -0700
Indent dag-run span TODO comment continuation lines (#68643)
Indent the continuation lines of the _emit_dagrun_span TODO comment by
one extra space and add a blank line before it, so JetBrains/PyCharm
highlights the whole TODO block.
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
---
airflow-core/src/airflow/models/dagrun.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/airflow-core/src/airflow/models/dagrun.py
b/airflow-core/src/airflow/models/dagrun.py
index ab024142918..5218f4ed8b0 100644
--- a/airflow-core/src/airflow/models/dagrun.py
+++ b/airflow-core/src/airflow/models/dagrun.py
@@ -1089,13 +1089,14 @@ class DagRun(Base, LoggingMixin):
attributes["airflow.dag_run.logical_date"] =
str(self.logical_date)
if self.partition_key:
attributes["airflow.dag_run.partition_key"] =
str(self.partition_key)
+
# TODO: make the empty parent context optional. Default should be
to
- # nest the dag run span under the currently active parent span (by
- # omitting `context` here); only use the empty `context.Context()`
to
- # force a root span when Airflow itself initiates the run (e.g. dag
- # triggered via API, scheduler, or backfill). Today this forces a
- # root span unconditionally.
- # Tracked at https://github.com/apache/airflow/issues/67210
+ # nest the dag run span under the currently active parent span (by
+ # omitting `context` here); only use the empty
`context.Context()` to
+ # force a root span when Airflow itself initiates the run (e.g.
dag
+ # triggered via API, scheduler, or backfill). Today this forces a
+ # root span unconditionally.
+ # Tracked at https://github.com/apache/airflow/issues/67210
span = tracer.start_span(
name=f"dag_run.{self.dag_id}",
start_time=int((self.queued_at or self.start_date or
timezone.utcnow()).timestamp() * 1e9),