From ea8163d0fe4400aaf1f4b4b56658a3d9908cab41 Mon Sep 17 00:00:00 2001 From: W Chan Date: Mon, 5 Oct 2020 02:46:59 +0000 Subject: [PATCH] Enable redis server as coordination backend for platform development A lot of workflow use cases that contain parallel branches, join task, and with items task require coordination service to be configured to be executed properly. For platform development, setup coordination service using redis server as backend by default to avoid confusion in troubleshooting and debugging workflows. --- .travis.yml | 7 ++++--- conf/st2.dev.conf | 2 +- test-requirements.txt | 10 +++++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 35b05ebec5..8c7450a22f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,15 +38,15 @@ jobs: # scripts/travis/run-nightly-make-task-if-exists.sh - name: "Unit Tests (Python 2.7 MongoDB 4.0)" python: 2.7 - env: TASK=ci-unit CACHE_NAME=py2 COMMAND_THRESHOLD=700 + env: TASK=ci-unit CACHE_NAME=py2 PYTHON_VERSION=python2.7 COMMAND_THRESHOLD=700 - name: "Integration Tests (Python 2.7)" python: 2.7 - env: TASK=ci-integration CACHE_NAME=py2 COMMAND_THRESHOLD=700 + env: TASK=ci-integration CACHE_NAME=py2 PYTHON_VERSION=python2.7 COMMAND_THRESHOLD=700 - name: "Lint Checks, Packs Tests (Python 3.6)" python: 3.6 - env: TASK="ci-checks ci-packs-tests" CACHE_NAME=py3 COMMAND_THRESHOLD=430 + env: TASK="ci-checks ci-packs-tests" CACHE_NAME=py3 PYTHON_VERSION=python3.6 COMMAND_THRESHOLD=430 - name: "Unit Tests, Pack Tests (Python 3.6)" python: 3.6 @@ -65,6 +65,7 @@ addons: - mongodb-org-server=4.0.* - mongodb-org-shell=4.0.* - rabbitmq-server + - redis-server - libffi-dev cache: diff --git a/conf/st2.dev.conf b/conf/st2.dev.conf index 08aa45870d..846b7f67d4 100644 --- a/conf/st2.dev.conf +++ b/conf/st2.dev.conf @@ -85,8 +85,8 @@ protocol = udp # - etcd3gw # Keep in mind that zake driver works in process so it won't work when testing cross process # / cross server functionality -#url = redis://localhost #url = kazoo://localhost +url = redis://127.0.0.1:6379 [webui] # webui_base_url = https://mywebhost.domain diff --git a/test-requirements.txt b/test-requirements.txt index 7ae5272c22..895ca24de1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -28,9 +28,17 @@ webtest==2.0.25 rstcheck>=3.3.1,<3.4 tox==3.14.1 pyrabbit + # Since StackStorm v2.8.0 we now use cryptography instead of keyczar, but we still have some tests # which utilize keyczar and ensure new cryptography code is fully compatible with keyczar code # (those tests only run under Python 2.7 since keyczar doesn't support Python 3.x). # See https://github.com/StackStorm/st2/pull/4165 python-keyczar -pip-tools # For pip-compile, to check for version conflicts + +# For pip-compile, to check for version conflicts +pip-tools + +# A number of workflow use cases such as parallel branches, join, and with items task require +# coordination service to be setup. Redis server is used as the default backend for the +# coordination service. +redis