uranusjr commented on code in PR #45339:
URL: https://github.com/apache/airflow/pull/45339#discussion_r1914364736
##########
airflow/models/dag.py:
##########
@@ -770,6 +770,16 @@ 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))
+ @provide_session
+ def get_bundle_name(self, session=NEW_SESSION) -> str:
Review Comment:
It could if the DAG is not synced into the db. This one and
`get_latest_bundle_version` should have the same return type (either both `str`
or both `str | None`), and if it’s to return `str`, it should use
`scalars(...).one()` instead to raise an exception when there’s no matching
entry.
--
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]