From 5b163199118a97d2f81bee1b0a642364353382ef Mon Sep 17 00:00:00 2001 From: guzzijones12 Date: Mon, 9 Sep 2024 13:51:22 -0400 Subject: [PATCH 1/6] mongodb 7 uses `mongosh` not `mongo` --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 653e3bad92..b06a9dac78 100644 --- a/Makefile +++ b/Makefile @@ -821,7 +821,7 @@ unit-tests: requirements .unit-tests @echo "==================== tests ====================" @echo @echo "----- Dropping st2-test db -----" - @mongo st2-test --eval "db.dropDatabase();" + @mongosh st2-test --eval "db.dropDatabase();" @failed=0; \ for component in $(COMPONENTS_TEST); do\ echo "==========================================================="; \ @@ -847,7 +847,7 @@ endif @echo "==================== unit tests with coverage ====================" @echo @echo "----- Dropping st2-test db -----" - @mongo st2-test --eval "db.dropDatabase();" + @mongosh st2-test --eval "db.dropDatabase();" failed=0; \ for component in $(COMPONENTS_TEST); do\ echo "==========================================================="; \ @@ -908,7 +908,7 @@ itests: requirements .itests @echo "==================== integration tests ====================" @echo @echo "----- Dropping st2-test db -----" - @mongo st2-test --eval "db.dropDatabase();" + @mongosh st2-test --eval "db.dropDatabase();" @failed=0; \ for component in $(COMPONENTS_TEST); do\ echo "==========================================================="; \ @@ -932,7 +932,7 @@ endif @echo "================ integration tests with coverage ================" @echo @echo "----- Dropping st2-test db -----" - @mongo st2-test --eval "db.dropDatabase();" + @mongosh st2-test --eval "db.dropDatabase();" @failed=0; \ for component in $(COMPONENTS_TEST); do\ echo "==========================================================="; \ @@ -1073,7 +1073,7 @@ runners-tests: requirements .runners-tests @echo "==================== runners-tests ====================" @echo @echo "----- Dropping st2-test db -----" - @mongo st2-test --eval "db.dropDatabase();" + @mongosh st2-test --eval "db.dropDatabase();" @failed=0; \ for component in $(COMPONENTS_RUNNERS); do\ echo "==========================================================="; \ From d3b5bbd6140c883094a381118b0f31fca356e224 Mon Sep 17 00:00:00 2001 From: guzzijones12 Date: Tue, 10 Sep 2024 11:19:10 -0400 Subject: [PATCH 2/6] gha: use mongo7 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 35187cc7de..93b8b7a2cf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -288,7 +288,7 @@ jobs: # nosetests_node_ index: 0 services: mongo: - image: mongo:4.4 + image: mongo:7.0 ports: - 27017:27017 redis: From ad751db9d4fce0557e8aa796ed66fa8ded3f319d Mon Sep 17 00:00:00 2001 From: guzzijones12 Date: Wed, 11 Sep 2024 13:11:13 -0400 Subject: [PATCH 3/6] mongo 7 --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 93b8b7a2cf..13c500d354 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -120,7 +120,7 @@ jobs: python-version: '3.8.14' services: mongo: - image: mongo:4.4 + image: mongo:7.0 ports: - 27017:27017 @@ -453,7 +453,7 @@ jobs: python-version: '3.9.14' services: mongo: - image: mongo:4.4 + image: mongo:7.0 ports: - 27017:27017 From 7c0b0ee55c9bb588e83f9d802eae90786fd2438f Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Thu, 19 Sep 2024 09:48:17 -0500 Subject: [PATCH 4/6] gha: use mongo 7 --- .github/workflows/microbenchmarks.yaml | 2 +- .github/workflows/orquesta-integration-tests.yaml | 2 +- .github/workflows/test.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/microbenchmarks.yaml b/.github/workflows/microbenchmarks.yaml index 667a252a94..2c05fadb74 100644 --- a/.github/workflows/microbenchmarks.yaml +++ b/.github/workflows/microbenchmarks.yaml @@ -48,7 +48,7 @@ jobs: python-version: '3.9.14' services: mongo: - image: mongo:4.4 + image: mongo:7.0 ports: - 27017:27017 diff --git a/.github/workflows/orquesta-integration-tests.yaml b/.github/workflows/orquesta-integration-tests.yaml index fe3e855fc3..045efca886 100644 --- a/.github/workflows/orquesta-integration-tests.yaml +++ b/.github/workflows/orquesta-integration-tests.yaml @@ -69,7 +69,7 @@ jobs: python-version: '3.9.14' services: mongo: - image: mongo:4.4 + image: mongo:7.0 ports: - 27017:27017 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4ec93d2f56..5bfb2b3815 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -41,7 +41,7 @@ jobs: services: mongo: - image: mongo:4.4 + image: mongo:7.0 ports: - 27017:27017 From d6ddfd3e8a46e02c6834d71679f3a6bef464f406 Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Thu, 19 Sep 2024 09:53:25 -0500 Subject: [PATCH 5/6] gha: use same approach for redis container start This makes the orquesta workflow consistent with ci workflow changes added in #6245 --- .../workflows/orquesta-integration-tests.yaml | 35 +++++++------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/.github/workflows/orquesta-integration-tests.yaml b/.github/workflows/orquesta-integration-tests.yaml index 045efca886..9bde1b2488 100644 --- a/.github/workflows/orquesta-integration-tests.yaml +++ b/.github/workflows/orquesta-integration-tests.yaml @@ -82,21 +82,18 @@ jobs: - 5672:5672/tcp # AMQP standard port - 15672:15672/tcp # Management: HTTP, CLI - # Used for the coordination backend for integration tests - # NOTE: To speed things up, we only start redis for integration tests - # where it's needed - # redis: - # # Docker Hub image - # image: redis - # # Set health checks to wait until redis has started - # options: >- - # --name "redis" - # --health-cmd "redis-cli ping" - # --health-interval 10s - # --health-timeout 5s - # --health-retries 5 - # ports: - # - 6379:6379/tcp + redis: + # Docker Hub image + image: redis + # Set health checks to wait until redis has started + options: >- + --name "redis" + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 6379:6379/tcp env: TASK: '${{ matrix.task }}' @@ -147,11 +144,6 @@ jobs: cp conf/st2.dev.conf "${ST2_CONF}" ; sed -i -e "s/stanley/${ST2_CI_USER}/" "${ST2_CONF}" sudo -E ./scripts/ci/add-itest-user-key.sh - - name: Run Redis Service Container - timeout-minutes: 2 - run: | - docker run --rm --detach -p 127.0.0.1:6379:6379/tcp --name redis redis:latest - until [ "$(docker inspect -f {{.State.Running}} redis)" == "true" ]; do sleep 0.1; done - name: Permissions Workaround run: | echo "$ST2_CI_REPO_PATH" @@ -194,9 +186,6 @@ jobs: name: logs-py${{ matrix.python-version }} path: logs.tar.gz retention-days: 7 - - name: Stop Redis Service Container - if: "${{ always() }}" - run: docker rm --force redis || true slack-notification: name: Slack notification for failed master builds From 69bb0a4fcb742c209b18716aa97b390c4ea511e1 Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Thu, 19 Sep 2024 09:57:50 -0500 Subject: [PATCH 6/6] add changelog entry --- CHANGELOG.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9c7667727d..61477d5073 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,8 @@ in development Python 3.6 is no longer supported; Stackstorm requires at least Python 3.8. +Newer MongoDB versions are now supported. CI uses MongoDB 7.0. + Several st2.conf database options have been renamed or deprecated. Most of the options will continue to work using their old name. However, if you use `[database].ssl_keyfile` and/or `[database].ssl_certfile`, you MUST migrate to `[database].tls_certificate_key_file`. This new option expects the key and certificate in the same file. Use something like the following to create that file from your old files: @@ -54,6 +56,9 @@ Changed * Update mongoengine to 0.29 and pymongo to 4.6.3. The pymongo bump (from 3.x to 4.x) is a major update. #6252 Contributed by @cognifloyd +* Update CI from testing with mongo 4.4 to testing with MongoDB 7.0. #6246 + Contributed by @guzzijones + Added ~~~~~ * Continue introducing `pants `_ to improve DX (Developer Experience)