kacpermuda opened a new pull request, #75685:
URL: https://github.com/apache/airflow/pull/75685

   Listeners are notified with the runtime task instance after the task runner 
has reported its terminal state, so they can read `end_date` from it, the same 
value that is stored for the task instance. That works for success, failure and 
retry, where the task runner sets `ti.end_date`. But a task that raised 
`AirflowSkipException`, or a `TriggerDagRunOperator` task skipped or failed 
because the Dag run it triggers already exists, only put the end date in the 
message to the supervisor and left `ti.end_date` unset. A listener then has no 
way to get the end date of that task instance.
   
   A listener can't take the time itself either: `finalize()` notifies 
listeners only after the state change callbacks, extra links and rendered 
fields are handled, and those failed/skipped states reach the API server only 
after the task process exits. The OpenLineage provider, for example, times its 
terminal events with `ti.end_date` and must fall back to its own, later `now()` 
for these cases.
   
   related: #75328
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5.5)
   
   Generated-by: Claude Code (Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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