amoghrajesh commented on code in PR #66160:
URL: https://github.com/apache/airflow/pull/66160#discussion_r3194363858


##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -249,7 +251,12 @@ def get_template_context(self) -> Context:
                     "value": VariableAccessor(deserialize_json=False),
                 },
                 "conn": ConnectionAccessor(),
+                "task_state": TaskStateAccessor(ti_id=self.id),
             }
+            if any(isinstance(i, (Asset, AssetNameRef, AssetUriRef)) for i in 
self.task.inlets):
+                self._cached_template_context["asset_state"] = 
AssetStateAccessors(self.task.inlets)
+                # AssetAlias inlets are skipped inside AssetStateAccessors — 
an alias maps to

Review Comment:
   Added / Updated a comment in task_runner explaining the behaviour Proper 
documentation with examples will come in the docs PR (made a ntoe internally)



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