seanmuth commented on PR #72395: URL: https://github.com/apache/airflow/pull/72395#issuecomment-5504295972
@SameerMesiah97 addressed both — thanks for the review. **Regression test added** (`TestFindOrmDagsLoaderStrategy` in `test_collection.py`): two tests that check the actual mechanism, not just a statement count that could be blindly "corrected" back: - `test_find_orm_dags_uses_selectinload` — inspects the compiled statement's ORM loader options directly, fails if any of the five relationships isn't `selectin`. - `test_find_orm_dags_does_not_multiply_rows` — a DAG with 3 tags × 2 owner links × 2 asset refs, checked at the raw DBAPI cursor level (bypassing `.unique()`, which would otherwise hide the exact multiplication this needs to catch) — asserts exactly 1 raw row for 1 dag_id. Verified both actually catch the regression: temporarily reverted to the old multi-`joinedload()` code and confirmed both tests fail correctly (`'joined'` instead of `'selectin'`, and 12 raw rows — 3×2×2 — instead of 1), then restored the fix and confirmed green. **Comments tightened** on `collection.py` and `test_manager.py` per your suggested wording. All green on Postgres: `test_collection.py` (66 passed), `test_manager.py` (165 passed), `test_dag.py` (209 passed). -- 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]
