Skip to content

Commit c36ffe7

Browse files
authored
IWF-186: Upgrade Temporal SDK (#442)
1 parent 3db7524 commit c36ffe7

20 files changed

+262
-1438
lines changed

CONTRIBUTING.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ Or maybe both just for testing to ensure the code works for both Cadence and Tem
6464

6565
### Option 1: Run with our docker-compose file (Recommended)
6666

67-
Simply run `docker compose -f docker-compose/integ-dependencies.yml up` will:
67+
Start with shutting down already running dependencies: `docker compose -f docker-compose/integ-dependencies.yml down`
68+
69+
Then simply run `docker compose -f docker-compose/integ-dependencies.yml up`. It will:
6870

6971
* Start both Cadence & Temporal as dependencies
7072
* Set up required system search attributes
@@ -86,20 +88,20 @@ Assuming you are using `default` namespace:
8688
1. Make sure you have registered system search attributes required by iWF server
8789

8890
```shell
89-
temporal operator search-attribute create -name IwfWorkflowType -type Keyword
90-
temporal operator search-attribute create -name IwfGlobalWorkflowVersion -type Int
91-
temporal operator search-attribute create -name IwfExecutingStateIds -type KeywordList
91+
temporal operator search-attribute create --name IwfWorkflowType --type Keyword
92+
temporal operator search-attribute create --name IwfGlobalWorkflowVersion --type Int
93+
temporal operator search-attribute create --name IwfExecutingStateIds --type KeywordList
9294
```
9395

9496
2. For `persistence_test.go` integTests, you need to register below custom search attributes.
9597

9698
```shell
97-
temporal operator search-attribute create -name CustomKeywordField -type Keyword
98-
temporal operator search-attribute create -name CustomIntField -type Int
99-
temporal operator search-attribute create -name CustomBoolField -type Bool
100-
temporal operator search-attribute create -name CustomDoubleField -type Double
101-
temporal operator search-attribute create -name CustomDatetimeField -type Datetime
102-
temporal operator search-attribute create -name CustomStringField -type Text
99+
temporal operator search-attribute create --name CustomKeywordField --type Keyword
100+
temporal operator search-attribute create --name CustomIntField --type Int
101+
temporal operator search-attribute create --name CustomBoolField --type Bool
102+
temporal operator search-attribute create --name CustomDoubleField --type Double
103+
temporal operator search-attribute create --name CustomDatetimeField --type Datetime
104+
temporal operator search-attribute create --name CustomStringField --type Text
103105
```
104106

105107
3. If you run into any issues with Search Attributes registration, use the below command to check the existing Search

Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ integTestsTemporalWithCover: # for local debugging
168168
$Q go tool cover -func coverage.out -o coverage.out
169169

170170
integTests:
171-
$Q go test -v ./integ
171+
$Q go test -v ./integ -timeout 15m
172172

173173
temporalIntegTests:
174174
$Q go test -v ./integ -cadence=false
@@ -183,10 +183,12 @@ ci-temporal-integ-test:
183183
$Q go test -v ./integ -cover -coverprofile coverage.out -coverpkg ./service/... -search=false -cadence=false -dependencyWaitSeconds=60
184184

185185
ci-all-tests:
186-
$Q go test -v ./... -cover -coverprofile coverage.out -coverpkg ./service/...
186+
# Fails CI when used with -coverprofile flag due to tests that panic; see https://go.dev/doc/build-cover#panicprof
187+
# $Q go test -v ./... -timeout 15m -cover -coverprofile coverage.out -coverpkg ./service/...
188+
$Q go test -v ./... -timeout 15m
187189

188190
integTestsNoSearch:
189-
$Q go test -v ./integ -search=false
191+
$Q go test -v ./integ -search=false -timeout 15m
190192

191193
stressTestsWithSearch:
192194
$Q go test -v ./integ -repeat=10 -intervalMs=100 -searchWaitMs=100 | tee test.log # TODO https://github.com/indeedeng/iwf/issues/134

docker-compose/.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ CASSANDRA_VERSION=3.11.9
22
ELASTICSEARCH_VERSION=7.16.2
33
MYSQL_VERSION=8
44
POSTGRESQL_VERSION=13
5-
TEMPORAL_VERSION=1.22.4
6-
TEMPORAL_UI_VERSION=2.22.3
5+
TEMPORAL_VERSION=1.25
6+
TEMPORAL_UI_VERSION=2.31.2

docker-compose/ci-cadence-temporal-dependencies.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ services:
3333
- postgresql
3434
- elasticsearch
3535
environment:
36-
- DB=postgresql
36+
- DB=postgres12
3737
- DB_PORT=5432
3838
- POSTGRES_USER=temporal
3939
- POSTGRES_PWD=temporal

docker-compose/ci-temporal-dependencies.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ services:
3333
- postgresql
3434
- elasticsearch
3535
environment:
36-
- DB=postgresql
36+
- DB=postgres12
3737
- DB_PORT=5432
3838
- POSTGRES_USER=temporal
3939
- POSTGRES_PWD=temporal

docker-compose/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ services:
3333
- postgresql
3434
- elasticsearch
3535
environment:
36-
- DB=postgresql
36+
- DB=postgres12
3737
- DB_PORT=5432
3838
- POSTGRES_USER=temporal
3939
- POSTGRES_PWD=temporal

docker-compose/init-ci-temporal.sh

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ fi
1212
echo "now trying to register iWF system search attributes..."
1313
for run in {1..120}; do
1414
sleep 1
15-
temporal operator search-attribute create -name IwfWorkflowType -type Keyword
15+
temporal operator search-attribute create --name IwfWorkflowType --type Keyword
1616
sleep 0.1
17-
temporal operator search-attribute create -name IwfGlobalWorkflowVersion -type Int
17+
temporal operator search-attribute create --name IwfGlobalWorkflowVersion --type Int
1818
sleep 0.1
19-
temporal operator search-attribute create -name IwfExecutingStateIds -type KeywordList
19+
temporal operator search-attribute create --name IwfExecutingStateIds --type KeywordList
2020
sleep 0.1
21-
temporal operator search-attribute create -name CustomKeywordField -type Keyword
21+
temporal operator search-attribute create --name CustomKeywordField --type Keyword
2222
sleep 0.1
23-
temporal operator search-attribute create -name CustomIntField -type Int
23+
temporal operator search-attribute create --name CustomIntField --type Int
2424
sleep 0.1
25-
temporal operator search-attribute create -name CustomBoolField -type Bool
25+
temporal operator search-attribute create --name CustomBoolField --type Bool
2626
sleep 0.1
27-
temporal operator search-attribute create -name CustomDoubleField -type Double
27+
temporal operator search-attribute create --name CustomDoubleField --type Double
2828
sleep 0.1
29-
temporal operator search-attribute create -name CustomDatetimeField -type Datetime
29+
temporal operator search-attribute create --name CustomDatetimeField --type Datetime
3030
sleep 0.1
31-
temporal operator search-attribute create -name CustomStringField -type Text
31+
temporal operator search-attribute create --name CustomStringField --type Text
3232
sleep 0.1
3333

3434
if checkExists "IwfWorkflowType" ] && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" && checkExists "CustomKeywordField" && checkExists "CustomIntField" && checkExists "CustomBoolField" && checkExists "CustomDoubleField" && checkExists "CustomDatetimeField" && checkExists "CustomStringField" ] ; then

