Skip to content
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

Fix adding auth manager to fastapi state regardless of fastapi app presence #47883

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

jedcunningham
Copy link
Member

We were accidentally only adding the auth manager to the fastapi state if the auth manager also defines a fastapi app. We shouldn't expect all auth managers to do so.

…esence

We were accidentally only adding the auth manager to the fastapi state
if the auth manager also defines a fastapi app. We shouldn't expect all
auth managers to do so.
@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Mar 17, 2025
@jedcunningham jedcunningham requested a review from dstandish March 17, 2025 20:43
@vincbeck
Copy link
Contributor

LGTM. One note. We are not using this app.state.auth_manager that often, I do not know if we really need this, auth managers instantiation are not very heavy so instead of using app.state.auth_manager to get the auth manager, get_auth_manager would work as well

@jedcunningham
Copy link
Member Author

Yes, I agree! I tried to refactor the handful of uses but ran into some weird test mock problems so figured today I'd fix the bug and leave the cleaning for another day.

@vincbeck
Copy link
Contributor

Yes, I agree! I tried to refactor the handful of uses but ran into some weird test mock problems so figured today I'd fix the bug and leave the cleaning for another day.

Makes sense

@kaxil kaxil merged commit 144f20f into apache:main Mar 17, 2025
90 checks passed
@kaxil kaxil deleted the fix_auth_manager_on_fastapi branch March 17, 2025 21:46
tyrellcurry pushed a commit to tyrellcurry/airflow that referenced this pull request Mar 21, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants