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/01/08 18:45:39 UTC

[GitHub] [airflow] SamWheating removed a comment on issue #13522: Templated Variables being treated as String by KubernetesPodOperator in Airflow 2.0

SamWheating removed a comment on issue #13522:
URL: https://github.com/apache/airflow/issues/13522#issuecomment-756918974


   I have had the same issue while templating env vars. I tried defining it as both:
   
   `env_vars=["{{ k8s.V1EnvVar(name='DATESTAMP', value=ds) }}"]`
   in which case I got an importError as jinja couldn't find `k8s`
   
   as well as:
   `env_vars=[k8s.V1EnvVar(name='DATESTAMP', value='{{ ds }}')]`
   in which case the rendered value was `{{ ds }}` rather than `2021-01-08`
   
   Is there a suggested workaround for this at the moment? This will prevent us from upgrading to Airflow 2 as we rely on providing environment variables through `dag_run.conf`. 
   
   edit: found the workaround in #13348


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

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