shahar1 commented on code in PR #73916:
URL: https://github.com/apache/airflow/pull/73916#discussion_r4156935188
##########
airflow-core/src/airflow/executors/base_executor.py:
##########
@@ -641,11 +693,54 @@ def get_event_buffer(self, dag_ids=None) ->
dict[WorkloadKey, EventBufferValueTy
self.event_buffer = {}
else:
for key in list(self.event_buffer.keys()):
- if not isinstance(key, TaskInstanceKey) or key.dag_id in
dag_ids:
+ coordinates = self._task_coordinates.get(key) if
isinstance(key, TaskInstanceUuid) else None
+ if isinstance(key, TaskInstanceKey):
+ coordinates = key
+ if not isinstance(key, (TaskInstanceUuid, TaskInstanceKey)) or
(
+ coordinates is not None and coordinates.dag_id in dag_ids
+ ):
cleared_events[key] = self.event_buffer.pop(key)
+ task_queue = self.executor_queues.get(WorkloadType.EXECUTE_TASK, {})
+ for task_id, coordinates in list(self._task_coordinates.items()):
Review Comment:
`LocalExecutor` never adds dispatched work to `running`, so this prunes the
entry before the task finishes. With `LocalExecutor` you'll get a log without
coordinates:
>
> ```text
> Received executor event with state success for task instance 01a0f7e1-...
(coordinates=None)
> ```
--
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]