FastAPI uninstrument
disallows adding more middlewares with fastapi@>=0.91
and starlette@>=0.24
#2042
Labels
bug
Something isn't working
Uninstrument is breaking subsequent calls to
add_middleware
due to recent changes instarlette
encode/starlette#2017 and latest version offastapi@>=0.91
.Call to
build_middleware_stack
makes an instance of FastAPI and starelette to think that application is already runningDescribe your environment
Python 3.9.9
Steps to reproduce
Describe exactly how to reproduce the error. Include a code sample if applicable.
What is the expected behavior?
What did you expect to see?
FastAPIInstrumentor.uninstrument_app
should not break ability to add more middlewaresWhat is the actual behavior?
What did you see instead?
Application crashes:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: