Skip to content

Commit

Permalink
IWF-206: Upgrade Temporal SDKs in iWF SDKs test envs (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel27m authored Oct 18, 2024
1 parent 474beb0 commit 6bb4a00
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions script/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ CASSANDRA_VERSION=3.11.9
ELASTICSEARCH_VERSION=7.16.2
MYSQL_VERSION=8
POSTGRESQL_VERSION=13
TEMPORAL_VERSION=1.21.4
TEMPORAL_UI_VERSION=2.18.0
TEMPORAL_VERSION=1.25
TEMPORAL_UI_VERSION=2.31.2
24 changes: 11 additions & 13 deletions script/docker-compose-init.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#!/bin/bash

# use new version of tctl so that we can skip the prompt
tctl config set version next

checkExists () {
# see https://github.com/temporalio/temporal/issues/4160
if tctl search-attribute list | grep -q "$1"; then
if temporal operator search-attribute list | grep -q "$1"; then
return 0
else
return 1
Expand All @@ -15,23 +12,24 @@ fi
echo "now trying to register iWF system search attributes..."
for run in {1..120}; do
sleep 1
tctl search-attribute create -name IwfWorkflowType -type Keyword -y
temporal operator search-attribute create --name IwfWorkflowType --type Keyword
sleep 0.1
temporal operator search-attribute create --name IwfGlobalWorkflowVersion --type Int
sleep 0.1
tctl search-attribute create -name IwfGlobalWorkflowVersion -type Int -y
temporal operator search-attribute create --name IwfExecutingStateIds --type KeywordList
sleep 0.1
tctl search-attribute create -name IwfExecutingStateIds -type Keyword -y
temporal operator search-attribute create --name CustomKeywordField --type Keyword
sleep 0.1
tctl search-attribute create -name CustomKeywordField -type Keyword -y
temporal operator search-attribute create --name CustomIntField --type Int
sleep 0.1
tctl search-attribute create -name CustomIntField -type Int -y
temporal operator search-attribute create --name CustomBoolField --type Bool
sleep 0.1
tctl search-attribute create -name CustomBoolField -type Bool -y
temporal operator search-attribute create --name CustomDoubleField --type Double
sleep 0.1
tctl search-attribute create -name CustomDoubleField -type Double -y
temporal operator search-attribute create --name CustomDatetimeField --type Datetime
sleep 0.1
tctl search-attribute create -name CustomDatetimeField -type Datetime -y
temporal operator search-attribute create --name CustomStringField --type Text
sleep 0.1
tctl search-attribute create -name CustomStringField -type text -y

if checkExists "IwfWorkflowType" && checkExists "IwfGlobalWorkflowVersion" && checkExists "IwfExecutingStateIds" && checkExists "CustomKeywordField" && checkExists "CustomIntField" && checkExists "CustomBoolField" && checkExists "CustomDoubleField" && checkExists "CustomDatetimeField" && checkExists "CustomStringField"; then
echo "All search attributes are registered"
Expand Down
3 changes: 2 additions & 1 deletion script/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
- postgresql
- elasticsearch
environment:
- DB=postgresql
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=temporal
- POSTGRES_PWD=temporal
Expand All @@ -56,6 +56,7 @@ services:
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CLI_ADDRESS=temporal:7233
image: temporalio/admin-tools:${TEMPORAL_VERSION}
networks:
Expand Down

0 comments on commit 6bb4a00

Please sign in to comment.