Use string values for deployment version#547
Conversation
cretz
left a comment
There was a problem hiding this comment.
LGTM since going to feature branch and doesn't appear to be affecting any master APIs
ShahabT
left a comment
There was a problem hiding this comment.
Change requests that came out of in-person meeting with @antlai-temporal @carlydf @Shivs11 .
| // same `deployment_name` and `build_id`, across all Task Queues. | ||
| // When `versioning_mode==VERSIONED`, the worker will be part of a Deployment Version identified | ||
| // by "<deployment_name>/<build_id>". | ||
| temporal.api.enums.v1.WorkerVersioningMode versioning_mode = 3; |
There was a problem hiding this comment.
-> worker_versioning_mode
| // `versioning_behavior` is set. This value updates workflow execution's | ||
| // `versioning_info.deployment_version`. | ||
| temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 9; | ||
| string deployment_version = 9; |
There was a problem hiding this comment.
add deployment name too
| WorkflowExecutionVersioningInfo versioning_info = 22; | ||
|
|
||
| // The name of Worker Deployment that completed the most recent workflow task. | ||
| string worker_deployment = 23; |
There was a problem hiding this comment.
-> worker_deployment_name
| // Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version` | ||
| // will override this value. | ||
| temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 5; | ||
| string deployment_version = 5; |
| temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 1; | ||
| // Required. The target version of the transition. May be `__unversioned__` which means a | ||
| // so-far-versioned workflow is transitioning to unversioned workers. | ||
| string deployment_version = 1; |
| // - It is not the Current or Ramping Version of its Deployment. | ||
| // - It has no active pollers (none of the task queues in the Version have pollers) | ||
| // - It is drained (see WorkerDeploymentVersionInfo.drainage_info) | ||
| // - It is drained (see WorkerDeploymentVersionInfo.drainage_info). This condition can be skipped |
There was a problem hiding this comment.
Make it clear that nil drainage info is ok
| // Workers with this mode are part of a Worker Deployment Version which is identified as | ||
| // "<deployment_name>/<build_id>". Such workers are called "versioned" as opposed to | ||
| // "unversioned". | ||
| // Each Deployment Version is distinguished from other Versions and users can configure Temporal |
There was a problem hiding this comment.
| // Each Deployment Version is distinguished from other Versions and users can configure Temporal | |
| // Each Deployment Version is unique within a Namespace and users can configure the Temporal |
There was a problem hiding this comment.
I meant they are distinguished for routing task. I'll make that clear.
| // Optional. By default this request would be rejected if not all the expected Task Queues are | ||
| // being polled by the new Version, to protects against accidental removal of Task Queues, or | ||
| // worker health issues. Pass `true` here to bypass this protection. | ||
| // The set of expected Task Queues equals to all the Task Queues ever polled from the existing |
There was a problem hiding this comment.
| // The set of expected Task Queues equals to all the Task Queues ever polled from the existing | |
| // The set of expected Task Queues is the set of all the Task Queues that ever belonged to the existing |
| // add_rate of 0.) | ||
| // - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue | ||
| // having a different Current Version than the Current Version of this deployment.) | ||
| // WARNING: Do not set this flag unless you are sure that the missing task queue poller are not |
There was a problem hiding this comment.
| // WARNING: Do not set this flag unless you are sure that the missing task queue poller are not | |
| // WARNING: Do not set this flag unless you are sure that the missing task queue pollers are not |
| // having a different Current Version than the Current Version of this deployment.) | ||
| // WARNING: Do not set this flag unless you are sure that the missing task queue poller are not | ||
| // needed. If the request is unexpectedly rejected due to missing pollers, then that means the | ||
| // pollers have not reached to server yet. |
There was a problem hiding this comment.
| // pollers have not reached to server yet. | |
| // pollers have not reached the server yet. |
| string namespace = 1; | ||
| // Deployment Version identifier in the form "<deployment_name>/<build_id>". | ||
| string version = 2; | ||
| // Pass to force deletion even if the Version is not drained. In this case the open pinned |
There was a problem hiding this comment.
| // Pass to force deletion even if the Version is not drained. In this case the open pinned | |
| // Pass to force deletion even if the Version is draining. In this case the open pinned |
| // - It is not the Current or Ramping Version of its Deployment. | ||
| // - It has no active pollers (none of the task queues in the Version have pollers) | ||
| // - It is drained (see WorkerDeploymentVersionInfo.drainage_info) | ||
| // - It is not in Draining status (see WorkerDeploymentVersionInfo.drainage_info). This condition |
There was a problem hiding this comment.
| // - It is not in Draining status (see WorkerDeploymentVersionInfo.drainage_info). This condition | |
| // - It is not draining (see WorkerDeploymentVersionInfo.drainage_info). This condition |
Co-authored-by: Carly de Frondeville <[email protected]>
## What changed? <!-- Describe what has changed in this PR --> Updated code to use latest API changes in which Deployment Versions are represented by string fields rather than structs. `WorkerDeploymentVersion` proto message still exists but only for the internal APIs. ## Why? <!-- Tell your future self why have you made these changes --> See temporalio/api#547. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> --------- Co-authored-by: Carly de Frondeville <[email protected]>
## What changed? <!-- Describe what has changed in this PR --> Updated code to use latest API changes in which Deployment Versions are represented by string fields rather than structs. `WorkerDeploymentVersion` proto message still exists but only for the internal APIs. ## Why? <!-- Tell your future self why have you made these changes --> See temporalio/api#547. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> --------- Co-authored-by: Carly de Frondeville <[email protected]>
## What changed? <!-- Describe what has changed in this PR --> Updated code to use latest API changes in which Deployment Versions are represented by string fields rather than structs. `WorkerDeploymentVersion` proto message still exists but only for the internal APIs. ## Why? <!-- Tell your future self why have you made these changes --> See temporalio/api#547. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> --------- Co-authored-by: Carly de Frondeville <[email protected]>
## What changed? <!-- Describe what has changed in this PR --> Updated code to use latest API changes in which Deployment Versions are represented by string fields rather than structs. `WorkerDeploymentVersion` proto message still exists but only for the internal APIs. ## Why? <!-- Tell your future self why have you made these changes --> See temporalio/api#547. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> --------- Co-authored-by: Carly de Frondeville <[email protected]>
## What changed? <!-- Describe what has changed in this PR --> Updated code to use latest API changes in which Deployment Versions are represented by string fields rather than structs. `WorkerDeploymentVersion` proto message still exists but only for the internal APIs. ## Why? <!-- Tell your future self why have you made these changes --> See temporalio/api#547. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> --------- Co-authored-by: Carly de Frondeville <[email protected]>
## What changed? <!-- Describe what has changed in this PR --> Updated code to use latest API changes in which Deployment Versions are represented by string fields rather than structs. `WorkerDeploymentVersion` proto message still exists but only for the internal APIs. ## Why? <!-- Tell your future self why have you made these changes --> See temporalio/api#547. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> --------- Co-authored-by: Carly de Frondeville <[email protected]>
## What changed? <!-- Describe what has changed in this PR --> Updated code to use latest API changes in which Deployment Versions are represented by string fields rather than structs. `WorkerDeploymentVersion` proto message still exists but only for the internal APIs. ## Why? <!-- Tell your future self why have you made these changes --> See temporalio/api#547. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> --------- Co-authored-by: Carly de Frondeville <[email protected]>
## What changed? <!-- Describe what has changed in this PR --> Updated code to use latest API changes in which Deployment Versions are represented by string fields rather than structs. `WorkerDeploymentVersion` proto message still exists but only for the internal APIs. ## Why? <!-- Tell your future self why have you made these changes --> See temporalio/api#547. ## How did you test it? <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? <!-- Is this PR a hotfix candidate or does it require a notification to be sent to the broader community? (Yes/No) --> --------- Co-authored-by: Carly de Frondeville <[email protected]>
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?
versionfields. RemovedWorkerDeploymentVersionfrom the public API. This is for two reasons:__unversioned__(and maybe later<deployment_name>/__unversioned__.WorkerDeploymentOptionsin the task response APIs instead ofWorkerDeploymentVersionso that server has the full info regardless of the worker participating in versioning or not.worker_deploymentfield to execution info (top level) so both versioned and unversioned workflows can have this info (and its corresponding SA).WorkflowVersioningModetoWorkerVersioningModeand itsVERSIONING_BEHAVIORSenum toVERSIONED, for the following reasons:__unversioned__value for them. Hence, it'd be very confusing if they don't see some config such asWorkerVersioningModethat directly specifies the worker as versioned or unversioned. The previous name, while doing the same thing, twisted the naming and I believe it'll confuse the users.Why?
Breaking changes
Server PR