-
Notifications
You must be signed in to change notification settings - Fork 6
Add support for calling input plane functions #15
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
Conversation
@@ -13,6 +13,8 @@ import { | |||
import { ClientType, ModalClientDefinition } from "../proto/modal_proto/api"; | |||
import { profile, Profile } from "./config"; | |||
|
|||
let modalAuthToken: string | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the way we propagate auth tokens is a little different in Go vs. Typescript.
In Typescript (and Python), we propagate auth tokens via auth middleware / a grpc interceptor in client.ts
.
In Go, we propagate auth tokens via context in function.go
.
I'm open to changing Go's implementation to also propagate auth tokens via grpc interceptors in client.go
for consistency if we think that's better, but it might be a bit trickier since Go is multithreaded? Regardless, we can always change our minds later.
52b14c5
to
bb7b679
Compare
bb7b679
to
9400660
Compare
@ekzhang I rebased this PR on main, and updated it to be compatible with the changes made since it was first opened. In the code in main, To handle these two cases, I created a class called Hope that makes sense! Happy to chat IRL if that's easier! |
fcc1f50
to
00654ec
Compare
00654ec
to
ab40c71
Compare
After starting to implement client retries, I realized some more refactoring was needed. I opened this PR #30, which is based on top of this one. In that one, I removed the |
This PR adds
libmodal
support for calling input plane functions. This requires a few changes:ModalClientStub
s pointing to different server URLs.x-modal-auth-token
fromFunctionGet
to the input plane RPCs.We will need to add support for retrying internal failures next.
Note that this PR cannot be merged until we enable input plane functions in production; otherwise, the tests will fail.