You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/28 12:33:03 UTC

[GitHub] [airflow] kaxil edited a comment on issue #17186: Smarter template_ext processing

kaxil edited a comment on issue #17186:
URL: https://github.com/apache/airflow/issues/17186#issuecomment-888264662


   I think you are confusing 2 things:
   
   1) **Recursive classes**
   
   https://github.com/apache/airflow/blob/4dc622d8ca4b14a2bb3b8c5e68bde04cc80c5379/tests/models/test_baseoperator.py#L141-L180
   
   2) **Iterable** (list, dict, tuple, etc)
   
   https://github.com/apache/airflow/blob/4dc622d8ca4b14a2bb3b8c5e68bde04cc80c5379/tests/models/test_baseoperator.py#L121-L123
   
   
   Logic - Flow of code:
   
   https://github.com/apache/airflow/blob/4dc622d8ca4b14a2bb3b8c5e68bde04cc80c5379/airflow/models/baseoperator.py#L1047-L1078
   
   For nested it should do:
   
   https://github.com/apache/airflow/blob/4dc622d8ca4b14a2bb3b8c5e68bde04cc80c5379/airflow/models/baseoperator.py#L1080-L1091
   
   Since env_vars is a list, the items inside that list will be rendered if it is a string but since it is `k8s.V1EnvVar` class that does not have `template_field` attribute it should not.
   
   The only reason it is doing that is we override that method for KPO:
   
   https://github.com/apache/airflow/blob/4dc622d8ca4b14a2bb3b8c5e68bde04cc80c5379/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py#L284-L302
   
   So the issue / bug is because of a fix in https://github.com/apache/airflow/pull/14123 - and it does not affect any other operators.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org