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

     This change eliminates the N+1 query problem in the grid view by 
introducing
     a batch API endpoint that fetches task instance summaries for multiple DAG
     runs in a single request.
   
     **Backend Changes:**
     - Add POST /grid/ti_summaries_batch/{dag_id} endpoint that accepts 
multiple run_ids
     - Implement get_batch_ti_summaries() service function with optimized 
single-query approach
     - Add GridTISummariesBatch data model for batch response
     - Add validation to limit batch requests to max 100 runs
   
     **Frontend Changes:**
     - Create useGridTISummariesBatch hook that fetches all TI summaries at once
     - Update Grid component to use batch hook instead of individual fetches
     - Update Bar component to receive summaries as props rather than fetching 
independently
   
     **Testing:**
     - Add comprehensive unit tests for batch endpoint
     - Test validation of empty run_ids and max limit enforcement
     - Verify correct data structure and state aggregation for multiple runs
   
   


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