Taragolis commented on code in PR #29034:
URL: https://github.com/apache/airflow/pull/29034#discussion_r1083328214


##########
airflow/models/baseoperator.py:
##########
@@ -1184,7 +1197,29 @@ def render_template_fields(
         """
         if not jinja_env:
             jinja_env = self.get_template_env()
-        self._do_render_template_fields(self, self.template_fields, context, 
jinja_env, set())
+
+        if self.template_all_fields:
+            templatable_fields = (
+                set(self.__dict__.keys())
+                - set(BaseOperator.__dict__.keys())
+                - set(partial(operator_class=self.__class__, 
task_id=self.task_id).kwargs.keys())
+            )

Review Comment:
   And idea for another PR: Deprecated all explicit `templated_fields` which 
started with `_`.
   
   🙄 
   
https://github.com/apache/airflow/blob/98221da0d96b102b009d422870faf7c5d3d931f4/airflow/providers/apache/spark/operators/spark_submit.py#L75-L90



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to