Skip to content

Commit d070f7d

Browse files
ggazzosampaiodiego
andcommittedOct 17, 2024
chore!: Removed Mongo 4.4. support and added 7.0 (RocketChat#32162)
Co-authored-by: Diego Sampaio <[email protected]>
1 parent d9a9d0d commit d070f7d

File tree

6 files changed

+36
-18
lines changed

6 files changed

+36
-18
lines changed
 

‎.changeset/fair-seahorses-laugh.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'@rocket.chat/meteor': major
3+
---
4+
5+
As per MongoDB Lifecycle Schedules ([mongodb.com/legal/support-policy/lifecycles](https://www.mongodb.com/legal/support-policy/lifecycles)) we're removing official support to MongoDB version 4.4 that has reached end of life in February 2024.
6+
7+
We recommend upgrading to at least MongoDB 6.0+, though 5.0 is still a supported version.
8+
9+
Here are official docs on how to upgrade to some of the supported versions:
10+
11+
- [mongodb.com/docs/manual/release-notes/5.0-upgrade-replica-set](https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-replica-set/)
12+
- [mongodb.com/docs/manual/release-notes/6.0-upgrade-replica-set](https://www.mongodb.com/docs/manual/release-notes/6.0-upgrade-replica-set/)
13+
- [mongodb.com/docs/manual/release-notes/7.0-upgrade-replica-set](https://www.mongodb.com/docs/manual/release-notes/7.0-upgrade-replica-set/)

‎.changeset/fluffy-knives-count.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rocket.chat/meteor": major
3+
---
4+
5+
Added MongoDB 7.0 support

‎.github/workflows/ci-test-e2e.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
transporter:
3333
type: string
3434
mongodb-version:
35-
default: "['4.4', '6.0']"
35+
default: "['5.0', '7.0']"
3636
required: false
3737
type: string
3838
release:
@@ -83,16 +83,16 @@ jobs:
8383
test:
8484
runs-on: ubuntu-20.04
8585
env:
86-
RC_DOCKERFILE: ${{ matrix.mongodb-version == '6.0' && inputs.rc-dockerfile-alpine || inputs.rc-dockerfile }}
87-
RC_DOCKER_TAG: ${{ matrix.mongodb-version == '6.0' && inputs.rc-docker-tag-alpine || inputs.rc-docker-tag }}
86+
RC_DOCKERFILE: ${{ matrix.mongodb-version == '7.0' && inputs.rc-dockerfile-alpine || inputs.rc-dockerfile }}
87+
RC_DOCKER_TAG: ${{ matrix.mongodb-version == '7.0' && inputs.rc-docker-tag-alpine || inputs.rc-docker-tag }}
8888

8989
strategy:
9090
fail-fast: false
9191
matrix:
9292
mongodb-version: ${{ fromJSON(inputs.mongodb-version) }}
9393
shard: ${{ fromJSON(inputs.shard) }}
9494

95-
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'true' && ' [no watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '6.0' && ' - Alpine' || '' }}
95+
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'true' && ' [no watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '7.0' && ' - Alpine' || '' }}
9696

9797
steps:
9898
- name: Collect Workflow Telemetry

‎.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
fi;
128128
129129
curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \
130-
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"4.4\", \"5.0\", \"6.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"draft\", \"draftAs\": \"$RC_RELEASE\"}" \
130+
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"5.0\", \"6.0\", \"7.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"draft\", \"draftAs\": \"$RC_RELEASE\"}" \
131131
https://releases.rocket.chat/update
132132
133133
packages-build:
@@ -428,7 +428,7 @@ jobs:
428428
release: ee
429429
transporter: 'nats://nats:4222'
430430
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
431-
mongodb-version: "['4.4']"
431+
mongodb-version: "['5.0']"
432432
node-version: ${{ needs.release-versions.outputs.node-version }}
433433
deno-version: ${{ needs.release-versions.outputs.deno-version }}
434434
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
@@ -453,7 +453,7 @@ jobs:
453453
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
454454
shard: '[1, 2, 3, 4, 5]'
455455
total-shard: 5
456-
mongodb-version: "['4.4']"
456+
mongodb-version: "['5.0']"
457457
node-version: ${{ needs.release-versions.outputs.node-version }}
458458
deno-version: ${{ needs.release-versions.outputs.deno-version }}
459459
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
@@ -484,7 +484,7 @@ jobs:
484484
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
485485
shard: '[1, 2, 3, 4, 5]'
486486
total-shard: 5
487-
mongodb-version: "['6.0']"
487+
mongodb-version: "['7.0']"
488488
node-version: ${{ needs.release-versions.outputs.node-version }}
489489
deno-version: ${{ needs.release-versions.outputs.deno-version }}
490490
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
@@ -869,7 +869,7 @@ jobs:
869869
fi;
870870
871871
curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \
872-
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"4.4\", \"5.0\", \"6.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \
872+
"{\"nodeVersion\": \"${{ needs.release-versions.outputs.node-version }}\", \"compatibleMongoVersions\": [\"5.0\", \"6.0\", \"7.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \
873873
https://releases.rocket.chat/update
874874
875875
# Makes build fail if the release isn't there

‎apps/meteor/server/startup/serverRunning.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Meteor.startup(async () => {
7878
exitIfNotBypassed(process.env.BYPASS_NODEJS_VALIDATION);
7979
}
8080

81-
if (!semver.satisfies(semver.coerce(mongoVersion), '>=4.4.0')) {
82-
msg += ['', '', 'YOUR CURRENT MONGODB VERSION IS NOT SUPPORTED,', 'PLEASE UPGRADE TO VERSION 4.4 OR LATER'].join('\n');
81+
if (semver.satisfies(semver.coerce(mongoVersion), '<5.0.0')) {
82+
msg += ['', '', 'YOUR CURRENT MONGODB VERSION IS NOT SUPPORTED,', 'PLEASE UPGRADE TO VERSION 5.0 OR LATER'].join('\n');
8383
showErrorBox('SERVER ERROR', msg);
8484

8585
exitIfNotBypassed(process.env.BYPASS_MONGO_VALIDATION);
@@ -88,11 +88,11 @@ Meteor.startup(async () => {
8888
showSuccessBox('SERVER RUNNING', msg);
8989

9090
// Deprecation
91-
if (!skipMongoDbDeprecationCheck && !semver.satisfies(semver.coerce(mongoVersion), '>=5.0.0')) {
91+
if (!skipMongoDbDeprecationCheck && semver.satisfies(semver.coerce(mongoVersion), '<6.0.0')) {
9292
msg = [
9393
`YOUR CURRENT MONGODB VERSION (${mongoVersion}) IS DEPRECATED.`,
94-
'IT WILL NOT BE SUPPORTED ON ROCKET.CHAT VERSION 7.0.0 AND GREATER,',
95-
'PLEASE UPGRADE MONGODB TO VERSION 5.0 OR GREATER',
94+
'IT WILL NOT BE SUPPORTED ON ROCKET.CHAT VERSION 8.0.0 AND GREATER,',
95+
'PLEASE UPGRADE MONGODB TO VERSION 6.0 OR GREATER',
9696
].join('\n');
9797
showWarningBox('DEPRECATION', msg);
9898

‎docker-compose-local.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ services:
112112
- 'host.docker.internal:host-gateway'
113113
depends_on:
114114
- nats
115-
115+
116116
queue-worker-service:
117117
platform: linux/amd64
118118
build:
@@ -128,7 +128,7 @@ services:
128128
- 'host.docker.internal:host-gateway'
129129
depends_on:
130130
- nats
131-
131+
132132
omnichannel-transcript-service:
133133
platform: linux/amd64
134134
build:
@@ -144,9 +144,9 @@ services:
144144
- 'host.docker.internal:host-gateway'
145145
depends_on:
146146
- nats
147-
147+
148148
mongo:
149-
image: docker.io/bitnami/mongodb:4.4
149+
image: docker.io/bitnami/mongodb:7.0
150150
restart: on-failure
151151
environment:
152152
MONGODB_REPLICA_SET_MODE: primary

0 commit comments

Comments
 (0)
Please sign in to comment.