fix: preserve optional logger for search support probe#1097
Closed
Will-hxw wants to merge 1 commit intomongodb-js:ni/search-testsfrom
Closed
fix: preserve optional logger for search support probe#1097Will-hxw wants to merge 1 commit intomongodb-js:ni/search-testsfrom
Will-hxw wants to merge 1 commit intomongodb-js:ni/search-testsfrom
Conversation
Collaborator
|
hey, thanks for that - I was debating with myself whether we should do it as an optional or required - I went for the latter because I figured this is only called internally. Do you have a use case for calling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
PR #1095 adds debug logging to the Atlas Search capability probe. That changes
ConnectionStateConnected.isSearchSupported()from a no-argument public method to requiring aLoggerBase, which can break direct consumers even though the normalSessionpath passes a logger.What Changed
loggerparameter optional forConnectionStateConnected.isSearchSupported().NullLoggerwhen the method is called directly without a logger.Not Changed
Risk
Low. Existing internal calls still pass the session logger. Direct calls without a logger keep working and simply use no-op logging during the first probe.
Validation
pnpm exec vitest --project unit-and-integration tests/unit/common/session.test.ts --runpnpm run check:typespnpm run check:apipnpm run check:formatpnpm run check:lintpnpm run check:dependenciespnpm run checkLinked Issues
Supports #1095 / #1022.