Skip to content

Migrate to FastAPI lazy router inclusion#69811

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

Migrate to FastAPI lazy router inclusion#69811
shaealh wants to merge 4 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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant