Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BREAK] Remove support to old MongoDB versions #26098

Merged
merged 9 commits into from
Jul 2, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,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 +379,13 @@ jobs:
strategy:
matrix:
node-version: ['14.18.3']
mongodb-version: ['4.4']
mongodb-version-ee: ['4.4']

steps:
- name: Launch MongoDB
uses: wbari/[email protected]
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 +753,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