Skip to content

Commit e02aec0

Browse files
authored
Update from Mongo 4.4 to Mongo 7 in CI (#6246)
2 parents 3e952e7 + 69bb0a4 commit e02aec0

File tree

6 files changed

+28
-34
lines changed

6 files changed

+28
-34
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
python-version: '3.8.14'
121121
services:
122122
mongo:
123-
image: mongo:4.4
123+
image: mongo:7.0
124124
ports:
125125
- 27017:27017
126126

@@ -288,7 +288,7 @@ jobs:
288288
# nosetests_node_ index: 0
289289
services:
290290
mongo:
291-
image: mongo:4.4
291+
image: mongo:7.0
292292
ports:
293293
- 27017:27017
294294
redis:
@@ -453,7 +453,7 @@ jobs:
453453
python-version: '3.9.14'
454454
services:
455455
mongo:
456-
image: mongo:4.4
456+
image: mongo:7.0
457457
ports:
458458
- 27017:27017
459459

.github/workflows/microbenchmarks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
python-version: '3.9.14'
4949
services:
5050
mongo:
51-
image: mongo:4.4
51+
image: mongo:7.0
5252
ports:
5353
- 27017:27017
5454

.github/workflows/orquesta-integration-tests.yaml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
python-version: '3.9.14'
7070
services:
7171
mongo:
72-
image: mongo:4.4
72+
image: mongo:7.0
7373
ports:
7474
- 27017:27017
7575

@@ -82,21 +82,18 @@ jobs:
8282
- 5672:5672/tcp # AMQP standard port
8383
- 15672:15672/tcp # Management: HTTP, CLI
8484

85-
# Used for the coordination backend for integration tests
86-
# NOTE: To speed things up, we only start redis for integration tests
87-
# where it's needed
88-
# redis:
89-
# # Docker Hub image
90-
# image: redis
91-
# # Set health checks to wait until redis has started
92-
# options: >-
93-
# --name "redis"
94-
# --health-cmd "redis-cli ping"
95-
# --health-interval 10s
96-
# --health-timeout 5s
97-
# --health-retries 5
98-
# ports:
99-
# - 6379:6379/tcp
85+
redis:
86+
# Docker Hub image
87+
image: redis
88+
# Set health checks to wait until redis has started
89+
options: >-
90+
--name "redis"
91+
--health-cmd "redis-cli ping"
92+
--health-interval 10s
93+
--health-timeout 5s
94+
--health-retries 5
95+
ports:
96+
- 6379:6379/tcp
10097

10198
env:
10299
TASK: '${{ matrix.task }}'
@@ -147,11 +144,6 @@ jobs:
147144
cp conf/st2.dev.conf "${ST2_CONF}" ; sed -i -e "s/stanley/${ST2_CI_USER}/" "${ST2_CONF}"
148145
149146
sudo -E ./scripts/ci/add-itest-user-key.sh
150-
- name: Run Redis Service Container
151-
timeout-minutes: 2
152-
run: |
153-
docker run --rm --detach -p 127.0.0.1:6379:6379/tcp --name redis redis:latest
154-
until [ "$(docker inspect -f {{.State.Running}} redis)" == "true" ]; do sleep 0.1; done
155147
- name: Permissions Workaround
156148
run: |
157149
echo "$ST2_CI_REPO_PATH"
@@ -194,9 +186,6 @@ jobs:
194186
name: logs-py${{ matrix.python-version }}
195187
path: logs.tar.gz
196188
retention-days: 7
197-
- name: Stop Redis Service Container
198-
if: "${{ always() }}"
199-
run: docker rm --force redis || true
200189

201190
slack-notification:
202191
name: Slack notification for failed master builds

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
services:
4343
mongo:
44-
image: mongo:4.4
44+
image: mongo:7.0
4545
ports:
4646
- 27017:27017
4747

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ in development
66

77
Python 3.6 is no longer supported; Stackstorm requires at least Python 3.8.
88

9+
Newer MongoDB versions are now supported. CI uses MongoDB 7.0.
10+
911
Several st2.conf database options have been renamed or deprecated. Most of the options will continue to work using their old name.
1012
However, if you use `[database].ssl_keyfile` and/or `[database].ssl_certfile`, you MUST migrate to `[database].tls_certificate_key_file`.
1113
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
5456
* 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
5557
Contributed by @cognifloyd
5658

59+
* Update CI from testing with mongo 4.4 to testing with MongoDB 7.0. #6246
60+
Contributed by @guzzijones
61+
5762
Added
5863
~~~~~
5964
* Continue introducing `pants <https://www.pantsbuild.org/docs>`_ to improve DX (Developer Experience)

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ unit-tests: requirements .unit-tests
821821
@echo "==================== tests ===================="
822822
@echo
823823
@echo "----- Dropping st2-test db -----"
824-
@mongo st2-test --eval "db.dropDatabase();"
824+
@mongosh st2-test --eval "db.dropDatabase();"
825825
@failed=0; \
826826
for component in $(COMPONENTS_TEST); do\
827827
echo "==========================================================="; \
@@ -847,7 +847,7 @@ endif
847847
@echo "==================== unit tests with coverage ===================="
848848
@echo
849849
@echo "----- Dropping st2-test db -----"
850-
@mongo st2-test --eval "db.dropDatabase();"
850+
@mongosh st2-test --eval "db.dropDatabase();"
851851
failed=0; \
852852
for component in $(COMPONENTS_TEST); do\
853853
echo "==========================================================="; \
@@ -908,7 +908,7 @@ itests: requirements .itests
908908
@echo "==================== integration tests ===================="
909909
@echo
910910
@echo "----- Dropping st2-test db -----"
911-
@mongo st2-test --eval "db.dropDatabase();"
911+
@mongosh st2-test --eval "db.dropDatabase();"
912912
@failed=0; \
913913
for component in $(COMPONENTS_TEST); do\
914914
echo "==========================================================="; \
@@ -932,7 +932,7 @@ endif
932932
@echo "================ integration tests with coverage ================"
933933
@echo
934934
@echo "----- Dropping st2-test db -----"
935-
@mongo st2-test --eval "db.dropDatabase();"
935+
@mongosh st2-test --eval "db.dropDatabase();"
936936
@failed=0; \
937937
for component in $(COMPONENTS_TEST); do\
938938
echo "==========================================================="; \
@@ -1073,7 +1073,7 @@ runners-tests: requirements .runners-tests
10731073
@echo "==================== runners-tests ===================="
10741074
@echo
10751075
@echo "----- Dropping st2-test db -----"
1076-
@mongo st2-test --eval "db.dropDatabase();"
1076+
@mongosh st2-test --eval "db.dropDatabase();"
10771077
@failed=0; \
10781078
for component in $(COMPONENTS_RUNNERS); do\
10791079
echo "==========================================================="; \

0 commit comments

Comments
 (0)