xBis7 commented on code in PR #43941:
URL: https://github.com/apache/airflow/pull/43941#discussion_r2004209664
##########
airflow/jobs/scheduler_job_runner.py:
##########
@@ -807,8 +818,18 @@ def process_executor_events(
ti.pid,
)
- with Trace.start_span_from_taskinstance(ti=ti) as span:
- cls._set_span_attrs__process_executor_events(span, state, ti)
+ active_ti_span = cls.active_spans.get(ti.key)
+ if active_ti_span is not None:
Review Comment:
It also needs parentheses, otherwise it's assigning the result of the
boolean condition to the `active_ti_span`.
```
airflow/jobs/scheduler_job_runner.py:835: error: "Literal[True]" has no
attribute "end" [attr-defined]
active_ti_span.end(end_time=datetime_to_nano(ti.end_da...
^~~~~~~~~~~~~~~~~~
Found 1 error in 1 file (checked 2 source files)
```
--
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]