Repository navigation
fix: honor disabled opened connection role verification - #721
Merged
Merged
Conversation
Contributor
Author
|
Friendly ping: could someone take a look at this when there's time? I'm happy to adjust anything. Thanks! |
sophia-bq
reviewed
Nov 26, 2026
sophia-bq
left a comment
Contributor
There was a problem hiding this comment.
Thank you so much for contributing this fix! I've added a few small comments as well as opened a draft PR with some changes on top of yours to address a similar unused property and add documentation (#727). I would really appreciate it if you would take a look at the docs there if you have the time :)
… disabled Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sophia-bq
approved these changes
Nov 27, 2026
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.
Fixes #717
verifyOpenedConnectionTypeis declared but never read, so setting it tononestill runs role queries on newly opened wrapper connections, including each pooled checkout. The initial connection strategy can add another role query when connecting to a known reader instance.Read the existing option before the explicit
getHostRolechecks in the MySQL and PostgreSQL connect paths and the Aurora initial connection strategy's reader and writer paths. Withnone, these checks are skipped and the existing host metadata is retained. The default behavior, topology discovery, routing, and pool lifecycle remain unchanged.The maintainer's November 5 response says the team will investigate. This patch addresses the narrower configuration bug reported in the issue; it does not introduce role caching or redesign the pool.
Testing and validation
Added regression tests for disabled verification in both clients and both Aurora instance-selection paths, with default client verification retained as a control. The tests use mocked connections and do not require AWS credentials or a database.
The new tests fail on main (4 cases) and pass with this change; the full unit suite (
npm test) andnpm run typecheckpass.AI disclosure: This change and its regression tests were generated with Codex.