-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add number of queries guard in public dag runs list endpoints #57450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add number of queries guard in public dag runs list endpoints #57450
Conversation
2150a65 to
4fcbfa5
Compare
|
Thanks @pierrejeambrun , any timings improvement with the changes? |
The number of queries went from 15 to 7, making sure that it won't grow with the number of records in the db, so I would say that this should solves the problem. I don't have a big database to benchmark against, but if you have one it would be cool if you could test this change in your setup and confirm that this solves the problem. |
|
Thanks @pierrejeambrun , I will try to apply it in our environment by patching it or will test the timings once Airflow 3.1.2 is released. |
4dc2138 to
d07b2fd
Compare
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py
Outdated
Show resolved
Hide resolved
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dag_run.py
Outdated
Show resolved
Hide resolved
014c191 to
549b1c9
Compare
1988172 to
91bcc9a
Compare
Backport failed to create: v3-1-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker fb9dea5 v3-1-testThis should apply the commit to the v3-1-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continue |
|
Manual backport #57736 |
…#57450) * WIP to revert * Fix batch endpoint * Fix CI * Address review comments * Fix CI * Address PR comments


Fixes: #57432.
Multiple endpoints fixed and N+1 problem solved.