-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: proxy calls through the runner #3586
base: main
Are you sure you want to change the base?
Conversation
4b48645
to
03ad2f0
Compare
03ad2f0
to
376dcfd
Compare
if err != nil { | ||
return fmt.Errorf("failed to send message: %w", err) | ||
} | ||
} else { |
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.
There should be a check here for if moduleContext.Err() != nil
, which can happen if the server closes the connection cleanly. Otherwise below will report a nil error as an error.
} | ||
|
||
func (r *runnerProxy) GetModuleContext(ctx context.Context, c *connect.Request[ftlv1.GetModuleContextRequest], c2 *connect.ServerStream[ftlv1.GetModuleContextResponse]) error { | ||
moduleContext, err := r.controllerModuleService.GetModuleContext(ctx, connect.NewRequest(c.Msg)) |
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.
I think these calls to connect.NewRequest()
are going to drop all headers, even ones we want to preserve?
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.
It's been a while but I think this is automatically handled by middleware + headers in the context...so maybe disregard!
@@ -397,7 +406,8 @@ func (s *Service) deploy(ctx context.Context, key model.DeploymentKey, module *s | |||
return fmt.Errorf("failed to download artefacts: %w", err) | |||
} | |||
|
|||
envVars := []string{"FTL_ENDPOINT=" + s.config.ControllerEndpoint.String(), | |||
logger.Infof("Setting FTL_ENDPOINT to %s", s.proxy.bindAddress.String()) |
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.
Should be debugf to avoid showing to user during local dev. We should really solve this differently, but for now that's the way it is.
No description provided.