jedcunningham commented on code in PR #45339:
URL: https://github.com/apache/airflow/pull/45339#discussion_r1900944629


##########
airflow/models/dag.py:
##########
@@ -770,6 +770,18 @@ def get_is_paused(self, session=NEW_SESSION) -> None:
         """Return a boolean indicating whether this DAG is paused."""
         return session.scalar(select(DagModel.is_paused).where(DagModel.dag_id 
== self.dag_id))
 
+    @property
+    @provide_session
+    def bundle_name(self, session=NEW_SESSION) -> str:
+        """Return the name of the bundle this DAG is in."""
+        return 
session.scalar(select(DagModel.bundle_name).where(DagModel.dag_id == 
self.dag_id))

Review Comment:
   The challenge is the bundle and version are only in the db. Would you be 
happier with a method so you could pass a session?



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