mobuchowski commented on code in PR #38155:
URL: https://github.com/apache/airflow/pull/38155#discussion_r1557415431


##########
airflow/models/taskinstance.py:
##########
@@ -1409,7 +1410,9 @@ class TaskInstance(Base, LoggingMixin):
         cascade="all, delete, delete-orphan",
     )
     note = association_proxy("task_instance_note", "content", 
creator=_creator_note)
+
     task: Operator | None = None
+    _thread_local_data = threading.local()

Review Comment:
   I don't have any problem with having more isolated api like 
`get_last_error_message()` than storing it in TI model. As context where we 
could access the error message is pretty isolated - only worker process after 
task failure, the method would just return `None` otherwise.
   
   I would decide whether, in general, we want to possibly add arguments to 
non-experimental listener APIs, as adding it in this way would be definitely 
more ergonomic for everyone.



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