potiuk commented on PR #29776:
URL: https://github.com/apache/airflow/pull/29776#issuecomment-1447131918

   > Quick question. If we take this approach, why do we need then to send the 
whole serialized object and not the primary keys only? Is it to avoid to 
refactore too many functions and have a backward compatible solution? I am not 
saying it is wrong, I am just curious :)
   
   Because much of our code that runs on the "client" side accesses those 
object's fields and even related instances fields. For  example when local task 
job is run, it acesses a number of local task job fields. Good example is our 
"context" that each of the tasks "execute" method gets. 
https://github.com/apache/airflow/blob/main/airflow/utils/context.pyi -> if you 
look there, task_instance field is actually a TaskInstance object. And you 
would like all TaskInstance fields to be available in the execute's method of 
the operator.


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