Skip to content

Improve DAG authorization filtering performance - #71722

Merged
vincbeck merged 1 commit into
apache:mainfrom
abhijeets25012-tech:fix-71499-async-dag-authorization
Aug 18, 2026
Merged

vincbeck merged 1 commit into
apache:mainfrom
abhijeets25012-tech:fix-71499-async-dag-authorization

Conversation

@abhijeets25012-tech

Copy link
Copy Markdown
Contributor

Improve the performance of DAG authorization filtering by evaluating DAG authorization checks concurrently using a ThreadPoolExecutor.

Changes
Added ThreadPoolExecutor to BaseAuthManager.filter_authorized_dag_ids.
Execute individual is_authorized_dag checks concurrently instead of sequentially.
Return an empty set immediately when no DAG IDs are provided.
Preserve the existing authorization behavior and return only authorized DAG IDs.
Motivation

filter_authorized_dag_ids previously checked each DAG authorization sequentially, which could become a performance bottleneck when many DAGs need to be authorized. Running the checks concurrently reduces the time spent waiting on individual authorization calls.

Testing

Tests were not run locally.

@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Aug 17, 2026
@abhijeets25012-tech

Copy link
Copy Markdown
Contributor Author

Hi @vincbeck, the Providers wheel tests failed because of an HTTP 503 while downloading the CI image. It looks like an infrastructure issue and the actual tests didn't run. Could you please rerun the check? Thanks!

@vincbeck
vincbeck merged commit 2f4625a into apache:main Aug 18, 2026
149 of 150 checks passed
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants