Skip to content

Conversation

@feeblefakie
Copy link
Contributor

This is an automated backport of the following:

Please merge this PR after all checks have passed.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @feeblefakie, 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 backports the functionality to integrate Google Cloud Storage as a new object storage option. It introduces new modules for Cloud Storage configuration and interaction, updates the build process to include necessary dependencies, and refines the core object storage framework to seamlessly incorporate this new backend. The changes ensure robust error handling and proper resource management for Cloud Storage operations, alongside updates to integration tests to validate the new functionality.

Highlights

  • Google Cloud Storage Support: Full support for Google Cloud Storage has been integrated as a new object storage backend, enabling users to leverage GCP for their storage needs.
  • Build System Updates: The build.gradle files have been updated to include the necessary Google Cloud Storage client library dependency, ensuring proper compilation and execution.
  • Enhanced Error Handling: New error codes have been introduced for specific Cloud Storage issues, such as missing or failed loading of service account keys, improving diagnostic capabilities.
  • Object Storage Wrapper Refinements: The ObjectStorageWrapper interface and its implementations (including S3 and Blob Storage) now gracefully handle exceptions during close() operations, logging warnings instead of propagating them. Additionally, a clarification regarding the non-atomic nature of deleteByPrefix has been added.
  • Integration Test Adaptations: Existing integration tests have been modified to dynamically determine list max keys and configure parallel upload thresholds based on the specific object storage backend (Blob, Cloud, or S3), ensuring comprehensive testing for the new Cloud Storage functionality.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/object-storage-adapter-check.yaml
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
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 PR adds support for Google Cloud Storage as an object storage backend. The changes are comprehensive, including configuration, implementation, and integration tests. The new CloudStorageWrapper correctly implements the ObjectStorageWrapper interface using the Google Cloud Storage client library. The PR also includes necessary refactoring in existing object storage classes to accommodate the new backend. I've found a couple of areas for improvement regarding exception handling and memory efficiency. Overall, this is a solid contribution.

@KodaiD KodaiD requested a review from Copilot November 19, 2025 11:24
Copilot finished reviewing on behalf of KodaiD November 19, 2025 12:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR backports Cloud Storage support to branch(3), adding a new object storage adapter implementation for Google Cloud Storage alongside the existing S3 and BlobStorage adapters.

Key changes:

  • New Cloud Storage adapter implementation with configuration, wrapper, provider, and error handling classes
  • Updated ObjectStorageWrapper.close() interface signature to throw ObjectStorageWrapperException
  • Refactored getUsername() method from ObjectStorageConfig interface to individual config implementations

Reviewed Changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CloudStorageConfig.java Configuration class for Cloud Storage with service account credentials handling
CloudStorageWrapper.java Main wrapper implementation for Google Cloud Storage operations
CloudStorageProvider.java Service provider implementation for Cloud Storage
CloudStorageErrorCode.java Error code enum for Cloud Storage-specific errors
CloudStorageConfigTest.java Unit tests for CloudStorageConfig
CloudStorageWrapperTest.java Unit tests for CloudStorageWrapper
S3WrapperTest.java Updated test method signature to include Exception
ObjectStorageWrapper.java Updated close() method signature and added documentation
ObjectStorageConfig.java Removed getUsername() from interface
S3Config.java/BlobStorageConfig.java Moved getUsername() to concrete implementations
S3Wrapper.java Updated close() to throw ObjectStorageWrapperException
ObjectStorageAdmin.java/ObjectStorage.java Added error handling for close() method
PreconditionFailedException.java Added constructor without cause parameter
ObjectStorageWrapperException.java Added constructor without cause parameter
ObjectStorageWrapperFactory.java Added Cloud Storage case to factory
ObjectStorageUtils.java Added Cloud Storage case to config utility
DistributedStorageProvider Registered CloudStorageProvider
CoreError.java Added Cloud Storage error codes
build.gradle Added google-cloud-storage dependency version
core/build.gradle Added google-cloud-storage dependency and formatting fixes
ObjectStorageEnv.java Added Cloud Storage environment check
ObjectStorageWrapperIntegrationTest.java Updated for Cloud Storage list limits and version handling
ObjectStorageWrapperLargeObjectWriteIntegrationTest.java Added Cloud Storage parallel upload configuration
object-storage-adapter-check.yaml Added Cloud Storage CI/CD workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@brfrn169 brfrn169 merged commit a47d2e7 into 3 Nov 19, 2025
208 of 214 checks passed
@brfrn169 brfrn169 deleted the 3-pull-3179 branch November 19, 2025 14:48
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.

3 participants