shivaam commented on code in PR #69109:
URL: https://github.com/apache/airflow/pull/69109#discussion_r3502818094
##########
providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:
##########
@@ -1053,6 +1061,21 @@ def dag_version_info(cls, dagrun: DagRun, key: str) ->
str | int | None:
return current_version.version_number
raise ValueError(f"Unsupported key: {key}`")
+ @classmethod
+ def team_name(cls, dagrun: DagRun) -> str | None:
+ """Extract the team name for the DagRun."""
+ if not AIRFLOW_V_3_3_PLUS or not airflow_conf.getboolean("core",
"multi_team", fallback=False):
+ return None
+
+ bundle_name = cls.dag_version_info(dagrun, "bundle_name")
Review Comment:
Do you need it from the dag version info? The dagrun already has the team
name.
https://github.com/apache/airflow/blob/e3f59bab798433180120d88e2787336c51ea5218/task-sdk/src/airflow/sdk/api/datamodels/_generated.py#L782
--
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]