fix(tools): check for query execution error for pgxpool.Pool#1969
Conversation
Summary of ChangesHello @Yuan325, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces debug logging capabilities to the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds debug logging to the AlloyDB AI NL tool. The changes are a good step towards better observability. I've provided a few suggestions to improve logging efficiency, use more appropriate log levels for error conditions, and ensure consistency in error handling. These changes will enhance code maintainability and correctness.
🤖 I have created a release *beep* *boop* --- ## [0.21.0](v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([#1894](#1894)) ([446d62a](446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([#1751](#1751)) ([5abad5d](5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([#1993](#1993)) ([0e269a1](0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([#1969](#1969)) ([2bff138](2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.21.0](v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([#1894](#1894)) ([446d62a](446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([#1751](#1751)) ([5abad5d](5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([#1993](#1993)) ([0e269a1](0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([#1969](#1969)) ([2bff138](2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([#1894](#1894)) ([446d62a](446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([#1751](#1751)) ([5abad5d](5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([#1993](#1993)) ([0e269a1](0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([#1969](#1969)) ([2bff138](2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](googleapis/mcp-toolbox@v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([googleapis#1894](googleapis#1894)) ([446d62a](googleapis@446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([googleapis#1751](googleapis#1751)) ([5abad5d](googleapis@5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([googleapis#1993](googleapis#1993)) ([0e269a1](googleapis@0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([googleapis#1969](googleapis#1969)) ([2bff138](googleapis@2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](googleapis/mcp-toolbox@v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([googleapis#1894](googleapis#1894)) ([446d62a](googleapis@446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([googleapis#1751](googleapis#1751)) ([5abad5d](googleapis@5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([googleapis#1993](googleapis#1993)) ([0e269a1](googleapis@0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([googleapis#1969](googleapis#1969)) ([2bff138](googleapis@2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](googleapis/mcp-toolbox@v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([googleapis#1894](googleapis#1894)) ([446d62a](googleapis@446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([googleapis#1751](googleapis#1751)) ([5abad5d](googleapis@5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([googleapis#1993](googleapis#1993)) ([0e269a1](googleapis@0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([googleapis#1969](googleapis#1969)) ([2bff138](googleapis@2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> e81dfea
🤖 I have created a release *beep* *boop* --- ## [0.21.0](googleapis/mcp-toolbox@v0.20.0...v0.21.0) (2025-11-19) ### ⚠ BREAKING CHANGES * **tools/spanner-list-tables:** Unmarshal `object_details` json string into map to make response have nested json ([#1894](googleapis/mcp-toolbox#1894)) ([446d62a](googleapis/mcp-toolbox@446d62a)) ### Features * **tools/postgres:** Add `long_running_transactions`, `list_locks` and `replication_stats` tools ([#1751](googleapis/mcp-toolbox#1751)) ([5abad5d](googleapis/mcp-toolbox@5abad5d)) ### Bug Fixes * **tools/alloydbgetinstance:** Remove parameter duplication ([#1993](googleapis/mcp-toolbox#1993)) ([0e269a1](googleapis/mcp-toolbox@0e269a1)) * **tools:** Check for query execution error for pgxpool.Pool ([#1969](googleapis/mcp-toolbox#1969)) ([2bff138](googleapis/mcp-toolbox@2bff138)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com>
Description
Return error if there's error during query execution. AlloyDB AI NL tool was failing query silently. When this happened, the user was just receiving
nilresponse and not informed of what the error was.PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #1949