Saadmadni84 commented on PR #60105: URL: https://github.com/apache/airflow/pull/60105#issuecomment-3764268815
> Can you please do a little bit of manual testing? I am not your AI prompt writer. > > 1. We also need to update our openapi and react-query codegens. This will error if you tried to run it > 2. Let's add backend tests > 3. I'm wary of adding two new selects to this backend query Thanks for the feedback @bbovenzi — I’ve addressed all the points raised: 1. OpenAPI and react-query codegen updated I regenerated the OpenAPI spec and reran the react-query/TypeScript codegen. The task_instance_summary field is now included in the generated client types. No additional schema inconsistencies were observed after regeneration. 2. Backend tests added Added comprehensive backend coverage in test_dags.py, including: Aggregated task instance counts by state Ensuring only the latest DAG run is included in the summary Handling the empty case when no task instances exist All tests pass locally. 3. Query design clarification Regarding the concern about additional selects: the implementation uses a single subquery with a window function (RANK()) to identify the latest DAG run per DAG, followed by aggregation of task instance counts. This avoids N+1 queries and limits the scope to indexed columns (dag_id, run_id, state). While working on this, I also fixed an issue where the join incorrectly referenced a non-existent dag_run_id column; it now correctly joins on the composite key (dag_id, run_id). Manual testing was performed to verify correct rendering of task instance summaries on DAG cards in the UI. Happy to make further adjustments if needed — thanks for the review. -- 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]
