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


##########
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:
   I made that switch. If you still aren't happy with this, maybe I can defer 
and refactor more once parsing changes are merged. I'm using this to allow 
(along with some other changes) `dag.sync_to_db` to continue working, which 
fixes hundreds of tests in a single go.



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