ashb commented on PR #74752:
URL: https://github.com/apache/airflow/pull/74752#issuecomment-6362108410

   At `listener.py:916` (`get_task_documentation(task)`, not part of this 
diff): **Scheduler FAIL for mapped tasks is dropped (pre-existing, but it hides 
the new mapped fields).** On the scheduler `ti.task` is a 
`SerializedMappedOperator` for a mapped TI, and `get_task_documentation(task)` 
reads `operator.doc`, which on that class is `attrs.field(init=False)` with no 
default. It raises `AttributeError: ... object has no attribute 'doc'` 
(reproduced on a serialized Dag; a plain task returns `(None, None)`). The hook 
wrapper swallows it, so no event is sent for any mapped task instance the 
scheduler fails, and only after the `get_stored_task_instance_position` call 
above has already run its queries. A heartbeat kill of a mapped-in-loop slot on 
a live 3.4.0 stack logged exactly this error.
   
   So the mapped part of "FAIL events sent by the scheduler carry the same 
fields as worker ones" (`expanded_ti_count`, mapped-in-loop `loop.index` from 
the region rows) can't reach an event today, and the unit tests can't notice 
because `test_manual_event_...` uses mocks.
   
   Fix: `getattr(operator, "doc", None)` for the `doc*` attributes (or give the 
serialized class defaults), and add a listener test that goes through a real 
serialized mapped task.


-- 
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]

Reply via email to