Skip to content

chore: use starlette built-in Route class #2267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2025

Conversation

leseb
Copy link
Collaborator

@leseb leseb commented May 26, 2025

What does this PR do?

Use a more common pattern and known terminology from the ecosystem, where Route is more approved than Endpoint.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 26, 2025
@leseb leseb force-pushed the mv-endpoint-baseroute branch from 4b994e5 to 5a6cb56 Compare May 26, 2025 13:42
route=e.route,
method=e.method,
route=e.path,
method=next(iter([m for m in e.methods if m != "HEAD"])),
Copy link
Contributor

Choose a reason for hiding this comment

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

this is confusing, why is this needeed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because fastapi adds "HEAD" in methods if the method is GET :/

@leseb leseb force-pushed the mv-endpoint-baseroute branch from 5a6cb56 to 78ea523 Compare May 26, 2025 18:33

from pydantic import BaseModel
from aiohttp import hdrs
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know what this gets us. GET / POST / DELETE is straightforward enough

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, most constants are straightforward 😅

@leseb leseb force-pushed the mv-endpoint-baseroute branch from 78ea523 to d584007 Compare May 27, 2025 09:55
@leseb
Copy link
Collaborator Author

leseb commented May 27, 2025

arrrrghh this _frozen_importlib._DeadlockError: deadlock detected by _ModuleLock('llama_stack.providers.remote.inference.together.config') at 140382212807632 again in pre-commit.

@leseb leseb requested a review from ashwinb May 27, 2025 12:20
@ashwinb
Copy link
Contributor

ashwinb commented May 27, 2025

arrrrghh this _frozen_importlib._DeadlockError: deadlock detected by _ModuleLock('llama_stack.providers.remote.inference.together.config') at 140382212807632 again in pre-commit.

yess, I hate it. I am pretty sure I am doing something wrong here. Do you have the full stack trace? Let's fix this goddammit.

@leseb
Copy link
Collaborator Author

leseb commented May 27, 2025

arrrrghh this _frozen_importlib._DeadlockError: deadlock detected by _ModuleLock('llama_stack.providers.remote.inference.together.config') at 140382212807632 again in pre-commit.

yess, I hate it. I am pretty sure I am doing something wrong here. Do you have the full stack trace? Let's fix this goddammit.

Opened this earlier #2278

@leseb leseb force-pushed the mv-endpoint-baseroute branch 2 times, most recently from 393348d to fddd58e Compare May 27, 2025 21:05
Use a more common pattern and known terminology from the ecosystem,
where Route is more approved than Endpoint.

Signed-off-by: Sébastien Han <[email protected]>
@leseb leseb force-pushed the mv-endpoint-baseroute branch from fddd58e to 9472c10 Compare May 27, 2025 21:07
@ashwinb ashwinb merged commit 63a9f08 into meta-llama:main May 28, 2025
26 checks passed
@leseb leseb deleted the mv-endpoint-baseroute branch June 2, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants