Lee-W commented on code in PR #41325:
URL: https://github.com/apache/airflow/pull/41325#discussion_r1832472713


##########
airflow/utils/context.py:
##########
@@ -274,14 +279,27 @@ def __getitem__(self, key: int | str | Asset | 
AssetAlias) -> LazyAssetEventSele
             obj = self._inlets[key]
             if not isinstance(obj, (Asset, AssetAlias)):
                 raise IndexError(key)
+
+            if isinstance(obj, AssetRef):
+                obj = _fetch_active_assets_by_name([obj.name])

Review Comment:
   Yes, it might. I was thinking of whether we should fetch all the AssetRef 
when initializing. But that's kinda contradict the idea of lazy loading. Or 
maybe we could just load all the AssetRef when the first is loaded?



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