ashb commented on a change in pull request #11016:
URL: https://github.com/apache/airflow/pull/11016#discussion_r496215711
##########
File path: UPDATING.md
##########
@@ -138,6 +138,20 @@ with third party services to the ``airflow.providers``
package.
All changes made are backward compatible, but if you use the old import paths
you will
see a deprecation warning. The old import paths can be abandoned in the future.
+#### Change to undefined variable handling in templates
+
+Prior to Airflow 2.0 Jinja Templates would permit the use of undefined
variables. They would render as an
+empty string, with no indication to the user an undefined variable was used.
With this release, any template
+rendering involving undefined variables will fail the task, as well as
displaying an error in the UI when
+rendering.
+
+The behavior can be reverted when instantiating a DAG.
+```python
+import jinja2
+
+dag = DAG('simple_dag', template_undefined=jinja2.Undefined)
Review comment:
Is it also possible on a template-by-template basis to do it as `{{
something | default "x" }}`?
----------------------------------------------------------------
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]