Skip to content

Commit

Permalink
feat(NODE-3469,NODE-3615,NODE-3507): update min and max wire versions (
Browse files Browse the repository at this point in the history
  • Loading branch information
durran authored and dariakp committed Nov 2, 2021
1 parent 9435b30 commit 2a78d5a
Show file tree
Hide file tree
Showing 51 changed files with 634 additions and 709 deletions.
168 changes: 0 additions & 168 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -852,138 +852,6 @@ tasks:
VERSION: '3.6'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-3.4-server
tags:
- '3.4'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.4'
TOPOLOGY: server
- func: run tests
- name: test-3.4-replica_set
tags:
- '3.4'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.4'
TOPOLOGY: replica_set
- func: run tests
- name: test-3.4-sharded_cluster
tags:
- '3.4'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.4'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-3.2-server
tags:
- '3.2'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.2'
TOPOLOGY: server
- func: run tests
- name: test-3.2-replica_set
tags:
- '3.2'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.2'
TOPOLOGY: replica_set
- func: run tests
- name: test-3.2-sharded_cluster
tags:
- '3.2'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.2'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-3.0-server
tags:
- '3.0'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.0'
TOPOLOGY: server
- func: run tests
- name: test-3.0-replica_set
tags:
- '3.0'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.0'
TOPOLOGY: replica_set
- func: run tests
- name: test-3.0-sharded_cluster
tags:
- '3.0'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '3.0'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-2.6-server
tags:
- '2.6'
- server
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '2.6'
TOPOLOGY: server
- func: run tests
- name: test-2.6-replica_set
tags:
- '2.6'
- replica_set
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '2.6'
TOPOLOGY: replica_set
- func: run tests
- name: test-2.6-sharded_cluster
tags:
- '2.6'
- sharded_cluster
commands:
- func: install dependencies
- func: bootstrap mongo-orchestration
vars:
VERSION: '2.6'
TOPOLOGY: sharded_cluster
- func: run tests
- name: test-latest-server-v1-api
tags:
- latest
Expand Down Expand Up @@ -1810,18 +1678,6 @@ buildvariants:
- test-3.6-server
- test-3.6-replica_set
- test-3.6-sharded_cluster
- test-3.4-server
- test-3.4-replica_set
- test-3.4-sharded_cluster
- test-3.2-server
- test-3.2-replica_set
- test-3.2-sharded_cluster
- test-3.0-server
- test-3.0-replica_set
- test-3.0-sharded_cluster
- test-2.6-server
- test-2.6-replica_set
- test-2.6-sharded_cluster
- test-latest-server-v1-api
- test-atlas-connectivity
- test-atlas-data-lake
Expand Down Expand Up @@ -1891,18 +1747,6 @@ buildvariants:
- test-3.6-server
- test-3.6-replica_set
- test-3.6-sharded_cluster
- test-3.4-server
- test-3.4-replica_set
- test-3.4-sharded_cluster
- test-3.2-server
- test-3.2-replica_set
- test-3.2-sharded_cluster
- test-3.0-server
- test-3.0-replica_set
- test-3.0-sharded_cluster
- test-2.6-server
- test-2.6-replica_set
- test-2.6-sharded_cluster
- test-latest-server-v1-api
- test-atlas-connectivity
- test-atlas-data-lake
Expand Down Expand Up @@ -1973,18 +1817,6 @@ buildvariants:
- test-3.6-server
- test-3.6-replica_set
- test-3.6-sharded_cluster
- test-3.4-server
- test-3.4-replica_set
- test-3.4-sharded_cluster
- test-3.2-server
- test-3.2-replica_set
- test-3.2-sharded_cluster
- test-3.0-server
- test-3.0-replica_set
- test-3.0-sharded_cluster
- test-2.6-server
- test-2.6-replica_set
- test-2.6-sharded_cluster
- test-latest-server-v1-api
- test-atlas-data-lake
- test-ocsp-valid-cert-server-staples
Expand Down
6 changes: 3 additions & 3 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require('fs');
const yaml = require('js-yaml');

const LATEST_EFFECTIVE_VERSION = '5.0';
const MONGODB_VERSIONS = ['latest', '5.0', '4.4', '4.2', '4.0', '3.6', '3.4', '3.2', '3.0', '2.6'];
const MONGODB_VERSIONS = ['latest', '5.0', '4.4', '4.2', '4.0', '3.6'];
const NODE_VERSIONS = ['erbium', 'fermium'];
NODE_VERSIONS.sort();
const LOWEST_LTS = NODE_VERSIONS[0];
Expand Down Expand Up @@ -34,7 +34,7 @@ const OPERATING_SYSTEMS = [
clientEncryption: false // TODO(NODE-3401): Unskip when Windows no longer fails to launch mongocryptd occasionally
}
].map(osConfig => ({
mongoVersion: '>=2.6',
mongoVersion: '>=3.6',
nodeVersion: LOWEST_LTS,
auth: false, // TODO test auth?
clientEncryption: true,
Expand Down Expand Up @@ -484,7 +484,7 @@ OPERATING_SYSTEMS.forEach(
name: osName,
display_name: osDisplayName,
run_on,
mongoVersion = '>=2.6',
mongoVersion = '>=3.6',
nodeVersions = NODE_VERSIONS,
clientEncryption,
msvsVersion
Expand Down
8 changes: 4 additions & 4 deletions src/cmap/wire_protocol/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const MIN_SUPPORTED_SERVER_VERSION = '2.6';
export const MAX_SUPPORTED_SERVER_VERSION = '5.0';
export const MIN_SUPPORTED_WIRE_VERSION = 2;
export const MAX_SUPPORTED_WIRE_VERSION = 13;
export const MIN_SUPPORTED_SERVER_VERSION = '3.6';
export const MAX_SUPPORTED_SERVER_VERSION = '5.1';
export const MIN_SUPPORTED_WIRE_VERSION = 6;
export const MAX_SUPPORTED_WIRE_VERSION = 14;
export const OP_REPLY = 1;
export const OP_UPDATE = 2001;
export const OP_INSERT = 2002;
Expand Down
9 changes: 6 additions & 3 deletions src/operations/list_collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,17 @@ export class ListCollectionsOperation extends CommandOperation<string[]> {
return;
}

const command = {
return super.executeCommand(server, session, this.generateCommand(), callback);
}

/* This is here for the purpose of unit testing the final command that gets sent. */
generateCommand(): Document {
return {
listCollections: 1,
filter: this.filter,
cursor: this.batchSize ? { batchSize: this.batchSize } : {},
nameOnly: this.nameOnly
};

return super.executeCommand(server, session, command, callback);
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/functional/buffering_proxy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe.skip('Buffering Proxy', function () {
var electionIds = [new ObjectId(0), new ObjectId(1)];

// Default message fields
var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER, {
var defaultFields = Object.assign({}, mock.HELLO, {
setName: 'rs',
setVersion: 1,
electionId: electionIds[0],
Expand Down Expand Up @@ -252,7 +252,7 @@ describe.skip('Buffering Proxy', function () {
var electionIds = [new ObjectId(0), new ObjectId(1)];

// Default message fields
var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER, {
var defaultFields = Object.assign({}, mock.HELLO, {
setName: 'rs',
setVersion: 1,
electionId: electionIds[0],
Expand Down
4 changes: 2 additions & 2 deletions test/functional/change_stream.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ describe('Change Streams', function () {

ismaster() {
const uri = this.server.uri();
return Object.assign({}, mock.DEFAULT_ISMASTER_36, {
return Object.assign({}, mock.HELLO, {
ismaster: true,
secondary: false,
me: uri,
Expand Down Expand Up @@ -2828,7 +2828,7 @@ context('NODE-2626 - handle null changes without error', function () {
mockServer.setMessageHandler(req => {
const doc = req.document;
if (doc.ismaster || doc.hello) {
return req.reply(mock.DEFAULT_ISMASTER_36);
return req.reply(mock.HELLO);
}
if (doc.aggregate) {
return req.reply({
Expand Down
Loading

0 comments on commit 2a78d5a

Please sign in to comment.