SameerMesiah97 commented on code in PR #69109:
URL: https://github.com/apache/airflow/pull/69109#discussion_r3508499714
##########
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:
@Shivam
Thanks for spotting that. I had a look through the ORM `DagRun` model in
airflow-core/src/airflow/models/dagrun.py, but I couldn't find a `team_name`
field. Unless I'm missing something, that means the value isn't persisted on
the scheduler-side `DagRun` that the OpenLineage listener receives.
It would definitely want to avoid an extra DB lookup, but I'm not sure how
we'd get the team name here without it. Am I overlooking something here?
--
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]