Skip to content

fix(fastapi)!: tear down after user lifespan shutdown - #412

Merged
lesnik512 merged 1 commit into
mainfrom
fix/384-fastapi-lifespan
Nov 3, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/384-fastapi-lifespan

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #384.

Replace FastAPI's private lifespan merger with a local context manager. The regression verifies that a user shutdown span is exported and that user lifespan state still reaches request handlers.

Litestar already runs user shutdown first. The FastMCP ordering bug is tracked in #411.

All 615 tests passed with 100% coverage. Lint and type checking passed.

Breaking changes

Lite-bootstrap tears down FastAPI observability after the user's lifespan shutdown code runs.

Closes #384

BREAKING CHANGE: lite-bootstrap tears down FastAPI observability after the user lifespan shutdown runs.
@lesnik512
lesnik512 merged commit 2794957 into main Nov 3, 2026
35 checks passed
@lesnik512
lesnik512 deleted the fix/384-fastapi-lifespan branch November 3, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run FastAPI teardown after the user's lifespan shutdown code

1 participant