feat: add support for MongoDB 6 (#8242)

This commit is contained in:
Manuel
2022-10-17 19:21:32 +02:00
committed by GitHub
parent 4af13af991
commit aba0081ce1
5 changed files with 16 additions and 10 deletions

View File

@@ -146,6 +146,11 @@ jobs:
MONGODB_TOPOLOGY: replicaset MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 18.1.0 NODE_VERSION: 18.1.0
- name: MongoDB 6, ReplicaSet, WiredTiger
MONGODB_VERSION: 6.0.2
MONGODB_TOPOLOGY: replicaset
MONGODB_STORAGE_ENGINE: wiredTiger
NODE_VERSION: 18.1.0
- name: Redis Cache - name: Redis Cache
PARSE_SERVER_TEST_CACHE: redis PARSE_SERVER_TEST_CACHE: redis
MONGODB_VERSION: 4.4.13 MONGODB_VERSION: 4.4.13

View File

@@ -8,7 +8,7 @@
[![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases) [![auto-release](https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg)](https://github.com/parse-community/parse-dashboard/releases)
[![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16,_17,_18-green.svg?logo=node.js&style=flat)](https://nodejs.org) [![Node Version](https://img.shields.io/badge/nodejs-12,_14,_16,_17,_18-green.svg?logo=node.js&style=flat)](https://nodejs.org)
[![MongoDB Version](https://img.shields.io/badge/mongodb-4.0,_4.2,_4.4,_5.0,_5.1,_5.2-green.svg?logo=mongodb&style=flat)](https://www.mongodb.com) [![MongoDB Version](https://img.shields.io/badge/mongodb-4.0,_4.2,_4.4,_5.0,_5.1,_5.2,_6-green.svg?logo=mongodb&style=flat)](https://www.mongodb.com)
[![Postgres Version](https://img.shields.io/badge/postgresql-11,_12,_13,_14,_15-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org) [![Postgres Version](https://img.shields.io/badge/postgresql-11,_12,_13,_14,_15-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org)
[![npm latest version](https://img.shields.io/npm/v/parse-server/latest.svg)](https://www.npmjs.com/package/parse-server) [![npm latest version](https://img.shields.io/npm/v/parse-server/latest.svg)](https://www.npmjs.com/package/parse-server)
@@ -142,7 +142,7 @@ Parse Server is continuously tested with the most recent releases of MongoDB to
| MongoDB 4.2 | 4.2.19 | April 2023 | ✅ Yes | | MongoDB 4.2 | 4.2.19 | April 2023 | ✅ Yes |
| MongoDB 4.4 | 4.4.13 | February 2024 | ✅ Yes | | MongoDB 4.4 | 4.4.13 | February 2024 | ✅ Yes |
| MongoDB 5.3 | 5.3.2 | October 2024 | ✅ Yes | | MongoDB 5.3 | 5.3.2 | October 2024 | ✅ Yes |
| MongoDB 6.0 | - | July 2025 | ❌ Not tested | | MongoDB 6 | 6.0.2 | July 2025 | ✅ Yes |
#### PostgreSQL #### PostgreSQL

View File

@@ -119,6 +119,7 @@
"test:mongodb:4.2.19": "npm run test:mongodb --dbversion=4.2.19", "test:mongodb:4.2.19": "npm run test:mongodb --dbversion=4.2.19",
"test:mongodb:4.4.13": "npm run test:mongodb --dbversion=4.4.13", "test:mongodb:4.4.13": "npm run test:mongodb --dbversion=4.4.13",
"test:mongodb:5.3.2": "npm run test:mongodb --dbversion=5.3.2", "test:mongodb:5.3.2": "npm run test:mongodb --dbversion=5.3.2",
"test:mongodb:6.0.2": "npm run test:mongodb --dbversion=6.0.2",
"posttest:mongodb": "mongodb-runner stop", "posttest:mongodb": "mongodb-runner stop",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner start", "pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} mongodb-runner start",
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 jasmine", "testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=5.3.2} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} MONGODB_STORAGE_ENGINE=${MONGODB_STORAGE_ENGINE:=wiredTiger} TESTING=1 jasmine",

View File

@@ -308,7 +308,7 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
await expectAsync(adapter.getClass('UnknownClass')).toBeRejectedWith(undefined); await expectAsync(adapter.getClass('UnknownClass')).toBeRejectedWith(undefined);
}); });
it_only_mongodb_version('<5.1')('should use index for caseInsensitive query', async () => { it_only_mongodb_version('<5.1>=6')('should use index for caseInsensitive query', async () => {
const user = new Parse.User(); const user = new Parse.User();
user.set('username', 'Bugs'); user.set('username', 'Bugs');
user.set('password', 'Bunny'); user.set('password', 'Bunny');
@@ -342,7 +342,7 @@ describe_only_db('mongo')('MongoStorageAdapter', () => {
expect(postIndexPlan.executionStats.executionStages.stage).toBe('FETCH'); expect(postIndexPlan.executionStats.executionStages.stage).toBe('FETCH');
}); });
it_only_mongodb_version('>=5.1')('should use index for caseInsensitive query', async () => { it_only_mongodb_version('>=5.1<6')('should use index for caseInsensitive query', async () => {
const user = new Parse.User(); const user = new Parse.User();
user.set('username', 'Bugs'); user.set('username', 'Bugs');
user.set('password', 'Bunny'); user.set('password', 'Bunny');

View File

@@ -27,7 +27,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
await TestUtils.destroyAllDataPermanently(false); await TestUtils.destroyAllDataPermanently(false);
}); });
it_only_mongodb_version('<5.1')('query find with hint string', async () => { it_only_mongodb_version('<5.1>=6')('query find with hint string', async () => {
const object = new TestObject(); const object = new TestObject();
await object.save(); await object.save();
@@ -39,7 +39,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
expect(explain.queryPlanner.winningPlan.inputStage.indexName).toBe('_id_'); expect(explain.queryPlanner.winningPlan.inputStage.indexName).toBe('_id_');
}); });
it_only_mongodb_version('>=5.1')('query find with hint string', async () => { it_only_mongodb_version('>=5.1<6')('query find with hint string', async () => {
const object = new TestObject(); const object = new TestObject();
await object.save(); await object.save();
@@ -50,7 +50,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
expect(explain.queryPlanner.winningPlan.queryPlan.inputStage.indexName).toBe('_id_'); expect(explain.queryPlanner.winningPlan.queryPlan.inputStage.indexName).toBe('_id_');
}); });
it_only_mongodb_version('<5.1')('query find with hint object', async () => { it_only_mongodb_version('<5.1>=6')('query find with hint object', async () => {
const object = new TestObject(); const object = new TestObject();
await object.save(); await object.save();
@@ -64,7 +64,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
}); });
}); });
it_only_mongodb_version('>=5.1')('query find with hint object', async () => { it_only_mongodb_version('>=5.1<6')('query find with hint object', async () => {
const object = new TestObject(); const object = new TestObject();
await object.save(); await object.save();
@@ -265,7 +265,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
expect(queryPlanner.winningPlan.queryPlan.inputStage.inputStage.keyPattern).toEqual({ _id: 1 }); expect(queryPlanner.winningPlan.queryPlan.inputStage.inputStage.keyPattern).toEqual({ _id: 1 });
}); });
it_only_mongodb_version('<5.1')('query find with hint (rest)', async () => { it_only_mongodb_version('<5.1>=6')('query find with hint (rest)', async () => {
const object = new TestObject(); const object = new TestObject();
await object.save(); await object.save();
let options = Object.assign({}, masterKeyOptions, { let options = Object.assign({}, masterKeyOptions, {
@@ -290,7 +290,7 @@ describe_only_db('mongo')('Parse.Query hint', () => {
expect(explain.queryPlanner.winningPlan.inputStage.inputStage.indexName).toBe('_id_'); expect(explain.queryPlanner.winningPlan.inputStage.inputStage.indexName).toBe('_id_');
}); });
it_only_mongodb_version('>=5.1')('query find with hint (rest)', async () => { it_only_mongodb_version('>=5.1<6')('query find with hint (rest)', async () => {
const object = new TestObject(); const object = new TestObject();
await object.save(); await object.save();
let options = Object.assign({}, masterKeyOptions, { let options = Object.assign({}, masterKeyOptions, {