Skip to content
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

Add VersioningBehaviorOverride to StartWorkflowExecutionRequest #477

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion temporal/api/common/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ message WorkerVersionCapabilities {

// Used in both UpdateWorkflowExecutionOptions and StartWorkflowExecution to override
// the versioning behavior of a specific workflow execution. If set, takes precedence
// over the sdk-sent Versioning Behavior for the specific Workflow Execution it is set on.
// over the Versioning Behavior sent by the SDK on Workflow Task completion.
// To remove the override, call UpdateWorkflowExecutionOptions with a null VersioningBehaviorOverride,
// and use the FieldMask to indicate that it should be mutated.
message VersioningBehaviorOverride {
Expand Down
5 changes: 4 additions & 1 deletion temporal/api/workflow/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ message NewWorkflowExecutionInfo {
// for use by user interfaces to display the fixed as-of-start summary and details of the
// workflow.
temporal.api.sdk.v1.UserMetadata user_metadata = 14;
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
temporal.api.common.v1.VersioningBehaviorOverride versioning_behavior_override = 15;
}

// CallbackInfo contains the state of an attached workflow callback.
Expand Down Expand Up @@ -363,6 +366,6 @@ message NexusOperationCancellationInfo {
}

message WorkflowExecutionOptions {
// If set, takes precedence over the sdk-sent Versioning Behavior for the specific Workflow Execution it is set on.
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
temporal.api.common.v1.VersioningBehaviorOverride versioning_behavior_override = 1;
}
7 changes: 6 additions & 1 deletion temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ message StartWorkflowExecutionRequest {
temporal.api.sdk.v1.UserMetadata user_metadata = 23;
// Links to be associated with the workflow.
repeated temporal.api.common.v1.Link links = 24;
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
temporal.api.common.v1.VersioningBehaviorOverride versioning_behavior_override = 25;
Copy link
Member

@cretz cretz Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to also be added to SignalWithStartWorkflowExecutionRequest for signal with start and NewWorkflowExecutionInfo for schedules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is primarily to enable customers to write canary workflows and start/run them on a specific worker deployment that they want to test. I could see people wanting to do that with schedules, not sure if people would want to do that with SignalWithStart, but there's no harm in giving them the option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added it to both of those

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will also need to be added to internal.StartWorkflowOptions in sdk-go

Copy link
Member

@cretz cretz Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From an SDK POV, probably to every start workflow options in every language (Go is not more important than the others)

}

message StartWorkflowExecutionResponse {
Expand Down Expand Up @@ -710,9 +713,11 @@ message SignalWithStartWorkflowExecutionRequest {
// for use by user interfaces to display the fixed as-of-start summary and details of the
// workflow.
temporal.api.sdk.v1.UserMetadata user_metadata = 23;

// Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events.
repeated temporal.api.common.v1.Link links = 24;
// If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
// To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
temporal.api.common.v1.VersioningBehaviorOverride versioning_behavior_override = 25;
}

message SignalWithStartWorkflowExecutionResponse {
Expand Down
Loading