anshuman0123 opened a new pull request, #68376:
URL: https://github.com/apache/airflow/pull/68376

   ## Summary
   
   - Track DAG bundle rows created by the `dag_maker` test fixture and remove 
them during fixture cleanup.
   - Add teardown for the `testing_dag_bundle` fixture when it creates the 
shared `testing` bundle row.
   - Add teardown for the `testing_team` fixture when it creates the shared 
`testing` team row.
   
   ## Details
   
   `dag_maker.cleanup()` already removes DAG-related rows such as `DagModel`, 
`DagRun`, `TaskInstance`, `DagVersion`, `XCom`, `TaskMap`, and `AssetEvent`, 
but it did not remove `DagBundleModel` rows that `dag_maker` created. This 
could leave bundle rows behind and force later tests to defensively call 
`clear_db_dag_bundles()`.
   
   This change records bundle names created by `dag_maker` and deletes those 
bundles after DAG model/version cleanup, preserving FK-safe cleanup order. It 
also converts `testing_dag_bundle` and `testing_team` into fixtures with 
teardown paths so rows created for a test do not leak into later tests.
   
   ## Testing
   
   - `python -m py_compile devel-common\src\tests_common\pytest_plugin.py`
   - `git diff --check`
   
   Targeted pytest was not run locally because `uv` and `pytest` are not 
installed in this environment.
   
   Fixes: #68374
   


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