You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ds...@apache.org on 2024/03/28 01:27:04 UTC

(airflow) branch main updated: Implement render_templates on TaskInstancePydantic (#38559)

This is an automated email from the ASF dual-hosted git repository.

dstandish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new f74d0e0f26 Implement render_templates on TaskInstancePydantic (#38559)
f74d0e0f26 is described below

commit f74d0e0f2622d6b636de2363f7e44d1c12e1ec0b
Author: Daniel Standish <15...@users.noreply.github.com>
AuthorDate: Wed Mar 27 18:26:57 2024 -0700

    Implement render_templates on TaskInstancePydantic (#38559)
    
    Part of AIP-44
---
 airflow/serialization/pydantic/taskinstance.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/airflow/serialization/pydantic/taskinstance.py b/airflow/serialization/pydantic/taskinstance.py
index 7213164ebe..16c4486099 100644
--- a/airflow/serialization/pydantic/taskinstance.py
+++ b/airflow/serialization/pydantic/taskinstance.py
@@ -129,6 +129,9 @@ class TaskInstancePydantic(BaseModelPydantic, LoggingMixin):
     def _run_execute_callback(self, context, task):
         TaskInstance._run_execute_callback(self=self, context=context, task=task)  # type: ignore[arg-type]
 
+    def render_templates(self, context: Context | None = None, jinja_env=None):
+        return TaskInstance.render_templates(self=self, context=context, jinja_env=jinja_env)  # type: ignore[arg-type]
+
     def init_run_context(self, raw: bool = False) -> None:
         """Set the log context."""
         self.raw = raw