Skip to content

Conversation

@pierrejeambrun
Copy link
Member

Add number of db queries guard in list endpoint, preventing further N+1 queries problem

No N+1 queries problem detected.

@pierrejeambrun pierrejeambrun added this to the Airflow 3.1.2 milestone Oct 29, 2025
@pierrejeambrun pierrejeambrun self-assigned this Oct 29, 2025
@pierrejeambrun pierrejeambrun added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Oct 29, 2025
@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Oct 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds database query count assertions to the test_get_dags parameterized test to ensure performance regression prevention by verifying that the endpoint consistently executes exactly 4 database queries.

  • Added assert_queries_count import from test utilities
  • Wrapped the API call in test_get_dags with a query count assertion expecting 4 queries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pierrejeambrun pierrejeambrun force-pushed the add-query-guard-for-public-dags branch from c23d5b7 to 70f277c Compare October 30, 2025 08:46
@pierrejeambrun pierrejeambrun merged commit dc73d38 into apache:main Oct 30, 2025
114 checks passed
@pierrejeambrun pierrejeambrun deleted the add-query-guard-for-public-dags branch October 30, 2025 13:42
@github-actions
Copy link

Backport failed to create: v3-1-test. View the failure log Run details

Status Branch Result
v3-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker dc73d38 v3-1-test

This should apply the commit to the v3-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

pierrejeambrun added a commit to astronomer/airflow that referenced this pull request Oct 30, 2025
@pierrejeambrun
Copy link
Member Author

Manual backport #57556

pierrejeambrun added a commit to astronomer/airflow that referenced this pull request Oct 31, 2025
pierrejeambrun added a commit to astronomer/airflow that referenced this pull request Oct 31, 2025
pierrejeambrun added a commit that referenced this pull request Oct 31, 2025
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Nov 10, 2025
Copilot AI pushed a commit to jason810496/airflow that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants