Repository navigation
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
| dag = self.get_dag() | ||
| if dag: | ||
| return dag.get_template_env() | ||
| return dag.get_template_env(force_string=True) |
There was a problem hiding this comment.
I don’t think this is correct though. This function is also used when the task is being executed (in render_template_fields), and in that situation we want to use NativeEnvironment if render_template_as_native_obj is True. so this get_template_env also need to have a force_string argument, and only get_email_subject_content should set it to True.
|
(Some context for this) I’m helping @andyfcx to work out a solution to #22152. The main problem with #22152 is that, when you set So the proposed solution here is to add an additional flag on But the implementation in the PR still needs some work. I’m also not entirely convinced this is the best solution, and any suggestions are welcomed. Also at least one test will be needed. |
|
We've merged #22770 instead. |
#22152
I added a flag force_string to make sure returning will be string,
Testing code still in progress.
Need more discussion.
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.