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

   @potiuk initially I was going to write a check that all pydantic models we 
define can round trip.  However, as yet some pydantic models do not have types 
defined (as in DAT.THE_MODEL).  I then pulled back and only enable the check 
for pydantic models that have a type, which stored in those private vars.
   
   I suspect some of these pydantic models will never be serialized by airflow 
directly, i.e. I assume if they ever are serialized then it probably is the 
case that they are serialized as attrs of another pydantic model.
   
   Questions
   
   1. Should I just go ahead and add a DAT type for every pydantic model 
anyway, so that we can enable automated testing of all discovered pydantic 
models?
   2. Should of that, it's probably better than current state that I would 
hardcode an exclusion list in the test so authors will have to make the 
determination re whether to add such....
   3. More general question: it seems odd that we have `use_pydantic_models` as 
a param in `BaseSerialization.decode`.  Shouldn't the encoded object itself 
tell us whether it is pydantic or not?  Or maybe I misunderstand the point of 
this parameter.  
   
   


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