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] Removed support of MongoDB 3.4; Deprecated MongoDB 3.6 and 4.0 #22907

Merged
merged 26 commits into from Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b49a3d0
removed support of mongoDB 3.6 and deprecated mongoDB 3.6 and 4.0
ostjen Aug 11, 2021
073ee63
ci update
ostjen Aug 11, 2021
246a4ab
reverted mongoDBVersion and added mongodb 5.0 to the matrix
ostjen Aug 11, 2021
e853390
reverted changes on sessions.tests
ostjen Aug 11, 2021
0d12be6
run unit tests w/ mongo 5.0
ostjen Aug 12, 2021
8efe153
try to run unit tests w/ mongo versions matrix
ostjen Aug 12, 2021
1dbc087
fix typo
ostjen Aug 12, 2021
01366a5
testunit w/ mongo matrix w/o replicaset
ostjen Aug 12, 2021
c41909b
rollback to mongodb 4.0 for testunit
ostjen Aug 12, 2021
30e247c
mongo matrix w/ 1 element for testunit
ostjen Aug 12, 2021
2381cef
trying to fix mongoError:not master
ostjen Aug 12, 2021
f7e229e
removed replSet from matrix
ostjen Aug 12, 2021
42ddd9a
optimized groups.listAll
ostjen Aug 16, 2021
a3ecef8
Revert "optimized groups.listAll"
ostjen Aug 16, 2021
9abd60a
Merge branch 'develop' into mongoDeprecation
ostjen Sep 10, 2021
8de327c
eslint fix
ostjen Sep 10, 2021
f3811a3
Merge branch 'develop' into mongoDeprecation
ostjen Sep 17, 2021
192ef20
Merge branch 'develop' into mongoDeprecation
ostjen Sep 17, 2021
8bbf573
Merge remote-tracking branch 'origin/develop' into mongoDeprecation
rodrigok Sep 20, 2021
0c561c4
Fix unit tests on other mongodb versions
rodrigok Sep 21, 2021
c5f0a5f
Merge remote-tracking branch 'origin/develop' into mongoDeprecation
rodrigok Sep 21, 2021
6f50feb
@types/uuid
ostjen Sep 21, 2021
fb6b38a
package-lock update
ostjen Sep 21, 2021
5c62efc
Merge branch 'develop' into mongoDeprecation
ostjen Sep 21, 2021
10306aa
Move unit testint together with e2e testing to reuse database
rodrigok Sep 21, 2021
a55986e
Add logs about mongodb version on unit test
rodrigok Sep 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 5 additions & 9 deletions .github/workflows/build_and_test.yml
Expand Up @@ -117,13 +117,6 @@ jobs:

- run: meteor npm run translation-check

- name: Launch MongoDB
uses: wbari/start-mongoDB@v0.2
with:
mongoDBVersion: "4.0"

- run: meteor npm run testunit

- run: meteor npm run typecheck

- name: Build Storybook to sanity check components
Expand Down Expand Up @@ -192,7 +185,7 @@ jobs:
strategy:
matrix:
node-version: ["12.22.1"]
mongodb-version: ["3.4", "3.6", "4.0", "4.2"]
mongodb-version: ["3.6", "4.0", "4.2", "4.4","5.0"]

steps:
- name: Launch MongoDB
Expand Down Expand Up @@ -249,7 +242,10 @@ jobs:
run: |
npm install

- name: Test
- name: Unit Test
run: npm run testunit

- name: E2E Test
env:
TEST_MODE: "true"
MONGO_URL: mongodb://localhost:27017/rocketchat
Expand Down
32 changes: 28 additions & 4 deletions app/models/server/models/Sessions.js
Expand Up @@ -20,10 +20,6 @@ export const aggregates = {
day: { $lte: day },
}],
},
}, {
$sort: {
_id: 1,
},
}, {
$project: {
userId: 1,
Expand Down Expand Up @@ -51,6 +47,10 @@ export const aggregates = {
time: { $sum: '$time' },
sessions: { $sum: 1 },
},
}, {
$sort: {
time: -1,
},
}, {
$group: {
_id: {
Expand All @@ -70,6 +70,10 @@ export const aggregates = {
},
},
},
}, {
$sort: {
_id: 1,
},
}, {
$project: {
_id: 0,
Expand Down Expand Up @@ -183,6 +187,10 @@ export const aggregates = {
$sum: '$time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$group: {
_id: 1,
Expand Down Expand Up @@ -312,6 +320,10 @@ export const aggregates = {
$sum: '$devices.time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$project: {
_id: 0,
Expand Down Expand Up @@ -348,6 +360,10 @@ export const aggregates = {
$sum: '$devices.time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$project: {
_id: 0,
Expand Down Expand Up @@ -384,6 +400,10 @@ export const aggregates = {
$sum: '$devices.time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$project: {
_id: 0,
Expand Down Expand Up @@ -421,6 +441,10 @@ export const aggregates = {
$sum: '$devices.time',
},
},
}, {
$sort: {
time: -1,
},
}, {
$project: {
_id: 0,
Expand Down