Skip to content

Commit 3b1b8d0

Browse files
bergundycarlydf
andauthored
Upgrade Go SDK to 1.35.0 (#8216)
Had to change WorkerDeploymentOptions and VersioningOverride to work with new SDK. Changed the worker setup for the versioning internal workflow replay tests, so I generated a new set of workflow histories to test with. Normally we generate new workflow histories only when we've made a change to the workflow definitions that we want to test (ie. a new patch), but since the operations to generate the workflow histories had to change slightly, I think it makes sense to generate a fresh set of histories to replay-test with next time there is a change. --------- Co-authored-by: Carly de Frondeville <[email protected]>
1 parent 4d1212a commit 3b1b8d0

File tree

37 files changed

+156
-67
lines changed

37 files changed

+156
-67
lines changed

common/testing/mocksdk/client_mock.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/testing/mocksdk/generate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ mockgen -package "$GOPACKAGE" go.temporal.io/sdk/client Client | \
99
mockgen -package "$GOPACKAGE" go.temporal.io/sdk/worker Worker | \
1010
sed -e 's,internal.RegisterWorkflowOptions,workflow.RegisterOptions,g' \
1111
-e 's,internal.RegisterActivityOptions,activity.RegisterOptions,g' \
12+
-e 's,internal.DynamicRegisterWorkflowOptions,workflow.DynamicRegisterOptions,g' \
13+
-e 's,internal.DynamicRegisterActivityOptions,activity.DynamicRegisterOptions,g' \
1214
-e 's,internal "go.temporal.io/sdk/internal",activity "go.temporal.io/sdk/activity"\n\tworkflow "go.temporal.io/sdk/workflow",' | \
1315
goimports > worker_mock.go
1416

common/testing/mocksdk/worker_mock.go

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/testing/testvars/test_vars.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
taskqueuepb "go.temporal.io/api/taskqueue/v1"
1515
updatepb "go.temporal.io/api/update/v1"
1616
workflowpb "go.temporal.io/api/workflow/v1"
17+
"go.temporal.io/sdk/worker"
1718
deploymentspb "go.temporal.io/server/api/deployment/v1"
1819
persistencespb "go.temporal.io/server/api/persistence/v1"
1920
"go.temporal.io/server/common/namespace"
@@ -254,6 +255,14 @@ func (tv *TestVars) ExternalDeploymentVersion() *deploymentpb.WorkerDeploymentVe
254255
}
255256
}
256257

258+
// SDKDeploymentVersion returns SDK worker deployment version
259+
func (tv *TestVars) SDKDeploymentVersion() worker.WorkerDeploymentVersion {
260+
return worker.WorkerDeploymentVersion{
261+
BuildId: tv.BuildID(),
262+
DeploymentName: tv.DeploymentSeries(),
263+
}
264+
}
265+
257266
// DeploymentVersionString returns v31 string
258267
func (tv *TestVars) DeploymentVersionString() string {
259268
return worker_versioning.WorkerDeploymentVersionToStringV31(tv.DeploymentVersion())

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ require (
6161
go.opentelemetry.io/otel/sdk/metric v1.34.0
6262
go.opentelemetry.io/otel/trace v1.34.0
6363
go.temporal.io/api v1.52.0
64-
go.temporal.io/sdk v1.34.0
64+
go.temporal.io/sdk v1.35.0
6565
go.uber.org/automaxprocs v1.6.0
6666
go.uber.org/fx v1.23.0
6767
go.uber.org/mock v0.5.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU
401401
go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
402402
go.temporal.io/api v1.52.0 h1:Tn69z2nhQeXtofa1/j/MbwPHnFRM9+13xqYmFl/KFjM=
403403
go.temporal.io/api v1.52.0/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM=
404-
go.temporal.io/sdk v1.34.0 h1:VLg/h6ny7GvLFVoQPqz2NcC93V9yXboQwblkRvZ1cZE=
405-
go.temporal.io/sdk v1.34.0/go.mod h1:iE4U5vFrH3asOhqpBBphpj9zNtw8btp8+MSaf5A0D3w=
404+
go.temporal.io/sdk v1.35.0 h1:lRNAQ5As9rLgYa7HBvnmKyzxLcdElTuoFJ0FXM/AsLQ=
405+
go.temporal.io/sdk v1.35.0/go.mod h1:1q5MuLc2MEJ4lneZTHJzpVebW2oZnyxoIOWX3oFVebw=
406406
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
407407
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
408408
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=

service/worker/workerdeployment/replaytester/generate_history.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# To use it, run a local server (any backend) and ensure the following dynamic configs are enabled
66
# in the dynamic config file (config/dynamicconfig/development-sql.yaml):
77
#
8-
# system.enableDeploymentVersions=true
98
# matching.PollerHistoryTTL=1s
109
# matching.wv.VersionDrainageStatusVisibilityGracePeriod=5s
1110
# matching.wv.VersionDrainageStatusRefreshInterval=5s
@@ -18,7 +17,7 @@ deploymentName="foo"
1817
version="1.0"
1918

2019
# Expected workflow counts - users can override these if their changes are expected to generate more workflows which will be true when a breaking change to
21-
# these worfklows is introduced.
20+
# these workflows is introduced.
2221
# These values are used by the replay tester to validate that your workflow changes haven't accidentally created additional executions.
2322
EXPECTED_DEPLOYMENT_WORKFLOWS=${EXPECTED_DEPLOYMENT_WORKFLOWS:-12}
2423
EXPECTED_VERSION_WORKFLOWS=${EXPECTED_VERSION_WORKFLOWS:-14}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Expected workflow counts for replay testing
2+
# Generated by generate_history.sh on Tue Aug 19 18:08:43 PDT 2025
3+
EXPECTED_DEPLOYMENT_WORKFLOWS=12
4+
EXPECTED_VERSION_WORKFLOWS=14
5+
ACTUAL_DEPLOYMENT_WORKFLOWS=12
6+
ACTUAL_VERSION_WORKFLOWS=14

0 commit comments

Comments
 (0)