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-6605): add error message when invalidating primary #4340

Merged
merged 10 commits into from
Dec 9, 2024

Conversation

W-A-James
Copy link
Contributor

@W-A-James W-A-James commented Nov 25, 2024

Description

What is changing?

  • Added MongoStalePrimaryError
  • Updated sdam unit test runner
  • Updated spec tests from draft changes in DRIVERS-2972
Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

Populate ServerDescription.error field when primary marked stale

We now attach an error to the newly created ServerDescription object when marking a primary as stale. This helps with debugging SDAM issues when monitoring SDAM events.

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

@W-A-James W-A-James changed the title feat(NODE-6529): add error message when invalidating primary feat(NODE-6605): add error message when invalidating primary Dec 5, 2024
@W-A-James W-A-James marked this pull request as ready for review December 5, 2024 21:25
@baileympearson baileympearson self-assigned this Dec 6, 2024
@baileympearson baileympearson added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Dec 6, 2024
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

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

Nothing major, just some test questions.

W-A-James and others added 2 commits December 6, 2024 17:13
Co-authored-by: Bailey Pearson <bailey.pearson@mongodb.com>
@baileympearson baileympearson added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Dec 9, 2024
baileympearson
baileympearson previously approved these changes Dec 9, 2024
src/error.ts Outdated Show resolved Hide resolved
src/sdam/topology_description.ts Show resolved Hide resolved
@W-A-James W-A-James requested a review from nbbeeken December 9, 2024 18:16
@baileympearson baileympearson merged commit 37613f1 into main Dec 9, 2024
26 of 29 checks passed
@baileympearson baileympearson deleted the NODE-6529 branch December 9, 2024 20:24
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