Skip to content

Commit c4e56d5

Browse files
committed
Merge branch 'main' into 1.29-releases
2 parents e5b2cc3 + 7e2d2b8 commit c4e56d5

File tree

12 files changed

+215
-26
lines changed

12 files changed

+215
-26
lines changed

.github/workflows/connectivity-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
run: |
6868
git clone https://github.com/mongodb-js/devtools-docker-test-envs.git
6969
cd devtools-docker-test-envs
70-
git checkout v1.2.0
70+
git checkout v1.2.1
7171
docker-compose -f docker/enterprise/docker-compose.yaml up -d
7272
docker-compose -f docker/ldap/docker-compose.yaml up -d
7373
docker-compose -f docker/scram/docker-compose.yaml up -d

THIRD-PARTY-NOTICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **compass**.
2-
This document was automatically generated on Wed Nov 17 2021.
2+
This document was automatically generated on Fri Nov 19 2021.
33

44
## List of dependencies
55

package-lock.json

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"bootstrap": "npm install && lerna run bootstrap --stream",
1313
"bootstrap-ci": "npm ci && lerna run bootstrap",
1414
"precheck": "npm run depcheck && npm run check-logids",
15+
"changed": "node ./scripts/changed.js",
1516
"check": "lerna run check --stream",
1617
"check-changed": "npm run check -- --since origin/HEAD --exclude-dependents",
1718
"precheck-ci": "npm run depcheck && npm run check-logids",

packages/compass-crud/src/stores/crud-store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ const configureStore = (options = {}) => {
11501150
}
11511151
this.setState({ sessions: null });
11521152
try {
1153-
await this.dataService.killSession(sessions);
1153+
await this.dataService.killSessions(sessions);
11541154
} catch (err) {
11551155
log.warn(mongoLogId(1001000096), 'Documents', 'Attempting to kill the session failed');
11561156
}

packages/compass-crud/src/utils/cancellable-queries.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ describe('cancellable-queries', function() {
116116
await expect(promise).to.be.rejectedWith(Error, OPERATION_CANCELLED_MESSAGE);
117117

118118
// kill the session
119-
await dataService.killSession(session);
119+
await dataService.killSessions(session);
120120

121121
// give it enough time to be killed
122122
await delay(100);
@@ -180,7 +180,7 @@ describe('cancellable-queries', function() {
180180
// kill the session
181181
// (unfortunately I can't think of a way to slow the query down enough so
182182
// we can make sure the operation appeared and then disappeared)
183-
await dataService.killSession(session);
183+
await dataService.killSessions(session);
184184
});
185185
});
186186

@@ -204,7 +204,7 @@ describe('cancellable-queries', function() {
204204

205205
// kill the session
206206
// (same problem with testing that this actually worked as for count queries above)
207-
await dataService.killSession(session);
207+
await dataService.killSessions(session);
208208
});
209209

210210
// TODO: if (configDocs && configDocs.length) { implies that configDocs could be empty?

packages/data-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"uuid": "^8.3.2"
7272
},
7373
"devDependencies": {
74-
"@mongodb-js/devtools-docker-test-envs": "^1.2.0",
74+
"@mongodb-js/devtools-docker-test-envs": "^1.2.1",
7575
"@mongodb-js/eslint-config-compass": "^0.3.0",
7676
"@mongodb-js/mocha-config-compass": "^0.4.0",
7777
"@mongodb-js/prettier-config-compass": "^0.2.0",

packages/data-service/src/connect-mongo-client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ function connectionOptionsToMongoClientParams(
101101
monitorCommands: true,
102102
};
103103

104+
if (connectionOptions.tlsCertificateFile) {
105+
// NOTE: this property should not be confused with the 'tlsCertificateFile' url parameter
106+
// that had to be specified for the Node.js driver instead of 'tlsCertificateKeyFile'
107+
// before version 4.2.0 (https://jira.mongodb.org/browse/NODE-3591).
108+
options.tlsCertificateFile = connectionOptions.tlsCertificateFile;
109+
}
110+
104111
// adds directConnection=true unless is explicitly a replica set
105112
const isLoadBalanced = url.searchParams.get('loadBalanced') === 'true';
106113
const isReplicaSet =

packages/data-service/src/connect.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,13 @@ describe('connect', function () {
516516
);
517517
});
518518

519+
it('connects with tls (tlsServerAndClientValidationKeyCrt)', async function () {
520+
await testConnection(
521+
envs.getConnectionOptions('tlsServerAndClientValidationKeyCrt'),
522+
{ authenticatedUserRoles: [], authenticatedUsers: [] }
523+
);
524+
});
525+
519526
it('connects with tls (tlsX509)', async function () {
520527
await testConnection(envs.getConnectionOptions('tlsX509'), {
521528
authenticatedUserRoles: [

packages/data-service/src/data-service.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,16 +1313,16 @@ describe('DataService', function () {
13131313
const session = dataService.startSession();
13141314
expect(session.constructor.name).to.equal('ClientSession');
13151315

1316-
// used by killSession, must be a bson UUID in order to work
1316+
// used by killSessions, must be a bson UUID in order to work
13171317
expect(session.id!.id._bsontype).to.equal('Binary');
13181318
expect(session.id!.id.sub_type).to.equal(4);
13191319
});
13201320
});
13211321

1322-
describe('#killSession', function () {
1322+
describe('#killSessions', function () {
13231323
it('does not throw if kill a non existing session', async function () {
13241324
const session = dataService.startSession();
1325-
await dataService.killSession(session);
1325+
await dataService.killSessions(session);
13261326
});
13271327

13281328
it('kills a command with a session', async function () {
@@ -1337,7 +1337,7 @@ describe('DataService', function () {
13371337
);
13381338

13391339
const session = dataService.startSession();
1340-
await dataService.killSession(session);
1340+
await dataService.killSessions(session);
13411341

13421342
expect(commandSpy.args[0][0]).to.deep.equal({
13431343
killSessions: [session.id],

0 commit comments

Comments
 (0)