From 4d99ef0165bbd1ce09c3731042035d29128cb26a Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 1 Jul 2022 22:59:44 -0300 Subject: [PATCH] [BREAK] Remove support to old MongoDB versions (#26098) Co-authored-by: Kevin Aleman Co-authored-by: Debdut Chakraborty --- .github/workflows/build_and_test.yml | 13 +++++++++---- apps/meteor/server/startup/serverRunning.js | 10 +++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 58a9c122b3e4..3aefec562102 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -72,6 +72,11 @@ jobs: echo "github.event_name: ${{ github.event_name }}" cat $GITHUB_EVENT_PATH + - name: Set Swap Space + uses: pierotofy/set-swap-space@master + with: + swap-size-gb: 4 + - uses: actions/checkout@v3 - name: Use Node.js 14.18.3 @@ -220,7 +225,7 @@ jobs: strategy: matrix: node-version: ['14.18.3'] - mongodb-version: ['3.6', '4.0', '4.2', '4.4', '5.0'] + mongodb-version: ['4.2', '4.4', '5.0'] steps: - name: Launch MongoDB @@ -379,13 +384,13 @@ jobs: strategy: matrix: node-version: ['14.18.3'] - mongodb-version: ['4.4'] + mongodb-version-ee: ['4.4'] steps: - name: Launch MongoDB uses: wbari/start-mongoDB@v0.2 with: - mongoDBVersion: ${{ matrix.mongodb-version }} --replSet=rs0 + mongoDBVersion: ${{ matrix.mongodb-version-ee }} --replSet=rs0 - name: Launch NATS run: sudo docker run --name nats -d -p 4222:4222 nats:2.4 @@ -753,7 +758,7 @@ jobs: aws s3 cp $ROCKET_DEPLOY_DIR/ s3://download.rocket.chat/build/ --recursive curl -H "Content-Type: application/json" -H "X-Update-Token: $UPDATE_TOKEN" -d \ - "{\"nodeVersion\": \"14.18.3\", \"compatibleMongoVersions\": [\"3.6\", \"4.0\", \"4.2\", \"4.4\", \"5.0\"], \"commit\": \"$GITHUB_SHA\", \"tag\": \"$RC_VERSION\", \"branch\": \"$GIT_BRANCH\", \"artifactName\": \"$ARTIFACT_NAME\", \"releaseType\": \"$RC_RELEASE\"}" \ + "{\"nodeVersion\": \"14.18.3\", \"compatibleMongoVersions\": [\"4.2\", \"4.4\", \"5.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 diff --git a/apps/meteor/server/startup/serverRunning.js b/apps/meteor/server/startup/serverRunning.js index 08918266e4e3..b9927895e258 100644 --- a/apps/meteor/server/startup/serverRunning.js +++ b/apps/meteor/server/startup/serverRunning.js @@ -72,8 +72,8 @@ Meteor.startup(function () { exitIfNotBypassed(process.env.BYPASS_NODEJS_VALIDATION); } - if (!semver.satisfies(semver.coerce(mongoVersion), '>=3.6.0')) { - msg += ['', '', 'YOUR CURRENT MONGODB VERSION IS NOT SUPPORTED,', 'PLEASE UPGRADE TO VERSION 3.6 OR LATER'].join('\n'); + if (!semver.satisfies(semver.coerce(mongoVersion), '>=4.2.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); @@ -82,11 +82,11 @@ Meteor.startup(function () { showSuccessBox('SERVER RUNNING', msg); // Deprecation - if (!semver.satisfies(semver.coerce(mongoVersion), '>=4.2.0')) { + if (!semver.satisfies(semver.coerce(mongoVersion), '>=4.4.0')) { msg = [ `YOUR CURRENT MONGODB VERSION (${mongoVersion}) IS DEPRECATED.`, - 'IT WILL NOT BE SUPPORTED ON ROCKET.CHAT VERSION 5.0.0 AND GREATER,', - 'PLEASE UPGRADE MONGODB TO VERSION 4.2 OR GREATER', + 'IT WILL NOT BE SUPPORTED ON ROCKET.CHAT VERSION 6.0.0 AND GREATER,', + 'PLEASE UPGRADE MONGODB TO VERSION 4.4 OR GREATER', ].join('\n'); showWarningBox('DEPRECATION', msg);