Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/logging/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"node": ">=12.4.0"
},
"dependencies": {
"@mongodb-js/devtools-connect": "^1.0.0",
"@mongodb-js/devtools-connect": "^1.1.1",
"@mongosh/errors": "0.0.0-dev.0",
"@mongosh/history": "0.0.0-dev.0",
"@mongosh/types": "0.0.0-dev.0",
Expand Down
17 changes: 13 additions & 4 deletions packages/logging/src/setup-logger-and-telemetry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,17 @@ describe('setupLoggerAndTelemetry', () => {
bus.emit('devtools-connect:connect-heartbeat-succeeded', { connectionId: 'localhost' });
bus.emit('devtools-connect:connect-fail-early');
bus.emit('devtools-connect:connect-attempt-finished');
bus.emit('devtools-connect:resolve-srv-error', { from: 'mongodb+srv://foo:bar@hello.world/', error: new Error('failed'), duringLoad: false });
bus.emit('devtools-connect:resolve-srv-succeeded', { from: 'mongodb+srv://foo:bar@hello.world/', to: 'mongodb://foo:bar@db.hello.world/' });
bus.emit('devtools-connect:resolve-srv-error', {
from: 'mongodb+srv://foo:bar@hello.world/',
error: new Error('failed'),
duringLoad: false,
resolutionDetails: []
});
bus.emit('devtools-connect:resolve-srv-succeeded', {
from: 'mongodb+srv://foo:bar@hello.world/',
to: 'mongodb://foo:bar@db.hello.world/',
resolutionDetails: []
});
bus.emit('devtools-connect:missing-optional-dependency', { name: 'kerberos', error: new Error('no kerberos') });
bus.emit('mongosh-sp:reset-connection-options');

Expand Down Expand Up @@ -201,9 +210,9 @@ describe('setupLoggerAndTelemetry', () => {
expect(logOutput[i++].msg).to.equal('Aborting connection attempt as irrecoverable');
expect(logOutput[i++].msg).to.equal('Connection attempt finished');
expect(logOutput[i].msg).to.equal('Resolving SRV record failed');
expect(logOutput[i++].attr).to.deep.equal({ from: 'mongodb+srv://<credentials>@hello.world/', error: 'failed', duringLoad: false });
expect(logOutput[i++].attr).to.deep.equal({ from: 'mongodb+srv://<credentials>@hello.world/', error: 'failed', duringLoad: false, resolutionDetails: [] });
expect(logOutput[i].msg).to.equal('Resolving SRV record succeeded');
expect(logOutput[i++].attr).to.deep.equal({ from: 'mongodb+srv://<credentials>@hello.world/', to: 'mongodb://<credentials>@db.hello.world/' });
expect(logOutput[i++].attr).to.deep.equal({ from: 'mongodb+srv://<credentials>@hello.world/', to: 'mongodb://<credentials>@db.hello.world/', resolutionDetails: [] });
expect(logOutput[i].msg).to.equal('Missing optional dependency');
expect(logOutput[i++].attr).to.deep.equal({ name: 'kerberos', error: 'no kerberos' });
expect(logOutput[i++].msg).to.equal('Reconnect because of changed connection options');
Expand Down
3 changes: 2 additions & 1 deletion packages/node-runtime-worker-thread/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const config = {
'mongodb-client-encryption': 'commonjs2 mongodb-client-encryption',
kerberos: 'commonjs2 kerberos',
snappy: 'commonjs2 snappy',
interruptor: 'commonjs2 interruptor'
interruptor: 'commonjs2 interruptor',
'os-dns-native': 'commonjs2 os-dns-native',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gribnoysup Does this look right to you? I’m guessing it’s enough to make this work in mongosh, since we also do the same for kerberos, but I’d want to be sure :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks good! I know that I said that we should externalize it here (and it's totally the correct thing to do) but what I forgot about is due the way we connect this runtime in Compass strictly speaking it's not even required as we connect the app through dataService first (where os-dns-native will already do all the work) and then we pass the driver connection options to this module

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right -- but currently, we're still getting a "Missing optional dependency" warning fro mongosh in Compass because of this. I think it might be nice to avoid that :)

}
};

Expand Down
14 changes: 7 additions & 7 deletions packages/service-provider-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/service-provider-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
]
},
"dependencies": {
"@mongodb-js/devtools-connect": "^1.0.0",
"@mongodb-js/devtools-connect": "^1.1.1",
"@mongosh/errors": "0.0.0-dev.0",
"@mongosh/service-provider-core": "0.0.0-dev.0",
"@mongosh/types": "0.0.0-dev.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/types/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"unitTestsOnly": true
},
"dependencies": {
"@mongodb-js/devtools-connect": "^1.0.0"
"@mongodb-js/devtools-connect": "^1.1.1"
}
}