dstandish commented on PR #37854:
URL: https://github.com/apache/airflow/pull/37854#issuecomment-2002600741

   ok @uranusjr @potiuk @eladkal ...
   
   In response to the question "why do we need to add defaults to pydantic"....
   
   I have have added a default of None to attr `task` on TI
   
   this isn't really a straightforward change because (1) mypy doesn't like it 
and, more importantly, (2) there is logic in airflow that looks at `hasattr(ti, 
"task")` to infer that both `hasattr(ti, "task")` and `ti.task is not None`.  
So all of this needs to be updated if we are going to avoid adding a default on 
the pydantic model.  I have done so in this PR.
   
   can you take a look and let me know what you think is the better approach?  
i.e. should we proceed with the changes i've just made, or go back and stick 
with just adding a default on the pydantic model.


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