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

Worker Versioning #1120

Merged
merged 24 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0cb488e
Upgrade API go to latest worker-versioning commit
bergundy Apr 14, 2023
8ea3f41
Update API worker-versioning feature branch
bergundy Apr 25, 2023
4c84bab
Use rebased API
bergundy May 3, 2023
1cec8d0
Upgrade api to get latest feature branch changes
bergundy May 4, 2023
9754c7e
Remove build_id from ResetPointInfo (still TBD if needed)
bergundy May 5, 2023
466b45d
Update api dependency to feature branch HEAD
bergundy May 11, 2023
2dc72e7
Upgrade API again
bergundy May 16, 2023
7207661
Use interface for operation, other updates
Sushisource May 18, 2023
d7eadcb
Fix test gomod
Sushisource May 18, 2023
2b1fa2f
Pass through UseLatestBuildID flag
Sushisource May 18, 2023
5fd2848
Update flag to use new scheme & expose enum as user interface
Sushisource May 24, 2023
fd82ac6
More reachability API changes
bergundy May 19, 2023
c6e41e8
More reachability API changes
bergundy May 19, 2023
6d22155
Propagate UseBuildIDForVersioning to RespondWorkflowTaskCompletedResp…
bergundy May 20, 2023
bcc09ff
Add stamps to places they're needed now & update polling reqs
Sushisource May 24, 2023
51eae5c
Include normal name in WFT sticky polls
Sushisource May 24, 2023
2b77bfa
Include normal name in StickyExecutionAttributes (#1118)
dnr May 25, 2023
30813c7
Add WithVersionIntent option setter & move VersionIntent to temporal pkg
Sushisource May 25, 2023
90edaf4
Rename stuff based on reviews
Sushisource May 25, 2023
04e2915
Dedupe use compat flag logic
Sushisource May 25, 2023
60d4ae6
Add experimental comments
Sushisource May 25, 2023
f3d24e2
Update to main branch
Sushisource May 25, 2023
c6734d1
Last bits of review comments
Sushisource May 25, 2023
3be58e3
Don't send binary checksum when build id capability is present
Sushisource May 25, 2023
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
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
Copy link
Member

@cretz cretz May 25, 2023

Choose a reason for hiding this comment

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

All Godoc relating to this feature needs to be documented as experimental IMO.

I know it can seem unnecessary to do to each Godoc piece and instead just the entry/affecting point, but people are going to be expecting that unless otherwise marked, you're not gonna change this variable and I don't think we want to commit to API stability on any of this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, thanks


// 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
Copy link
Member

Choose a reason for hiding this comment

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

Is this using api from master?
Seems like the version should have been bumped there.

Copy link
Member Author

Choose a reason for hiding this comment

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

The version hasn't been bumped in quite some time. There's not really a meaningful reason to, our pattern for a bit has just been to let this sit this way.

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