Skip to content

fix(NODE-3998): metadata duplication in handshake#3615

Merged
nbbeeken merged 12 commits intomainfrom
NODE-3998-2
Mar 31, 2023
Merged

fix(NODE-3998): metadata duplication in handshake#3615
nbbeeken merged 12 commits intomainfrom
NODE-3998-2

Conversation

@baileympearson
Copy link
Copy Markdown
Contributor

@baileympearson baileympearson commented Mar 29, 2023

Description

What is changing?

This PR prevents metadata duplication in the handshake. To do this, it removes custom transforms for the driverInfo and appName options and constructs the metadata once at the end of options parsing.

Is there new documentation needed for these changes?

No.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson marked this pull request as ready for review March 29, 2023 16:53
@baileympearson baileympearson changed the title fix metadata issue fix(NODE-3998): fix metadata duplication in handshake Mar 29, 2023
Comment thread test/unit/cmap/handshake/client_metadata.test.ts Outdated
Comment thread src/utils.ts Outdated
Comment thread test/unit/cmap/handshake/client_metadata.test.ts Outdated
Comment thread test/unit/cmap/handshake/client_metadata.test.ts Outdated
@nbbeeken nbbeeken self-assigned this Mar 29, 2023
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 29, 2023
@nbbeeken nbbeeken changed the title fix(NODE-3998): fix metadata duplication in handshake fix(NODE-3998): metadata duplication in handshake Mar 29, 2023
@baileympearson baileympearson requested a review from nbbeeken March 29, 2023 18:31
Comment thread src/utils.ts
@@ -526,13 +529,14 @@ export interface ClientMetadata {
version: string;
};
platform: string;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was wrong, according to the spec: https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#hello-command

this modifies a public interface but it's also technically a bug fix, so I think it's okay to remove

Comment thread src/utils.ts Outdated
Comment thread src/utils.ts Outdated
Comment thread src/utils.ts Outdated
Comment thread test/unit/cmap/handshake/client_metadata.test.ts
Comment thread test/unit/cmap/handshake/client_metadata.test.ts Outdated
nbbeeken
nbbeeken previously approved these changes Mar 30, 2023
@nbbeeken nbbeeken added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Mar 30, 2023
@baileympearson baileympearson requested a review from nbbeeken March 30, 2023 14:31
nbbeeken
nbbeeken previously approved these changes Mar 30, 2023
@baileympearson
Copy link
Copy Markdown
Contributor Author

evergreen retry

Comment thread test/unit/cmap/handshake/client_metadata.test.ts Outdated
baileympearson and others added 2 commits March 31, 2023 15:34
Co-authored-by: Warren James <warren.james.dev@gmail.com>
Copy link
Copy Markdown
Contributor

@W-A-James W-A-James left a comment

Choose a reason for hiding this comment

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

LGTM

@nbbeeken nbbeeken merged commit 6d894d6 into main Mar 31, 2023
@nbbeeken nbbeeken deleted the NODE-3998-2 branch March 31, 2023 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team Review Needs review from team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants