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(NODE-6355): respect utf8 validation options when iterating cursors (6.8) #4220

Merged
merged 6 commits into from
Sep 6, 2024

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Sep 4, 2024

Description

What is changing?

Cursors now respect enableUtf8Validation.

CI won't run on 6.8 - patch build here: https://spruce.mongodb.com/version/66db46990ef9890007c0f2cb/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

Performance comparison with the 6.8 commit: https://performance-analyzer.server-tig.prod.corp.mongodb.com/perf-analyzer-viz/?comparison_id=66db3c2adbc39a02ac0aef75

Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

Fixed enableUtf8Validation option

Starting in v6.8.0 we inadvertently removed the ability to disable UTF-8 validation when deserializing BSON. Validation is normally a good thing, but it was always meant to be configurable and the recent Node.js runtime issues (v22.7.0) make this option indispensable for avoiding errors from mistakenly generated invalid UTF-8 bytes.

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 changed the title fix(NODE-6355): respect utf8 validation options when iterating cursors fix(NODE-6355): respect utf8 validation options when iterating cursors (6.8) Sep 4, 2024
@nbbeeken nbbeeken self-requested a review September 4, 2024 15:15
@nbbeeken nbbeeken self-assigned this Sep 4, 2024
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Sep 4, 2024
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

We have to change the name of a few variables and run this branches prettier to get the lint task passing. FLE failures are expected because setup has changed since the 6.8 release.

@baileympearson baileympearson marked this pull request as ready for review September 6, 2024 18:27
src/cmap/wire_protocol/responses.ts Show resolved Hide resolved
src/cmap/wire_protocol/responses.ts Show resolved Hide resolved
src/cmap/wire_protocol/responses.ts Show resolved Hide resolved
src/cmap/wire_protocol/on_demand/document.ts Outdated Show resolved Hide resolved
src/cmap/wire_protocol/on_demand/document.ts Outdated Show resolved Hide resolved
@nbbeeken nbbeeken merged commit 886cefb into 6.8 Sep 6, 2024
20 of 26 checks passed
@nbbeeken nbbeeken deleted the cursor-utf8-fix-6.8 branch September 6, 2024 20:21
@baileympearson baileympearson mentioned this pull request Sep 6, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants