Skip to content

Commit 2a78d5a

Browse files
durrandariakp
authored andcommitted
feat(NODE-3469,NODE-3615,NODE-3507): update min and max wire versions (#3014)
1 parent 9435b30 commit 2a78d5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+634
-709
lines changed

.evergreen/config.yml

-168
Original file line numberDiff line numberDiff line change
@@ -852,138 +852,6 @@ tasks:
852852
VERSION: '3.6'
853853
TOPOLOGY: sharded_cluster
854854
- func: run tests
855-
- name: test-3.4-server
856-
tags:
857-
- '3.4'
858-
- server
859-
commands:
860-
- func: install dependencies
861-
- func: bootstrap mongo-orchestration
862-
vars:
863-
VERSION: '3.4'
864-
TOPOLOGY: server
865-
- func: run tests
866-
- name: test-3.4-replica_set
867-
tags:
868-
- '3.4'
869-
- replica_set
870-
commands:
871-
- func: install dependencies
872-
- func: bootstrap mongo-orchestration
873-
vars:
874-
VERSION: '3.4'
875-
TOPOLOGY: replica_set
876-
- func: run tests
877-
- name: test-3.4-sharded_cluster
878-
tags:
879-
- '3.4'
880-
- sharded_cluster
881-
commands:
882-
- func: install dependencies
883-
- func: bootstrap mongo-orchestration
884-
vars:
885-
VERSION: '3.4'
886-
TOPOLOGY: sharded_cluster
887-
- func: run tests
888-
- name: test-3.2-server
889-
tags:
890-
- '3.2'
891-
- server
892-
commands:
893-
- func: install dependencies
894-
- func: bootstrap mongo-orchestration
895-
vars:
896-
VERSION: '3.2'
897-
TOPOLOGY: server
898-
- func: run tests
899-
- name: test-3.2-replica_set
900-
tags:
901-
- '3.2'
902-
- replica_set
903-
commands:
904-
- func: install dependencies
905-
- func: bootstrap mongo-orchestration
906-
vars:
907-
VERSION: '3.2'
908-
TOPOLOGY: replica_set
909-
- func: run tests
910-
- name: test-3.2-sharded_cluster
911-
tags:
912-
- '3.2'
913-
- sharded_cluster
914-
commands:
915-
- func: install dependencies
916-
- func: bootstrap mongo-orchestration
917-
vars:
918-
VERSION: '3.2'
919-
TOPOLOGY: sharded_cluster
920-
- func: run tests
921-
- name: test-3.0-server
922-
tags:
923-
- '3.0'
924-
- server
925-
commands:
926-
- func: install dependencies
927-
- func: bootstrap mongo-orchestration
928-
vars:
929-
VERSION: '3.0'
930-
TOPOLOGY: server
931-
- func: run tests
932-
- name: test-3.0-replica_set
933-
tags:
934-
- '3.0'
935-
- replica_set
936-
commands:
937-
- func: install dependencies
938-
- func: bootstrap mongo-orchestration
939-
vars:
940-
VERSION: '3.0'
941-
TOPOLOGY: replica_set
942-
- func: run tests
943-
- name: test-3.0-sharded_cluster
944-
tags:
945-
- '3.0'
946-
- sharded_cluster
947-
commands:
948-
- func: install dependencies
949-
- func: bootstrap mongo-orchestration
950-
vars:
951-
VERSION: '3.0'
952-
TOPOLOGY: sharded_cluster
953-
- func: run tests
954-
- name: test-2.6-server
955-
tags:
956-
- '2.6'
957-
- server
958-
commands:
959-
- func: install dependencies
960-
- func: bootstrap mongo-orchestration
961-
vars:
962-
VERSION: '2.6'
963-
TOPOLOGY: server
964-
- func: run tests
965-
- name: test-2.6-replica_set
966-
tags:
967-
- '2.6'
968-
- replica_set
969-
commands:
970-
- func: install dependencies
971-
- func: bootstrap mongo-orchestration
972-
vars:
973-
VERSION: '2.6'
974-
TOPOLOGY: replica_set
975-
- func: run tests
976-
- name: test-2.6-sharded_cluster
977-
tags:
978-
- '2.6'
979-
- sharded_cluster
980-
commands:
981-
- func: install dependencies
982-
- func: bootstrap mongo-orchestration
983-
vars:
984-
VERSION: '2.6'
985-
TOPOLOGY: sharded_cluster
986-
- func: run tests
987855
- name: test-latest-server-v1-api
988856
tags:
989857
- latest
@@ -1810,18 +1678,6 @@ buildvariants:
18101678
- test-3.6-server
18111679
- test-3.6-replica_set
18121680
- test-3.6-sharded_cluster
1813-
- test-3.4-server
1814-
- test-3.4-replica_set
1815-
- test-3.4-sharded_cluster
1816-
- test-3.2-server
1817-
- test-3.2-replica_set
1818-
- test-3.2-sharded_cluster
1819-
- test-3.0-server
1820-
- test-3.0-replica_set
1821-
- test-3.0-sharded_cluster
1822-
- test-2.6-server
1823-
- test-2.6-replica_set
1824-
- test-2.6-sharded_cluster
18251681
- test-latest-server-v1-api
18261682
- test-atlas-connectivity
18271683
- test-atlas-data-lake
@@ -1891,18 +1747,6 @@ buildvariants:
18911747
- test-3.6-server
18921748
- test-3.6-replica_set
18931749
- test-3.6-sharded_cluster
1894-
- test-3.4-server
1895-
- test-3.4-replica_set
1896-
- test-3.4-sharded_cluster
1897-
- test-3.2-server
1898-
- test-3.2-replica_set
1899-
- test-3.2-sharded_cluster
1900-
- test-3.0-server
1901-
- test-3.0-replica_set
1902-
- test-3.0-sharded_cluster
1903-
- test-2.6-server
1904-
- test-2.6-replica_set
1905-
- test-2.6-sharded_cluster
19061750
- test-latest-server-v1-api
19071751
- test-atlas-connectivity
19081752
- test-atlas-data-lake
@@ -1973,18 +1817,6 @@ buildvariants:
19731817
- test-3.6-server
19741818
- test-3.6-replica_set
19751819
- test-3.6-sharded_cluster
1976-
- test-3.4-server
1977-
- test-3.4-replica_set
1978-
- test-3.4-sharded_cluster
1979-
- test-3.2-server
1980-
- test-3.2-replica_set
1981-
- test-3.2-sharded_cluster
1982-
- test-3.0-server
1983-
- test-3.0-replica_set
1984-
- test-3.0-sharded_cluster
1985-
- test-2.6-server
1986-
- test-2.6-replica_set
1987-
- test-2.6-sharded_cluster
19881820
- test-latest-server-v1-api
19891821
- test-atlas-data-lake
19901822
- test-ocsp-valid-cert-server-staples

.evergreen/generate_evergreen_tasks.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fs = require('fs');
33
const yaml = require('js-yaml');
44

55
const LATEST_EFFECTIVE_VERSION = '5.0';
6-
const MONGODB_VERSIONS = ['latest', '5.0', '4.4', '4.2', '4.0', '3.6', '3.4', '3.2', '3.0', '2.6'];
6+
const MONGODB_VERSIONS = ['latest', '5.0', '4.4', '4.2', '4.0', '3.6'];
77
const NODE_VERSIONS = ['erbium', 'fermium'];
88
NODE_VERSIONS.sort();
99
const LOWEST_LTS = NODE_VERSIONS[0];
@@ -34,7 +34,7 @@ const OPERATING_SYSTEMS = [
3434
clientEncryption: false // TODO(NODE-3401): Unskip when Windows no longer fails to launch mongocryptd occasionally
3535
}
3636
].map(osConfig => ({
37-
mongoVersion: '>=2.6',
37+
mongoVersion: '>=3.6',
3838
nodeVersion: LOWEST_LTS,
3939
auth: false, // TODO test auth?
4040
clientEncryption: true,
@@ -484,7 +484,7 @@ OPERATING_SYSTEMS.forEach(
484484
name: osName,
485485
display_name: osDisplayName,
486486
run_on,
487-
mongoVersion = '>=2.6',
487+
mongoVersion = '>=3.6',
488488
nodeVersions = NODE_VERSIONS,
489489
clientEncryption,
490490
msvsVersion

src/cmap/wire_protocol/constants.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export const MIN_SUPPORTED_SERVER_VERSION = '2.6';
2-
export const MAX_SUPPORTED_SERVER_VERSION = '5.0';
3-
export const MIN_SUPPORTED_WIRE_VERSION = 2;
4-
export const MAX_SUPPORTED_WIRE_VERSION = 13;
1+
export const MIN_SUPPORTED_SERVER_VERSION = '3.6';
2+
export const MAX_SUPPORTED_SERVER_VERSION = '5.1';
3+
export const MIN_SUPPORTED_WIRE_VERSION = 6;
4+
export const MAX_SUPPORTED_WIRE_VERSION = 14;
55
export const OP_REPLY = 1;
66
export const OP_UPDATE = 2001;
77
export const OP_INSERT = 2002;

src/operations/list_collections.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,17 @@ export class ListCollectionsOperation extends CommandOperation<string[]> {
9090
return;
9191
}
9292

93-
const command = {
93+
return super.executeCommand(server, session, this.generateCommand(), callback);
94+
}
95+
96+
/* This is here for the purpose of unit testing the final command that gets sent. */
97+
generateCommand(): Document {
98+
return {
9499
listCollections: 1,
95100
filter: this.filter,
96101
cursor: this.batchSize ? { batchSize: this.batchSize } : {},
97102
nameOnly: this.nameOnly
98103
};
99-
100-
return super.executeCommand(server, session, command, callback);
101104
}
102105
}
103106

test/functional/buffering_proxy.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe.skip('Buffering Proxy', function () {
3535
var electionIds = [new ObjectId(0), new ObjectId(1)];
3636

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

254254
// Default message fields
255-
var defaultFields = Object.assign({}, mock.DEFAULT_ISMASTER, {
255+
var defaultFields = Object.assign({}, mock.HELLO, {
256256
setName: 'rs',
257257
setVersion: 1,
258258
electionId: electionIds[0],

test/functional/change_stream.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2082,7 +2082,7 @@ describe('Change Streams', function () {
20822082

20832083
ismaster() {
20842084
const uri = this.server.uri();
2085-
return Object.assign({}, mock.DEFAULT_ISMASTER_36, {
2085+
return Object.assign({}, mock.HELLO, {
20862086
ismaster: true,
20872087
secondary: false,
20882088
me: uri,
@@ -2828,7 +2828,7 @@ context('NODE-2626 - handle null changes without error', function () {
28282828
mockServer.setMessageHandler(req => {
28292829
const doc = req.document;
28302830
if (doc.ismaster || doc.hello) {
2831-
return req.reply(mock.DEFAULT_ISMASTER_36);
2831+
return req.reply(mock.HELLO);
28322832
}
28332833
if (doc.aggregate) {
28342834
return req.reply({

0 commit comments

Comments
 (0)