SamWheating commented 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`
----------------------------------------------------------------
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:
[email protected]