uranusjr commented on issue #52574:
URL: https://github.com/apache/airflow/issues/52574#issuecomment-3130538981

   I took a quick look at the code. The cause is simple; the task runner does 
not commit the asset changes to the database before calling the callbacks and 
listeners (not a bad implementation; those functions may further modify the 
task instance so we want to wait until they are finished), but when you call 
`get_template_context` in the listener you get a brand new context object that 
does not contain changes made during task execution.
   
   If my understanding is correct, the easiest fix is probably to add a cache 
to `get_template_context` so all calls inside a task worker always return the 
same context object instead of building new ones.


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