You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shaealh (via GitHub)" <gi...@apache.org> on 2026/07/13 10:09:13 UTC

[PR] Migrate to FastAPI lazy router inclusion [airflow]

shaealh opened a new pull request, #69811:
URL: https://github.com/apache/airflow/pull/69811

   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
   
   - [x] Yes, generative AI tooling was used. -- OpenAI Codex


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate to FastAPI lazy router inclusion [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #69811:
URL: https://github.com/apache/airflow/pull/69811#issuecomment-5049174278

   <!-- uv-lock-rebase-notice -->
   `uv.lock` on `main` just moved via [#69526](https://github.com/apache/airflow/pull/69526) ("Make psycopg (v3) the default synchronous Postgres driver"), commit [`7c272f1`](https://github.com/apache/airflow/commit/7c272f1ea97c9052d0ab96a696064d62dea584c1) and this PR currently conflicts.
   
   Quickest fix:
   ```bash
   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._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate to FastAPI lazy router inclusion [airflow]

Posted by "potiuk (via GitHub) via commits" <co...@airflow.apache.org>.
potiuk commented on PR #69811:
URL: https://github.com/apache/airflow/pull/69811#issuecomment-6563150165

   Thanks for this, @shaealh. Most of it has since landed on `main` via #75689 ("Allow FastAPI 0.137+ by requiring cadwyn 8.1"), which raised the floors to `cadwyn>=8.1.0` / `fastapi>=0.142.0` and switched the auth and token-scope route inspection to `iter_route_contexts()`.
   
   What this PR still adds on top looks like the build-time assembly of a fresh Execution API router (instead of mutating the shared one), keeping custom token-scope metadata from the original routes, and the regression test showing that an unprotected route is detected. If you'd like to carry those, could you rebase onto `main` and narrow the PR to just them? If you think they're no longer needed after #75689, feel free to close it.
   
   ---
   Drafted-by: Claude Code (Claude Opus 5); reviewed by @potiuk before posting
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate to FastAPI lazy router inclusion [airflow]

Posted by "ashb (via GitHub)" <gi...@apache.org>.
ashb commented on PR #69811:
URL: https://github.com/apache/airflow/pull/69811#issuecomment-5314116784

   @amoghrajesh Could you take a look at this one please?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org