Skip to content
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

Reapply "Make client accept a function for websocket uri and hadnshakemetadata (#62) (#71) #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blast-hardcheese
Copy link
Contributor

Why

We want this, but there were issues before. Hopefully the types disambiguate enough to help us over the hump.

What changed

Reland the previous changeset

Test plan

Can we deploy without causing trouble?

@blast-hardcheese blast-hardcheese requested a review from a team as a code owner August 20, 2024 22:47
@blast-hardcheese blast-hardcheese requested review from masad-frost and removed request for a team August 20, 2024 22:47
@blast-hardcheese blast-hardcheese force-pushed the dstewart/reland-refreshable-metadata branch from de0d5b0 to a9316c6 Compare August 20, 2024 22:48
@blast-hardcheese blast-hardcheese force-pushed the dstewart/reland-refreshable-metadata branch from a9316c6 to 1f6efd6 Compare August 20, 2024 22:49
@blast-hardcheese
Copy link
Contributor Author

🤷 it's such a small changeset, I'm really surprised we had issues with it before

Copy link
Member

@masad-frost masad-frost left a comment

Choose a reason for hiding this comment

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

Thank you. Yeah I'm not sure what's going on. I couldn't get back to it, but https://github.com/replit/ai-infra/pull/1884 wasn't passing CI, and your approach should've been essentially a no-op.

If you wanna hold off merging this until I get some cycles to unblock it so we don't have a broken river-python.

@blast-hardcheese
Copy link
Contributor Author

Totally, just trying to keep things moving. Feel free to take this branch

blast-hardcheese added a commit that referenced this pull request Aug 26, 2024
Why
===

Follow-up to #72 to account for `schema.json` files without metadata.

What changed
============

If the `handshakeSchema` field is defined, then the parameter is
required. Otherwise, the parameter is `Literal[None]`, which matches the
previous behavior of the default.

Due to the metadata field now being required, I had to remove the `=
None` default parameter. I think this is alright.

It'll mean that #73 will likely need to change to
`handshake_metadata_factory: HandshakeType | Callable[[],
Awaitable[HandshakeType]]` to avoid `async def stub() -> None: return
None` just to satisfy the async requirement. It's somewhat challenging
to capture the exact semantics we want here, but I think that's alright.

Test plan
=========

Do typechecks pass?
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.

2 participants