Skip to content

Commit

Permalink
TEMPORARY Revert "chore!: Removed Mongo 4.4. support and added 7.0 (#…
Browse files Browse the repository at this point in the history
…32162)"

This reverts commit 0edded1.
  • Loading branch information
ggazzo committed Sep 16, 2024
1 parent fcd8105 commit abe1570
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 36 deletions.
13 changes: 0 additions & 13 deletions .changeset/fair-seahorses-laugh.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fluffy-knives-count.md

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
transporter:
type: string
mongodb-version:
default: "['5.0', '7.0']"
default: "['4.4', '6.0']"
required: false
type: string
release:
Expand Down Expand Up @@ -80,16 +80,16 @@ jobs:
test:
runs-on: ubuntu-20.04
env:
RC_DOCKERFILE: ${{ matrix.mongodb-version == '7.0' && inputs.rc-dockerfile-alpine || inputs.rc-dockerfile }}
RC_DOCKER_TAG: ${{ matrix.mongodb-version == '7.0' && inputs.rc-docker-tag-alpine || inputs.rc-docker-tag }}
RC_DOCKERFILE: ${{ matrix.mongodb-version == '6.0' && inputs.rc-dockerfile-alpine || inputs.rc-dockerfile }}
RC_DOCKER_TAG: ${{ matrix.mongodb-version == '6.0' && inputs.rc-docker-tag-alpine || inputs.rc-docker-tag }}

strategy:
fail-fast: false
matrix:
mongodb-version: ${{ fromJSON(inputs.mongodb-version) }}
shard: ${{ fromJSON(inputs.shard) }}

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

steps:
- name: Collect Workflow Telemetry
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
fi;
curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \
"{\"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\"}" \
"{\"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\"}" \
https://releases.rocket.chat/update
packages-build:
Expand Down Expand Up @@ -369,7 +369,7 @@ jobs:
release: ee
transporter: 'nats://nats:4222'
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
mongodb-version: "['5.0']"
mongodb-version: "['4.4']"
node-version: ${{ needs.release-versions.outputs.node-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
Expand All @@ -393,7 +393,7 @@ jobs:
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
shard: '[1, 2, 3, 4, 5]'
total-shard: 5
mongodb-version: "['5.0']"
mongodb-version: "['4.4']"
node-version: ${{ needs.release-versions.outputs.node-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
Expand Down Expand Up @@ -423,7 +423,7 @@ jobs:
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
shard: '[1, 2, 3, 4, 5]'
total-shard: 5
mongodb-version: "['7.0']"
mongodb-version: "['6.0']"
node-version: ${{ needs.release-versions.outputs.node-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
Expand Down Expand Up @@ -806,7 +806,7 @@ jobs:
fi;
curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \
"{\"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\"}" \
"{\"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\"}" \
https://releases.rocket.chat/update
# Makes build fail if the release isn't there
Expand Down
10 changes: 5 additions & 5 deletions apps/meteor/server/startup/serverRunning.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Meteor.startup(async () => {
exitIfNotBypassed(process.env.BYPASS_NODEJS_VALIDATION);
}

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

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

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

Expand Down
8 changes: 4 additions & 4 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ services:
- 'host.docker.internal:host-gateway'
depends_on:
- nats

queue-worker-service:
platform: linux/amd64
build:
Expand All @@ -128,7 +128,7 @@ services:
- 'host.docker.internal:host-gateway'
depends_on:
- nats

omnichannel-transcript-service:
platform: linux/amd64
build:
Expand All @@ -144,9 +144,9 @@ services:
- 'host.docker.internal:host-gateway'
depends_on:
- nats

mongo:
image: docker.io/bitnami/mongodb:7.0
image: docker.io/bitnami/mongodb:4.4
restart: on-failure
environment:
MONGODB_REPLICA_SET_MODE: primary
Expand Down

0 comments on commit abe1570

Please sign in to comment.