ferruzzi commented on code in PR #37948:
URL: https://github.com/apache/airflow/pull/37948#discussion_r1520538400
##########
airflow/executors/base_executor.py:
##########
@@ -311,12 +313,10 @@ def trigger_tasks(self, open_slots: int) -> None:
@span
def _process_tasks(self, task_tuples: list[TaskTuple]) -> None:
- from airflow.traces.utils import gen_span_id_from_ti_key, gen_trace_id
-
for key, command, queue, executor_config in task_tuples:
- qt = self.queued_tasks[key][3]
- trace_id = int(gen_trace_id(qt.dag_run), 16) # TaskInstance in
fourth element
- span_id = int(gen_span_id_from_ti_key(key), 16)
+ task_instance = self.queued_tasks[key][3]
+ trace_id = int(gen_trace_id(task_instance.dag_run, as_int=True))
# TaskInstance in fourth element
Review Comment:
I just saw your comment above about MyPy still wanting this to be cast...
that's annoying, let me think of a better way to et around that.
##########
airflow/executors/base_executor.py:
##########
@@ -311,12 +313,10 @@ def trigger_tasks(self, open_slots: int) -> None:
@span
def _process_tasks(self, task_tuples: list[TaskTuple]) -> None:
- from airflow.traces.utils import gen_span_id_from_ti_key, gen_trace_id
-
for key, command, queue, executor_config in task_tuples:
- qt = self.queued_tasks[key][3]
- trace_id = int(gen_trace_id(qt.dag_run), 16) # TaskInstance in
fourth element
- span_id = int(gen_span_id_from_ti_key(key), 16)
+ task_instance = self.queued_tasks[key][3]
+ trace_id = int(gen_trace_id(task_instance.dag_run, as_int=True))
# TaskInstance in fourth element
Review Comment:
I just saw your comment above about MyPy still wanting this to be cast...
that's annoying, let me think of a better way to get around that.
--
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]