-
Notifications
You must be signed in to change notification settings - Fork 68
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
Use string values for deployment version #547
Conversation
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.
LGTM since going to feature branch and doesn't appear to be affecting any master
APIs
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> worker_versioning_mode
@@ -260,7 +260,7 @@ message WorkflowTaskCompletedEventAttributes { | |||
// The deployment version of the worker that completed this task. Must be set if | |||
// `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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add format comment
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.
add deployment name too
@@ -110,6 +110,9 @@ message WorkflowExecutionInfo { | |||
// be versioned or unversioned, depending on `versioning_info.behavior` and `versioning_info.versioning_override`. | |||
// Experimental. Versioning info is experimental and might change in the future. | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> 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; |
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.
-> version
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; |
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.
-> version
// - 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// - 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]>
## 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?
version
fields. RemovedWorkerDeploymentVersion
from the public API. This is for two reasons:__unversioned__
(and maybe later<deployment_name>/__unversioned__
.WorkerDeploymentOptions
in the task response APIs instead ofWorkerDeploymentVersion
so that server has the full info regardless of the worker participating in versioning or not.worker_deployment
field to execution info (top level) so both versioned and unversioned workflows can have this info (and its corresponding SA).WorkflowVersioningMode
toWorkerVersioningMode
and itsVERSIONING_BEHAVIORS
enum toVERSIONED
, for the following reasons:__unversioned__
value for them. Hence, it'd be very confusing if they don't see some config such asWorkerVersioningMode
that 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