Commit cde9f12
change Version to struct, prevent misconfiguration of VersioningOverride (#579)
_**READ BEFORE MERGING:** All PRs require approval by both Server AND
SDK teams before merging! This is why the number of required approvals
is "2" and not "1"--two reviewers from the same team is NOT sufficient.
If your PR is not approved by someone in BOTH teams, it may be summarily
reverted._
What changed?
- Make override a one of and add different pinned override types.
- Change version from string to struct
- Make nil Version represent "send tasks away from versioned workers and
to unversioned workers"
Why?
- To prevent misconfiguration and to expand the override definition to
accommodate the new PinnedUntilContinueAsNew behaviors.
- Using a string to represent structured data, whose subfields
frequently need to be considered separately, is brittle and not good for
anyone using it. Struct is better.
- "unversioned version" is contradictory, and nil is a nice way to
represent that the versioning story of a task queue is no longer in the
control of the Deployment whose `RoutingConfig` you are reading.
<!-- Are there any breaking changes on binary or code level? -->
Variables are being deprecated, but the content of the code is not
changing.
The idea of "Unset Ramp" having a separate meaning from "0% Ramp" is
removed. 0% ramp now is the only way to have "no ramp" / 100% of traffic
going to Current Version. Nil `ramping_deployment_version` + non-zero
`ramping_version_percentage` is the way to ramp traffic to unversioned
workers.
The SDK interface for this could look like:
```
deployment := client.GetHandle(deploymentName)
// set current to a version
deployment.SetCurrentVersion(buildId) -> current set to deploymentName/buildId
deployment.UnsetCurrentVersion() -> current set to nil
// set current to unversioned
deployment.UnsetCurrentVersion() -> current set to nil
deployment.SetRampingVersion(buildId, 50) -> ramp set to (deploymentName/buildId, 50)
deployment.UnsetRampingVersion() -> ramp set to (nil, 0%)
deployment.RampToUnversioned(50) -> set to (nil, 50%)
```
<!-- If this breaks the Server, please provide the Server PR to merge
right after this PR was merged. -->
**Server PR**
---------
Co-authored-by: Spencer Judge <[email protected]>
Co-authored-by: Shahab Tajik <[email protected]>1 parent 4c3944c commit cde9f12
File tree
11 files changed
+1743
-999
lines changed- deployment/v1
- history/v1
- proto
- taskqueue/v1
- temporalproto/openapi
- workflowservice/v1
- workflow/v1
11 files changed
+1743
-999
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
- openapi/openapiv2.json+238-51
- openapi/openapiv3.yaml+305-97
- temporal/api/deployment/v1/message.proto+45-23
- temporal/api/history/v1/message.proto+36-21
- temporal/api/taskqueue/v1/message.proto+17-16
- temporal/api/workflow/v1/message.proto+59-22
- temporal/api/workflowservice/v1/request_response.proto+51-36
- temporal/api/workflowservice/v1/service.proto+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments