-
Notifications
You must be signed in to change notification settings - Fork 97
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
Router UpdateServer function doesn't work as advertised #784
Comments
WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. |
PR: #787 |
Hey, this is an interesting addition to Cosmo Router. We've also seen the PR. We might want to have some modifications but this needs further review. We will address this in due course. |
This functionality is now available. |
Component(s)
router
Component version
[email protected]
wgc version
0.53.2
controlplane version
N/A
router version
0.85.2
What happened?
Description
Core router.go provides an exported UpdateServer function whose description says it creates and starts a new server and replaces the old one. This is inaccurate, the new server is not started.
There is a non-exported function (updateServerAndStart) which uses the exported function and does start the new server.
Steps to Reproduce
(by some means) call
err := router.UpdateServer(ctx, newRouterConfig)
Expected Result
Calling the exported function will replace the existing server with a newly configured and started server.
Actual Result
Calling the exported function results in an inoperable system who's server exists but is not listening for connections.
Environment information
Environment
Problem is unrelated to environment
Source is this PR: https://github.com/wundergraph/cosmo/pull/446/files#diff-aa58824b56f499a6a7d39dd7d905130a1aed0683be3aa6826a63dfd5d5047edcL373
Router configuration
No response
Router execution config
No response
Log output
Additional context
Note in the log that the new server does not start listening.
It seems like the source PR (446) split the functions (
UpdateServer
) and 'broke' the original exported function (compared to its description). It looks like the new non-exported function (updateServerAndStart
) should actually be the one that is exported and has the description.The text was updated successfully, but these errors were encountered: