Skip to content

[Serve] Fastapi 0.109.0 is breaking the Serve proxy  #42711

@sihanwang41

Description

@sihanwang41

What happened + What you expected to happen

pip install fastapi==0.109.0.

run

import ray
import requests
from fastapi import FastAPI
from ray import serve

app = FastAPI()


@serve.deployment
@serve.ingress(app)
class MyFastAPIDeployment:
    @app.get("/")
    def root(self):
        return "Hello, world!"


serve.run(MyFastAPIDeployment.bind(), route_prefix="/hello")
resp = requests.get("http://localhost:8000/hello")
# Got 404 response
assert resp.json() == "Hello, world!"

Upstream issue: fastapi/fastapi#10948

Versions / Dependencies

master

Reproduction script

N/A

Issue Severity

Medium: It is a significant difficulty but I can work around it.

Metadata

Metadata

Assignees

Labels

P1Issue that should be fixed within a few weeksbugSomething that is supposed to be working; but isn'tserveRay Serve Related Issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions