shivaam commented on code in PR #69109:
URL: https://github.com/apache/airflow/pull/69109#discussion_r3499462259


##########
providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:
##########
@@ -980,9 +985,12 @@ class DagRunInfo(InfoJsonEncodable):
         "dag_bundle_version": lambda dagrun: 
DagRunInfo.dag_version_info(dagrun, "bundle_version"),
         "dag_version_id": lambda dagrun: DagRunInfo.dag_version_info(dagrun, 
"version_id"),
         "dag_version_number": lambda dagrun: 
DagRunInfo.dag_version_info(dagrun, "version_number"),
+        "dag_team_name": lambda dagrun: DagRunInfo.team_name(dagrun) if 
AIRFLOW_V_3_3_PLUS else None,
         "deadlines": lambda dagrun: DagRunInfo.deadlines(dagrun),
     }
 
+    _team_name_cache: ClassVar[dict[str, str | None]] = {}

Review Comment:
   Is it fine that there is no TTL on this cached value? If a dag changes the 
bundle it wont be reflected as this cache never expires. The Core already 
caches this lookup here: DagModel.get_team_name(dag_id) uses a TTLCache.
   
   This PR calls the uncached DagBundleModel.get_team_name(bundle_name) 
instead, so it had to add its own cache. I am not sure if they are 
interchangeable but something to think about. 



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