ferruzzi commented on code in PR #69093:
URL: https://github.com/apache/airflow/pull/69093#discussion_r3501873410


##########
devel-common/src/tests_common/pytest_plugin.py:
##########
@@ -878,6 +878,23 @@ def __call__(
     def serialized_dag(self) -> SerializedDAG: ...
 
 
+def _delete_bundle_if_unreferenced(session, bundle_name):
+    """Delete a DagBundleModel row, but only once no DagModel still references 
it.
+
+    ``DagModel.bundle_name`` is a foreign key with no ``ON DELETE`` action, 
and the bundle is
+    shared across tests, so it can only be dropped after the last referencing 
Dag is gone.
+    """
+    from sqlalchemy import delete, func, select

Review Comment:
   My mistake then, sorry about that.   I saw the note about airflow imports, 
but I didn't realize it applied to all imports.   Sorry about that.



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