Restore FastAPI 0.137 support in the Task Execution API#68826
Conversation
|
@potiuk heads-up: removing the cap is more involved than just the dependency bump. FastAPI 0.137's lazy router inclusion changes the router layer behavior: I fixed the execution API part in this PR by assembling the trace-context dependency at router-build time, but the bump also exposes core API route-introspection failures, for example: So this is effectively a broader FastAPI 0.137 migration that also touches security-relevant route checks. I can push it through in this PR with a small route-materialization helper, or split it into a dedicated migration PR. Do you have a preference? And is the 0.137 migration already tracked anywhere? |
Follow-up to PR #68578.
issue #68562
Cadwyn 7.1.0 now declares
fastapi>=0.137.1, so the temporaryfastapi<0.137.0cap is no longer needed.This PR:
cadwyn>=7.1.0.fastapi>=0.137.1.uv.lock.Bumping to FastAPI 0.137 surfaced a second incompatibility: router dependencies are frozen into each route at
include_router()time. The execution API's OpenTelemetry trace-context dependency was previously injected after routers were assembled, so it was silently dropped. The router tree is now assembled through a build-time factory so the dependency is supplied up front, preserving theunsafe-always/only-authenticated/neverordering.Tests:
480 passed, 4 DB-backend skipsRelated: #68578