-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Change client/server version support #761
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
Change client/server version support #761
Conversation
| CancelRequestId string | ||
| StickyTaskQueue string | ||
| StickyScheduleToStartTimeout *time.Duration | ||
| ClientLibraryVersion 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.
Why are we removing it? Looks like useful info. Obviously, field names should change.
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.
After discussion with @samarabbas we decided to store client version info later in workflow history as version marker. Storing only last client version here doesn't make much sense.
| ServerVersion = "0.31.0" | ||
| CLIVersion = "0.31.0" |
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.
These should be updated with every release.
| ClientNameGoSDK: "<2.0.0", | ||
| ClientNameJavaSDK: "<2.0.0", | ||
| ClientNameCLI: "<2.0.0", | ||
| ClientNameServer: "<2.0.0", |
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.
Assumes that version 2.0.0 will break compatibility.
| // Version is the version associated with this build. | ||
| Version = "unknown" | ||
| // GitVersion is the git version (tag) associated with this build. | ||
| GitVersion = "unknown" |
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.
This version has an issue. If someone just pull master every time w/o fetching tags, this version becomes stale and never gets updated.
| temporal.server.api.cluster.v1.MembershipInfo membership_info = 2; | ||
| map<string,string> supported_clients = 1; | ||
| string server_version = 2; | ||
| temporal.server.api.cluster.v1.MembershipInfo membership_info = 3; |
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.
Breaking change.
| reserved 48; | ||
| reserved 49; | ||
| reserved 50; |
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.
This info is not persisted anymore as it is not used by code. @samarabbas, I am wondering if we still want to persist client name and version for debugging purpose.
| clientName := headers[0] | ||
| clientVersion := headers[1] | ||
| supportedServerVersions := headers[2] | ||
|
|
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.
Bellow is the core logic according to spec.
|
Run manual backward compatibility tests: old canary -> new server, new canary -> old server. New canary -> new server also works :-). |
What changed?
The way how client and server checks each other versions.
Why?
Previous schema was complicated and hard to understand/explain. This implementation follow simple rules:
client-name: one oftemporal-go,temporal-java,temporal-cli, ortemporal-server.client-version:0.30.0supported-server-versions:>1.1.1 <=1.4.0||^5.0.0(https://github.com/blang/semver#ranges).GetClusterInfoAPI which returns its version and supported version ranges for every supported client.How did you test it?
Modified existing tests.
Potential risks
No risks, because version check wasn't actually used and because missing headers are treated as "accepted" all combinations of old/new server and old/new clients should work.