Skip to content

Cap fastapi <0.137 and fix execution API health empty-path route#68578

Merged
shahar1 merged 2 commits into
apache:mainfrom
Revanth14:fix-execution-health-empty-path
Jun 16, 2026
Merged

Cap fastapi <0.137 and fix execution API health empty-path route#68578
shahar1 merged 2 commits into
apache:mainfrom
Revanth14:fix-execution-health-empty-path

Conversation

@Revanth14

Copy link
Copy Markdown
Contributor

Closes: #68562

FastAPI 0.137.0's lazy router inclusion breaks api-server and dag-processor startup in two ways: the execution API health route used @router.get("") under prefix="/health", which now raises Prefix and path cannot be both empty, and
Cadwyn's versioned router generation is not yet compatible with FastAPI 0.137.0.

  • Cap fastapi<0.137.0, with uv.lock synced, to restore startup while waiting for Cadwyn compatibility.
  • Change the execution API health routes to explicit paths (/health, /health/ping) so they remain valid once the cap is lifted. External paths are unchanged.
  • Add a regression test to prevent reintroducing an empty health route path.

Was generative AI tooling used to co-author this PR?
  • Yes (Opus 4.8)

@shahar1 shahar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

@Revanth14

Copy link
Copy Markdown
Contributor Author

Thanks for the review and approval @shahar1

@shahar1 shahar1 merged commit c9861d6 into apache:main Jun 16, 2026
175 of 176 checks passed
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.3.0 milestone Jun 16, 2026
RulerChen pushed a commit to RulerChen/airflow that referenced this pull request Jun 16, 2026
@potiuk

potiuk commented Jun 22, 2026

Copy link
Copy Markdown
Member

I believe Cadwyn 7.1.0 has now support for 0.137.1+ -> I think we should bring it back @Revanth14 ?

@Revanth14

Copy link
Copy Markdown
Contributor Author

I believe Cadwyn 7.1.0 has now support for 0.137.1+ -> I think we should bring it back @Revanth14 ?

Thanks for the heads-up @potiuk. I checked Cadwyn 7.1.0 and it now declares fastapi>=0.137.1, so I agree we can remove the temporary fastapi<0.137.0 cap.

I’ll open a follow-up PR to bump Cadwyn to >=7.1.0, relax FastAPI to >=0.137.1, refresh uv.lock, and run the relevant API/versioned-router regression tests.

@Revanth14

Copy link
Copy Markdown
Contributor Author

I believe Cadwyn 7.1.0 has now support for 0.137.1+ -> I think we should bring it back @Revanth14 ?

Opened the follow-up PR #68826

@potiuk @shahar1 : bumped Cadwyn to >=7.1.0 and FastAPI to >=0.137.1. Heads-up that the bump surfaced a second 0.137 incompatibility beyond the empty-path fix: lazy router inclusion freezes a router's dependencies at include_router() time, so the execution API's OTel trace-context dependency (injected after assembly) was being dropped. Reworked the router assembly into a build-time factory to fix it, preserving the unsafe-always / only-authenticated / never ordering. Full execution-API suite (480 tests) green, would appreciate a look when you have a moment.
Thank you.

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.

Execution API health route (empty path) breaks api-server, dag-processor startup under FastAPI 0.137.0

4 participants