Skip to content

refactor: update GDA source and tool to use Cloud Go SDK#2313

Merged
wangauone merged 2 commits intomainfrom
refactor/cloudgda-google-sdk
Feb 27, 2026
Merged

refactor: update GDA source and tool to use Cloud Go SDK#2313
wangauone merged 2 commits intomainfrom
refactor/cloudgda-google-sdk

Conversation

@wangauone
Copy link
Copy Markdown
Contributor

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:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

@wangauone wangauone requested a review from a team January 15, 2026 01:15
@wangauone wangauone changed the title refactor!: update GDA source and tool to use Cloud Go SDK refactor: update GDA source and tool to use Cloud Go SDK Jan 15, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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

  • SDK Adoption: The Gemini Data Analytics (GDA) source and tool have been refactored to utilize the official Cloud Go SDK, specifically cloud.google.com/go/geminidataanalytics.
  • Code Simplification: Manual HTTP client creation, request marshalling, and response unmarshalling logic have been removed, replaced by the SDK's client and protobuf message types.
  • Dependency Update: The go.mod file has been updated to reflect the new version of the GDA SDK, moving from v0.3.0 to v0.5.0.
  • API Request/Response Standardization: Custom Go structs previously defining GDA API request and response bodies have been removed, with the implementation now directly using the protobuf types provided by the SDK.
  • Testing Refinement: Test suites have been updated to align with the SDK-based implementation, replacing HTTP server mocks with a fakeSource that directly interacts with SDK protobufs.

🧠 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
  • Ignored by pattern: go.sum (1)
    • go.sum
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

@wangauone wangauone force-pushed the refactor/cloudgda-google-sdk branch from 172dd6b to 9bb4eee Compare January 15, 2026 18:24
@wangauone wangauone requested a review from Yuan325 January 22, 2026 01:17
@wangauone wangauone enabled auto-merge (squash) February 19, 2026 23:09
@wangauone wangauone disabled auto-merge February 19, 2026 23:10
@Yuan325 Yuan325 added the release candidate Use label to signal PR should be included in the next release. label Feb 24, 2026
@wangauone wangauone force-pushed the refactor/cloudgda-google-sdk branch from e716efe to 1127982 Compare February 26, 2026 18:02
@wangauone wangauone requested a review from a team as a code owner February 26, 2026 18:02
@wangauone wangauone enabled auto-merge (squash) February 26, 2026 18:07
This introduces the geminidataanalytics Go SDK and replaces manually defined types with the official protocol buffers and wrappers across both tool and source execution.
@wangauone wangauone force-pushed the refactor/cloudgda-google-sdk branch from 1127982 to dcc0bb6 Compare February 26, 2026 18:14
@wangauone wangauone merged commit 3729556 into main Feb 27, 2026
18 checks passed
@wangauone wangauone deleted the refactor/cloudgda-google-sdk branch February 27, 2026 00:22
AjmeraParth132 pushed a commit to AjmeraParth132/genai-toolbox that referenced this pull request Mar 2, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release candidate Use label to signal PR should be included in the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants