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

feat(NODE-4081): fix and deprecate change stream resume options #3270

Merged
merged 12 commits into from
May 31, 2022

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented May 25, 2022

Description

What is changing?

  • The resumeOptions getter on the change stream class copies all of the existing options (including bson options)
  • The resumeOptions getter applies the startAfter, resumeAfter and startAtOperationTime properties to the resume options according to the spec (outlined here)
  • Deprecates the no longer used ResumeOptions interface
  • Removes usages of Reflect in the ResumeOptions getter so that we have Typescript support when constructing the ResumeOptions
Is there new documentation needed for these changes?

No.

What is the motivation for this change?

This PR is the first step in addressing the change stream resumability issues in the Node driver.

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>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson marked this pull request as ready for review May 26, 2022 16:14
@dariakp dariakp added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label May 26, 2022
src/change_stream.ts Show resolved Hide resolved
src/change_stream.ts Outdated Show resolved Hide resolved
test/unit/change_stream.test.ts Outdated Show resolved Hide resolved
test/unit/change_stream.test.ts Outdated Show resolved Hide resolved
test/unit/change_stream.test.ts Outdated Show resolved Hide resolved
@baileympearson baileympearson force-pushed the NODE-4081-fix-change-stream-resume-options branch from a94affc to 23e1f17 Compare May 27, 2022 17:35
test/unit/change_stream.test.ts Outdated Show resolved Hide resolved
@dariakp dariakp added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels May 31, 2022
dariakp
dariakp previously approved these changes May 31, 2022
src/change_stream.ts Outdated Show resolved Hide resolved
nbbeeken
nbbeeken previously approved these changes May 31, 2022
dariakp
dariakp previously approved these changes May 31, 2022
@baileympearson baileympearson dismissed stale reviews from dariakp and nbbeeken via 4f38419 May 31, 2022 18:08
@baileympearson baileympearson force-pushed the NODE-4081-fix-change-stream-resume-options branch from 7fc29ae to 4f38419 Compare May 31, 2022 18:08
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.

CI 🔴 is unrelated

@nbbeeken nbbeeken changed the title feat(NODE-4081): fix change stream resume options feat(NODE-4081): fix and deprecate change stream resume options May 31, 2022
@nbbeeken nbbeeken merged commit 47adfb3 into main May 31, 2022
@nbbeeken nbbeeken deleted the NODE-4081-fix-change-stream-resume-options branch May 31, 2022 19:19
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