docker-compose/init-compose.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ echo "now trying to register iWF system search attributes..."
1313

1414
for run in {1..60}; do
1515
sleep 1
16-
temporal operator search-attribute create -name IwfWorkflowType -type Keyword
16+
temporal operator search-attribute create --name IwfWorkflowType --type Keyword
1717
sleep 0.1
18-
temporal operator search-attribute create -name IwfGlobalWorkflowVersion -type Int
18+
temporal operator search-attribute create --name IwfGlobalWorkflowVersion --type Int
1919
sleep 0.1
20-
temporal operator search-attribute create -name IwfExecutingStateIds -type KeywordList
20+
temporal operator search-attribute create --name IwfExecutingStateIds --type KeywordList
2121
sleep 0.1
2222
if checkExists "IwfWorkflowType" ] && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" ] ; then
2323
echo "All search attributes are registered"

docker-compose/integ-dependencies.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ services:
3333
- postgresql
3434
- elasticsearch
3535
environment:
36-
- DB=postgresql
36+
- DB=postgres12
3737
- DB_PORT=5432
3838
- POSTGRES_USER=temporal
3939
- POSTGRES_PWD=temporal

go.mod

+24-23
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module github.com/indeedeng/iwf
22

3-
go 1.19
3+
go 1.22
44

