bdsoha opened a new pull request, #66553:
URL: https://github.com/apache/airflow/pull/66553

   `DockerOperator` won't construct if you pass a plain dict in `mounts`:
   
   > AttributeError: 'dict' object has no attribute 'template_fields' and no 
dict for setting new attributes                                                 
                                       
   
   It's the loop added in #52451, it does `mount.template_fields = (...)` on 
every entry, and that doesn't work on a plain dict. `docker.types.Mount` is a 
dict subclass that has `__dict__`, so it slips through.                         
                      
   
   Fix is to coerce each entry to `Mount` first: `Mount` instances pass 
through, dicts go through `Mount(**entry)`. Type hint and docstring updated, 
plus two new tests.
   
   Closes: #66345


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