-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(NODE-7138): prevent duplicate metadata from being appended to handshake metadata #4651
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the source code, need to come back to look at the tests after my eyes get a break from staring at so much text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate review
9bce759
to
bd042de
Compare
test/integration/mongodb-handshake/mongodb-handshake.prose.test.ts
Outdated
Show resolved
Hide resolved
test/integration/mongodb-handshake/mongodb-handshake.prose.test.ts
Outdated
Show resolved
Hide resolved
test/integration/mongodb-handshake/mongodb-handshake.prose.test.ts
Outdated
Show resolved
Hide resolved
test/integration/mongodb-handshake/mongodb-handshake.prose.test.ts
Outdated
Show resolved
Hide resolved
test/integration/mongodb-handshake/mongodb-handshake.prose.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending the runtime validation discussion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate review from gh
d22889d
to
6632130
Compare
Description
What is changing?
This PR is a POC implementation for mongodb/specifications#1833.
Additionally, while working on the implementation, I decided to simplify the handshake metadata logic by using
MongoClient.appendMetadata()
to append the driverInfo provided to the MongoClient, if any was provided.Release Highlight
MongoClient.appendMetadata()
ignores duplicate metadataMongoClient.appendMetadata()
will no longer append metadata if it duplicates the metadata already appended to the MongoClient.Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript