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

   GET /ui/dags with has_pending_actions=true loaded each pending action’s task 
instance note and Dag version (and its bundle) with a separate query, so the 
number of queries grew with the number of pending actions.
   
   I added joinedloads for task_instance_note and dag_version (with bundle) to 
the pending actions query, matching what the public HITL details endpoint 
already loads.
   
   Added test_pending_actions_load_relationships_in_one_query, which asserts at 
most one task_instance_note query and one dag_version query. Before the fix, 
the test’s 3 pending actions made 3 of each.
   
   related: #57418 (an earlier N+1 fix in this endpoint)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


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