Skip to content

Commit

Permalink
Worker Versioning (#1120)
Browse files Browse the repository at this point in the history
Implement client API (changes) and various internal details of new worker versioning feature

Co-authored-by: Roey Berman <roey.berman@gmail.com>
Co-authored-by: Roey Berman <roey@temporal.io>
Co-authored-by: David Reiss <david@temporal.io>
  • Loading branch information
4 people authored May 25, 2023
1 parent fc09967 commit 76377c7
Show file tree
Hide file tree
Showing 31 changed files with 1,205 additions and 330 deletions.
31 changes: 26 additions & 5 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ type (

// UpdateWorkflowWithOptionsRequest encapsulates the parameters for
// sending an update to a workflow execution.
// NOTE: Experimental
// WARNING: Worker versioning is currently experimental
UpdateWorkflowWithOptionsRequest = internal.UpdateWorkflowWithOptionsRequest

// WorkflowUpdateHandle represents a running or completed workflow
Expand All @@ -178,16 +178,37 @@ type (
GetWorkflowUpdateHandleOptions = internal.GetWorkflowUpdateHandleOptions

// UpdateWorkerBuildIdCompatibilityOptions is the input to Client.UpdateWorkerBuildIdCompatibility.
// NOTE: Experimental
// WARNING: Worker versioning is currently experimental
UpdateWorkerBuildIdCompatibilityOptions = internal.UpdateWorkerBuildIdCompatibilityOptions

// GetWorkerBuildIdCompatibilityOptions is the input to Client.GetWorkerBuildIdCompatibility.
// NOTE: Experimental
// WARNING: Worker versioning is currently experimental
GetWorkerBuildIdCompatibilityOptions = internal.GetWorkerBuildIdCompatibilityOptions

// WorkerBuildIDVersionSets is the response for Client.GetWorkerBuildIdCompatibility.
// WARNING: Worker versioning is currently experimental
WorkerBuildIDVersionSets = internal.WorkerBuildIDVersionSets

// BuildIDOpAddNewIDInNewDefaultSet is an operation for UpdateWorkerBuildIdCompatibilityOptions
// to add a new BuildID in a new default set.
// WARNING: Worker versioning is currently experimental
BuildIDOpAddNewIDInNewDefaultSet = internal.BuildIDOpAddNewIDInNewDefaultSet

// BuildIDOpAddNewCompatibleVersion is an operation for UpdateWorkerBuildIdCompatibilityOptions
// to add a new BuildID to an existing compatible set.
// WARNING: Worker versioning is currently experimental
BuildIDOpAddNewCompatibleVersion = internal.BuildIDOpAddNewCompatibleVersion

// BuildIDOpPromoteSet is an operation for UpdateWorkerBuildIdCompatibilityOptions to promote a
// set to be the default set by targeting an existing BuildID.
// WARNING: Worker versioning is currently experimental
BuildIDOpPromoteSet = internal.BuildIDOpPromoteSet

// BuildIDOpPromoteIDWithinSet is an operation for UpdateWorkerBuildIdCompatibilityOptions to
// promote a BuildID within a set to be the default.
// WARNING: Worker versioning is currently experimental
BuildIDOpPromoteIDWithinSet = internal.BuildIDOpPromoteIDWithinSet

// Client is the client for starting and getting information about a workflow executions as well as
// completing activities asynchronously.
Client interface {
Expand Down Expand Up @@ -477,12 +498,12 @@ type (
// UpdateWorkerBuildIdCompatibility
// Allows you to update the worker-build-id based version sets for a particular task queue. This is used in
// conjunction with workers who specify their build id and thus opt into the feature.
// NOTE: Experimental
// WARNING: Worker versioning is currently experimental
UpdateWorkerBuildIdCompatibility(ctx context.Context, options *UpdateWorkerBuildIdCompatibilityOptions) error

// GetWorkerBuildIdCompatibility
// Returns the worker-build-id based version sets for a particular task queue.
// NOTE: Experimental
// WARNING: Worker versioning is currently experimental
GetWorkerBuildIdCompatibility(ctx context.Context, options *GetWorkerBuildIdCompatibilityOptions) (*WorkerBuildIDVersionSets, error)

// CheckHealth performs a server health check using the gRPC health check
Expand Down
2 changes: 1 addition & 1 deletion contrib/datadog/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module go.temporal.io/sdk/contrib/datadog
go 1.16

require (
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.3
go.temporal.io/sdk v1.12.0
gopkg.in/DataDog/dd-trace-go.v1 v1.42.0
)
Expand Down
158 changes: 129 additions & 29 deletions contrib/datadog/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contrib/opentelemetry/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module go.temporal.io/sdk/contrib/opentelemetry
go 1.16

require (
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.3
go.opentelemetry.io/otel v1.2.0
go.opentelemetry.io/otel/sdk v1.2.0
go.opentelemetry.io/otel/trace v1.2.0
Expand Down
163 changes: 125 additions & 38 deletions contrib/opentelemetry/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contrib/opentracing/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/opentracing/opentracing-go v1.2.0
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.3
go.temporal.io/sdk v1.12.0
)

Expand Down
163 changes: 125 additions & 38 deletions contrib/opentracing/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contrib/tally/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module go.temporal.io/sdk/contrib/tally
go 1.16

require (
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.3
github.com/uber-go/tally/v4 v4.1.1
go.temporal.io/sdk v1.12.0
)
Expand Down
163 changes: 125 additions & 38 deletions contrib/tally/go.sum

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/pborman/uuid v1.2.1
github.com/robfig/cron v1.2.0
github.com/stretchr/testify v1.8.2
go.temporal.io/api v1.19.1-0.20230322213042-07fb271d475b
github.com/stretchr/testify v1.8.3
go.temporal.io/api v1.19.1-0.20230525203837-c5e9155968d8
go.uber.org/atomic v1.9.0
golang.org/x/time v0.1.0
google.golang.org/grpc v1.54.0
golang.org/x/time v0.3.0
google.golang.org/grpc v1.55.0
google.golang.org/protobuf v1.30.0
)
Loading

0 comments on commit 76377c7

Please sign in to comment.