From f1d033508b1e54538e8eda1473eb1b5d75bfc480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Ca=C3=A7ador?= Date: Fri, 18 Oct 2024 20:25:26 +0100 Subject: [PATCH] IWF-206: Upgrade Temporal SDKs in iWF SDKs test envs (#83) --- integ/.env | 4 ++-- integ/docker-compose-init.sh | 30 +++++++++++++----------------- integ/docker-compose.yml | 5 +++-- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/integ/.env b/integ/.env index d41fe7a..ac50614 100644 --- a/integ/.env +++ b/integ/.env @@ -2,5 +2,5 @@ CASSANDRA_VERSION=3.11.9 ELASTICSEARCH_VERSION=7.16.2 MYSQL_VERSION=8 POSTGRESQL_VERSION=13 -TEMPORAL_VERSION=1.20.1 -TEMPORAL_UI_VERSION=2.10.1 \ No newline at end of file +TEMPORAL_VERSION=1.25 +TEMPORAL_UI_VERSION=2.31.2 \ No newline at end of file diff --git a/integ/docker-compose-init.sh b/integ/docker-compose-init.sh index d7e2d82..a6f58e0 100755 --- a/integ/docker-compose-init.sh +++ b/integ/docker-compose-init.sh @@ -1,12 +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 @@ -16,31 +12,31 @@ 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 + 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" break fi done -tctl namespace register default -tail -f /dev/null +tail -f /dev/null \ No newline at end of file diff --git a/integ/docker-compose.yml b/integ/docker-compose.yml index 962caf4..8430f95 100644 --- a/integ/docker-compose.yml +++ b/integ/docker-compose.yml @@ -33,7 +33,7 @@ services: - postgresql - elasticsearch environment: - - DB=postgresql + - DB=postgres12 - DB_PORT=5432 - POSTGRES_USER=temporal - POSTGRES_PWD=temporal @@ -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: @@ -63,7 +64,7 @@ services: stdin_open: true tty: true volumes: - - ./docker-compose-init.sh:/etc/temporal/init.sh + - ./docker-compose-init.sh:/etc/temporal/init.sh entrypoint: sh -c "/etc/temporal/init.sh" iwf-server: container_name: iwf-server