refactor: update GDA source and tool to use Cloud Go SDK#2313
refactor: update GDA source and tool to use Cloud Go SDK#2313
Conversation
Summary of ChangesHello @wangauone, 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 significantly refactors the Gemini Data Analytics (GDA) integration by transitioning from a custom HTTP client implementation to the official Cloud Go SDK. This change streamlines the codebase, enhances maintainability, and ensures direct compatibility with the latest GDA API definitions through the SDK's protobuf structures. The refactoring simplifies how requests are constructed and responses are handled, making the GDA source and tool more robust and easier to manage. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
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 is a great refactoring that updates the Gemini Data Analytics (GDA) source and tool to use the official Cloud Go SDK. This change significantly simplifies the implementation by removing manual HTTP request handling and replacing it with SDK calls. The code is now cleaner, more maintainable, and less prone to errors. The tests have also been updated to reflect these changes and are now more robust as they are decoupled from the transport layer details. I've found a couple of minor opportunities to improve error handling consistency, but overall, this is a high-quality contribution.
172dd6b to
9bb4eee
Compare
e716efe to
1127982
Compare
This introduces the geminidataanalytics Go SDK and replaces manually defined types with the official protocol buffers and wrappers across both tool and source execution.
1127982 to
dcc0bb6
Compare
…2313) ## Description Refactor GDA source and tool to use Cloud Go SDK to simplify the implementation, given the SDK has included the recent changes. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change
Description
Refactor GDA source and tool to use Cloud Go SDK to simplify the implementation, given the SDK has included the recent changes.
PR Checklist
CONTRIBUTING.md
!if this involve a breaking change