Skip to content

Commit

Permalink
[BREAK] Remove support to old MongoDB versions (#26098)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Aleman <kaleman960@gmail.com>
Co-authored-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
  • Loading branch information
3 people committed Jul 2, 2022
1 parent f1a3ab6 commit 4d99ef0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
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 @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit 4d99ef0

Please sign in to comment.