uranusjr commented on code in PR #52234: URL: https://github.com/apache/airflow/pull/52234#discussion_r2188569133
########## task-sdk/src/airflow/sdk/bases/operator.py: ########## @@ -1607,6 +1615,22 @@ def resume_execution(self, next_method: str, next_kwargs: dict[str, Any] | None, execute_callable = getattr(self, next_method) return execute_callable(context, **next_kwargs) + def dry_run(self) -> None: + """Perform dry run for the operator - just render template fields.""" + self.log.info("Dry run") + for f in self.template_fields: + try: + content = getattr(self, f) + except AttributeError: + raise AttributeError( + f"{f!r} is configured as a template field " + f"but {self.task_type} does not have this attribute." + ) + + if content and isinstance(content, str): + self.log.info("Rendering template for %s", f) Review Comment: That’s just copied from ancient code. Renaming and maybe changing the presentation should be a separate conversation. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org