-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AIRFLOW-4131] Make template undefined behavior configurable. #4951
Conversation
3aff640
to
e8f3762
Compare
e8f3762
to
65af90c
Compare
Codecov Report
@@ Coverage Diff @@
## master #4951 +/- ##
==========================================
- Coverage 75.6% 75.59% -0.01%
==========================================
Files 454 454
Lines 29227 29228 +1
==========================================
Hits 22096 22096
- Misses 7131 7132 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good @jmcarp I like to set this to strict to fail fast :-)
@@ -3515,6 +3519,7 @@ def get_template_env(self): | |||
|
|||
env = jinja2.Environment( | |||
loader=jinja2.FileSystemLoader(searchpath), | |||
undefined=self.template_undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is Undefined: https://github.com/pallets/jinja/blob/master/jinja2/environment.py#L279
This is still the case if it isn't passed explicitly: https://github.com/apache/airflow/pull/4951/files/65af90c017022c2fb31b24d336e0de45934120cd#diff-664e0133fa172b6e0060f2dd7b2c3504R2990
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, you are right... my bad :)
Thanks @Fokko
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, any time @kaxil 👍
Make sure you have checked all steps below.
Jira
Description
Tests
Commits
Documentation
Code Quality
flake8