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-4817)!: remove legacy logger #3518

Merged
merged 23 commits into from
Jan 23, 2023
Merged

Conversation

W-A-James
Copy link
Contributor

@W-A-James W-A-James commented Jan 10, 2023

Description

Removing references to the legacy Logger class in preparation for the implementation and installation of the new MongoLogger

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

@W-A-James W-A-James force-pushed the NODE-4817/remove-legacy-logger branch 2 times, most recently from bb0ed91 to 055c4b3 Compare January 11, 2023 18:20
@W-A-James W-A-James marked this pull request as ready for review January 13, 2023 20:42
src/sdam/srv_polling.ts Outdated Show resolved Hide resolved
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jan 19, 2023
@W-A-James W-A-James force-pushed the NODE-4817/remove-legacy-logger branch from 1bb04e7 to f99a285 Compare January 19, 2023 20:03
@W-A-James W-A-James requested a review from durran January 19, 2023 20:46
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

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

More removals in comment responses.

Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

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

Just one last set of changes, thanks!

src/operations/command.ts Outdated Show resolved Hide resolved
src/sdam/srv_polling.ts Outdated Show resolved Hide resolved
src/sdam/srv_polling.ts Outdated Show resolved Hide resolved
src/sdam/srv_polling.ts Outdated Show resolved Hide resolved
this.logger.error(`Unexpected ${new MongoRuntimeError(unexpectedRuntimeError).stack}`);
});
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
this._poll().catch(_unexpectedRuntimeError => {});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

From slack discussion, don't want to remove this as we don't want to have an unhandled promise, so we can just swallow it here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this to ()=>null it matches the rest of our catch and release promise handling.

Copy link
Contributor

Choose a reason for hiding this comment

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

we can drop the underscore argument

@W-A-James
Copy link
Contributor Author

https://spruce.mongodb.com/version/63caf4e1e3c3310b2e31edee/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
Test failures here are flaky or were failing previously

@dariakp dariakp removed the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jan 20, 2023
@dariakp dariakp added the Team Review Needs review from team label Jan 20, 2023
src/collection.ts Show resolved Hide resolved
src/db.ts Show resolved Hide resolved
src/gridfs/index.ts Show resolved Hide resolved
src/mongo_client.ts Show resolved Hide resolved
src/mongo_client.ts Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
@nbbeeken nbbeeken changed the title fix(NODE-4817): Remove legacy logger feat(NODE-4817)!: remove legacy logger Jan 23, 2023
@@ -106,15 +103,14 @@ export class SrvPoller extends TypedEventEmitter<SrvPollerEvents> {
}
}

// TODO(NODE-4817): This method has been left to allow for refactoring with the new logger
Copy link
Contributor

Choose a reason for hiding this comment

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

TODOs normally refer to tickets that haven't been done yet so we can find the relevant code again. I think this should probably be something in the new spec-ed logger epic

@W-A-James W-A-James requested a review from nbbeeken January 23, 2023 16:51
@dariakp dariakp merged commit 28c7cdd into main Jan 23, 2023
@dariakp dariakp deleted the NODE-4817/remove-legacy-logger branch January 23, 2023 19: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.

4 participants