Skip to content

Migrate to FastAPI lazy router inclusion#69811

Open
shaealh wants to merge 6 commits into
apache:mainfrom
shaealh:shaealh/airflow-69616-fastapi
Open

Migrate to FastAPI lazy router inclusion#69811
shaealh wants to merge 6 commits into
apache:mainfrom
shaealh:shaealh/airflow-69616-fastapi

Conversation

@shaealh

@shaealh shaealh commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Addresses item 2 of #69616.

Summary

  • Raise the Cadwyn minimum to 7.1.0 and FastAPI minimum to 0.137.2.
  • Replace mutation of a shared Execution API router with fresh, build-time router assembly.
  • Use FastAPI's iter_route_contexts() for authentication and token-scope route inspection.
  • Preserve custom token-scope metadata from the original routes.
  • Add a negative regression test proving that an accidentally unprotected route is detected.
  • Refresh uv.lock to Cadwyn 7.1.0 and FastAPI 0.139.0.

Testing

  • Full Task Execution API suite: 524 passed.
  • Focused FastAPI migration suite: 36 passed.
  • Airflow core mypy: passed, 1,202 files checked.
  • Ruff formatting and lint: passed.
  • API server startup: verified.
  • Dag processor startup: verified.
  • git diff --check: passed.

Gen-AI disclosure

  • Yes, generative AI tooling was used. -- OpenAI Codex

@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:task-sdk labels Jul 13, 2026
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jul 15, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

uv.lock on main just moved via #70363 ("[main] Upgrade important CI environment"), commit c3e2439 and this PR currently conflicts.

Quickest fix:

git fetch upstream main && git rebase upstream/main
rm uv.lock && uv lock
git add uv.lock && git rebase --continue
git push --force-with-lease

Automated nudge — ignore if you're not ready to rebase. This comment is updated in place on future uv.lock bumps.

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 area:task-sdk ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants