Skip to content

Conversation

strantalis
Copy link
Member

No description provided.

@strantalis strantalis requested review from a team as code owners August 4, 2025 19:34
@strantalis strantalis marked this pull request as draft August 4, 2025 19:34
Copy link
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.

Summary of Changes

Hello @strantalis, 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 enhances the SDK's flexibility by introducing the ability for users to explicitly configure the network protocol used for communication with platform services. It adds a new enum to define supported protocols and integrates this configuration option into the SDK builder, defaulting to the Connect protocol.

Highlights

  • New ProtocolType Enum: Introduced a new ProtocolType enum (CONNECT, GRPC, GRPC_WEB) to provide a clear, SDK-specific abstraction for the underlying Connect-RPC NetworkProtocol values. This centralizes protocol definitions and improves readability.
  • Configurable Connect-RPC Protocol: The SDKBuilder now includes a protocol(ProtocolType protocolType) method, allowing users to explicitly set the desired network protocol for communication with platform services. The default protocol is CONNECT.
  • Dynamic Protocol Client Configuration: The internal getProtocolClient method in SDKBuilder has been updated to use the dynamically configured ProtocolType when creating the ProtocolClientConfig, replacing the previously hardcoded NetworkProtocol.GRPC.
  • Protocol Configuration Tests: Added new test cases in SDKBuilderTest to verify that the protocol() method correctly configures the SDK for CONNECT, GRPC, and GRPC_WEB protocols, and confirms the default CONNECT behavior.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 or fill out our survey to provide feedback.

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
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 introduces the capability to configure the connect-rpc protocol for the SDK, defaulting to CONNECT. The changes are well-structured, including a new ProtocolType enum, modifications to the SDKBuilder, and corresponding test updates. I've identified a potential NullPointerException in the SDKBuilder and a critical issue in a new test case that will cause it to fail.

Copy link
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.

Summary of Changes

Hello @strantalis, 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!

I've implemented a new feature that allows users to specify the network protocol for the SDK's communication with platform services. This provides flexibility to choose between Connect, gRPC, and gRPC-Web protocols, with Connect being the default.

Highlights

  • ProtocolType Enum: Introduced a new ProtocolType enum to abstract the underlying Connect-RPC NetworkProtocol types (CONNECT, GRPC, GRPC_WEB).
  • Configurable SDKBuilder: Enhanced the SDKBuilder with a protocol() method, enabling users to explicitly set the desired communication protocol for the SDK.
  • Dynamic Protocol Selection: Updated the internal getProtocolClient method in SDKBuilder to dynamically use the chosen ProtocolType, moving away from a hardcoded gRPC protocol.
  • Comprehensive Testing: Added new test cases in SDKBuilderTest to ensure the correct functionality and default behavior of the protocol configuration across all supported types.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 or fill out our survey to provide feedback.

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
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 introduces the ability to configure the connect-rpc protocol for the SDK, defaulting to CONNECT. The implementation looks good, adding a ProtocolType enum and integrating it into the SDKBuilder. I've identified a potential issue with using GRPC_WEB in plaintext mode and a flaw in the new test case. My detailed comments provide suggestions to address these points.

@strantalis
Copy link
Member Author

@gemini-code-assist /review

Copy link
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 introduces the ability to configure the Connect-RPC protocol used by the SDK. A new ProtocolType enum is added, and the SDKBuilder is updated with a protocol() method to select between CONNECT, GRPC, and GRPC_WEB. The default is set to CONNECT. The changes include necessary validation for protocol compatibility (e.g., gRPC-Web with plaintext connections) and updates to tests to accommodate the new feature and default. My review includes one suggestion to improve test coverage for the new protocol configuration logic.

Copy link

sonarqubecloud bot commented Aug 6, 2025

@strantalis strantalis marked this pull request as ready for review August 6, 2025 18:04
@strantalis strantalis merged commit 47041c5 into main Aug 7, 2025
12 checks passed
@strantalis strantalis deleted the connect-protocol branch August 7, 2025 17:12
ttschampel pushed a commit that referenced this pull request Sep 2, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>0.10.0</summary>

##
[0.10.0](v0.9.0...v0.10.0)
(2025-09-02)


### ⚠ BREAKING CHANGES

* **sdk:** add base key and support for key grants in ZTDF
([#271](#271))

### Features

* ability to set connect-rpc protocol
([#285](#285))
([47041c5](47041c5))
* add system metadata assertion
([#270](#270))
([d235f13](d235f13))
* expose AuthorizationService v2
([#287](#287))
([d1fd106](d1fd106))
* introduce the base key for nano flows
([#273](#273))
([d337704](d337704))
* **sdk:** add base key and support for key grants in ZTDF
([#271](#271))
([c3b79db](c3b79db))


### Bug Fixes

* **ci:** Update codeql.yaml to run on all pull requests
([#283](#283))
([9e318bb](9e318bb))
* create AES-256 keys of the correct length with all curves
([#282](#282))
([95c20b3](95c20b3))
* **sdk:** add methods to examine Manifest and Policy
([#278](#278))
([03d5d41](03d5d41))
* **sdk:** parse the component sizes
([#286](#286))
([3b1bb69](3b1bb69))
</details>

---
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: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants