Add support for calling input plane functions#15
Add support for calling input plane functions#15thecodingwizard wants to merge 7 commits intomainfrom
Conversation
| import { ClientType, ModalClientDefinition } from "../proto/modal_proto/api"; | ||
| import { profile, Profile } from "./config"; | ||
|
|
||
| let modalAuthToken: string | undefined; |
There was a problem hiding this comment.
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
libmodalsupport for calling input plane functions. This requires a few changes:ModalClientStubs pointing to different server URLs.x-modal-auth-tokenfromFunctionGetto 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.