Skip to content

dataconnect(change): ensure exceptions aren't silently discarded when closing DataConnectGrpcRPCs#7909

Merged
dconeybe merged 4 commits intomainfrom
dconeybe/dataconnect/DataConnectGrpcRPCsCloseExceptionsFix
Mar 13, 2026
Merged

dataconnect(change): ensure exceptions aren't silently discarded when closing DataConnectGrpcRPCs#7909
dconeybe merged 4 commits intomainfrom
dconeybe/dataconnect/DataConnectGrpcRPCsCloseExceptionsFix

Conversation

@dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Mar 13, 2026

Ensures that exceptions thrown during the closure of Data Connect's gRPC channels and cache databases in DataConnectGrpcRPCs are all captured and rethrown instead of one clobbering the other.

Highlights

  • Implemented logic to bundle multiple exceptions by throwing the first caught exception and adding others as suppressed exceptions.

Changelog

2 files changed
  • CHANGELOG.md: Added a record of the change to ensure closure exceptions are not ignored.
  • DataConnectGrpcRPCs.kt: Refactored the close method to capture and rethrow all exceptions encountered during shutdown.

@gemini-code-assist
Copy link
Contributor

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

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.

@dconeybe
Copy link
Contributor Author

/gemini 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 correctly addresses an issue where exceptions could be silently discarded during the closing of DataConnectGrpcRPCs. The change ensures that all exceptions from cleanup operations are collected and thrown, with subsequent exceptions being suppressed. The implementation is sound, and the accompanying changelog update is appropriate. I have one minor suggestion to improve the readability of the exception handling logic.

@github-actions
Copy link
Contributor

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

@dconeybe dconeybe marked this pull request as ready for review March 13, 2026 20:37
@dconeybe dconeybe merged commit c572c04 into main Mar 13, 2026
43 checks passed
@dconeybe dconeybe deleted the dconeybe/dataconnect/DataConnectGrpcRPCsCloseExceptionsFix branch March 13, 2026 23:21
@github-actions github-actions bot mentioned this pull request Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants