Taragolis commented on code in PR #29034:
URL: https://github.com/apache/airflow/pull/29034#discussion_r1083329397
##########
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 just wondering is it work with properties?
```python
class OperatorWithProperties(BaseOperator):
@property
def hook(self):
return "foo"
@cached_property
def cached_hook(self):
return "bar"
def execute(self, context):
pass
```
I think we should skip all properties
--
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]