Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(devtools-connect): re-try connection in case of TLS errors without system CA MONGOSH-1935 #495

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

addaleax
Copy link
Collaborator

@addaleax addaleax commented Dec 9, 2024

Recent user reports have made it clear that our attempts to solve TLS errors caused by adding system certificates haven't fully been resolved yet. To address this, we add a generic fallback that attempts to connect a second time without the system certificate store added.

This commit also adds TLS errors to the list of fail-fast errors, i.e. errors which should result in a quick connection end because they are unlikely to be resolved by the Node.js driver attempting to re-connect repeatedly on the level of individual connections. This should avoid situations in which timeouts make the connection attempt take twice as long for TLS errors.

Description

Open Questions

Checklist

…t system CA MONGOSH-1935

Recent user reports have made it clear that our attempts to solve
TLS errors caused by adding system certificates haven't fully been
resolved yet. To address this, we add a generic fallback that
attempts to connect a second time without the system certificate store
added.

This commit also adds TLS errors to the list of fail-fast errors,
i.e. errors which should result in a quick connection end because they
are unlikely to be resolved by the Node.js driver attempting to
re-connect repeatedly on the level of individual connections.
This should avoid situations in which timeouts make the connection
attempt take twice as long for TLS errors.
Array.isArray(err.errors) &&
err.errors.some((err) => checker(err))
) {
return true; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError
Copy link
Collaborator

Choose a reason for hiding this comment

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

TIL

Copy link
Collaborator Author

@addaleax addaleax Dec 10, 2024

Choose a reason for hiding this comment

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

Yeah – the driver doesn't use this yet, but they indicated that this is something that could be adopted at some point

@addaleax addaleax merged commit 030a412 into main Dec 10, 2024
5 checks passed
@addaleax addaleax deleted the 1935-dev branch December 10, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants