-
Notifications
You must be signed in to change notification settings - Fork 809
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
Fix public client default value after xdc switching to gRPC #4560
Conversation
Pull Request Test Coverage Report for Build 28b8b206-2870-45c7-9866-c3ece15ed82e
💛 - Coveralls |
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.
Look good, thanks for the fix.
common/config/config.go
Outdated
// public client cannot use gRPC because GoSDK hasn't supported it. we need to fallback to Thrift | ||
// TODO: remove this fallback after GoSDK supporting gRPC | ||
thriftPort := c.Services["frontend"].RPC.Port // use the Thrift port from RPC config | ||
hostPort := strings.Split(currentCluster.RPCAddress, ":") |
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.
Just FYI, Go has dedicated function for such address splitting/joining which has some additional logic: net.SplitHostPort
and net.JoinHostPort
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.
yeah good point. Will switch to that.
c.PublicClient.HostPort = currentCluster.RPCAddress | ||
} else { | ||
// public client cannot use gRPC because GoSDK hasn't supported it. we need to fallback to Thrift | ||
// TODO: remove this fallback after GoSDK supporting gRPC |
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.
GoSDK already have gRPC compatibility layer. I'm planning to switch sys worker on the server side soon.
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.
Sounds great.
What changed?
Fix public client default value after xdc switching to gRPC
Why?
After this #4492 the default value of publicClient.hostPort is broken because GoSDK doesn't support gRPC yet.
errors about sys-worker startup:
The above errors are gone after this fix.
How did you test it?
Local test.
run
make install-schema-xdc
and thenmake cadence-server
then./cadence-server --zone xdc_cluster0 start
Potential risks
Release notes
Documentation Changes