Skip to content

Commit

Permalink
Worker versioning related updates (#272)
Browse files Browse the repository at this point in the history
Decided not to expose (the yet unused) `CompatibleVersionSet.version_set_id`, the set will have multiple IDs internally.

The affected projects have been updated:
- [x] [Server PR](temporalio/temporal#4170)
- [x] [Go SDK PR](temporalio/sdk-go#1089)

Also added a `use_versioning` flag to `RespondWorkflowTaskCompletedRequest` to differentiate between the version stamp being used for versioning (matching) purposes or just as a marker.
  • Loading branch information
bergundy authored and Sushisource committed May 25, 2023
1 parent f4f5bd8 commit ab8f82c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 4 additions & 7 deletions temporal/api/taskqueue/v1/message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,9 @@ message StickyExecutionAttributes {
google.protobuf.Duration schedule_to_start_timeout = 2 [(gogoproto.stdduration) = true];
}

// Used by the worker versioning APIs, represents an ordering of one or more versions which are
// considered to be compatible with each other. Currently the versions are always worker build ids.
// Used by the worker versioning APIs, represents an unordered set of one or more versions which are
// considered to be compatible with each other. Currently the versions are always worker build IDs.
message CompatibleVersionSet {
// A unique identifier for this version set. Users don't need to understand or care about this
// value, but it has value for debugging purposes.
string version_set_id = 1;
// All the compatible versions, ordered from oldest to newest
repeated string build_ids = 2;
// All the compatible versions, unordered, except for the last element, which is considered the set "default".
repeated string build_ids = 1;
}
5 changes: 5 additions & 0 deletions temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ message RespondWorkflowTaskCompletedRequest {
temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 12;
// Local usage data collected for metering
temporal.api.common.v1.MeteringMetadata metering_metadata = 13;

// If set, the worker is opting in to worker versioning. Otherwise, worker_version_stamp is used as a marker for
// workflow reset points and the BuildId search attibute.
// This flag must only be set if worker_version_stamp is provided.
bool use_versioning = 14;
}

message RespondWorkflowTaskCompletedResponse {
Expand Down

0 comments on commit ab8f82c

Please sign in to comment.