55
require (
66
github.com/gin-gonic/gin v1.9.1
7-
github.com/google/uuid v1.3.0
7+
github.com/google/uuid v1.6.0
88
github.com/prometheus/client_golang v1.12.1
9-
github.com/stretchr/testify v1.8.4
9+
github.com/stretchr/testify v1.9.0
1010
github.com/uber-go/tally/v4 v4.1.1
1111
github.com/uber/cadence-idl v0.0.0-20220713235846-fda89e95df1e
1212
github.com/urfave/cli v1.22.5
13-
go.temporal.io/sdk v1.25.1
13+
go.temporal.io/sdk v1.29.1
1414
go.temporal.io/sdk/contrib/tally v0.1.0
1515
go.temporal.io/sdk/contrib/tools/workflowcheck v0.0.0-20220331154559-fd0d1eb548eb
1616
go.uber.org/cadence v0.17.1-0.20230105221902-f50f452a8eae // pin to pick GetUnhandledSignalNames API
@@ -21,15 +21,17 @@ require (
2121

2222
require (
2323
github.com/pkg/errors v0.9.1
24-
go.temporal.io/api v1.24.0
24+
go.temporal.io/api v1.39.0
2525
)
2626

2727
require (
28-
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
29-
golang.org/x/crypto v0.19.0 // indirect
30-
golang.org/x/net v0.21.0 // indirect
31-
google.golang.org/genproto/googleapis/api v0.0.0-20230815205213-6bfd019c3878 // indirect
32-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect
28+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
29+
github.com/nexus-rpc/sdk-go v0.0.10 // indirect
30+
golang.org/x/crypto v0.26.0 // indirect
31+
golang.org/x/net v0.28.0 // indirect
32+
golang.org/x/sync v0.8.0 // indirect
33+
google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect
34+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect
3335
)
3436

3537
require (
@@ -39,7 +41,7 @@ require (
3941
github.com/benbjohnson/clock v1.1.0 // indirect
4042
github.com/beorn7/perks v1.0.1 // indirect
4143
github.com/bytedance/sonic v1.9.1 // indirect
42-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
44+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4345
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
4446
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
4547
github.com/cristalhq/jwt/v3 v3.1.0 // indirect
@@ -55,9 +57,9 @@ require (
5557
github.com/gogo/googleapis v1.4.1 // indirect
5658
github.com/gogo/protobuf v1.3.2 // indirect
5759
github.com/gogo/status v1.1.1 // indirect
58-
github.com/golang/mock v1.6.0 // indirect
59-
github.com/golang/protobuf v1.5.3 // indirect
60-
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
60+
github.com/golang/mock v1.6.0
61+
github.com/golang/protobuf v1.5.4 // indirect
62+
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
6163
github.com/jessevdk/go-flags v1.4.0 // indirect
6264
github.com/json-iterator/go v1.1.12 // indirect
6365
github.com/kisielk/errcheck v1.5.0 // indirect
@@ -77,7 +79,7 @@ require (
7779
github.com/prometheus/procfs v0.7.3 // indirect
7880
github.com/robfig/cron v1.2.0 // indirect
7981
github.com/russross/blackfriday/v2 v2.1.0 // indirect
80-
github.com/stretchr/objx v0.5.0 // indirect
82+
github.com/stretchr/objx v0.5.2 // indirect
8183
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
8284
github.com/twmb/murmur3 v1.1.5 // indirect
8385
github.com/uber-go/mapdecode v1.0.0 // indirect
@@ -91,17 +93,16 @@ require (
9193
go.uber.org/net/metrics v1.3.0 // indirect
9294
go.uber.org/thriftrw v1.29.2 // indirect
9395
golang.org/x/arch v0.3.0 // indirect
94-
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
96+
golang.org/x/exp v0.0.0-20231127185646-65229373498e
9597
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
9698
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
97-
golang.org/x/mod v0.12.0 // indirect
98-
golang.org/x/sys v0.17.0 // indirect
99-
golang.org/x/text v0.14.0 // indirect
99+
golang.org/x/mod v0.17.0 // indirect
100+
golang.org/x/sys v0.24.0 // indirect
101+
golang.org/x/text v0.17.0 // indirect
100102
golang.org/x/time v0.3.0 // indirect
101-
golang.org/x/tools v0.13.0 // indirect
102-
google.golang.org/genproto v0.0.0-20230815205213-6bfd019c3878 // indirect
103-
google.golang.org/grpc v1.57.0 // indirect
104-
google.golang.org/protobuf v1.31.0 // indirect
103+
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
104+
google.golang.org/grpc v1.66.0 // indirect
105+
google.golang.org/protobuf v1.34.2 // indirect
105106
gopkg.in/yaml.v2 v2.4.0 // indirect
106107
honnef.co/go/tools v0.3.2 // indirect
107108
)

0 commit comments

Comments
 (0)