gemini-code-assist[bot] commented on PR #37597: URL: https://github.com/apache/beam/pull/37597#issuecomment-3923104486
## Summary of Changes This pull request continues the migration of the GCS client library in the Java SDK by performing further cleanup on the `GcsUtil` public API module. The primary goal is to remove test-only functions and internal implementation details that are not part of the intended public interface, thereby simplifying the class and improving its maintainability. Related tests have been adjusted to accommodate these changes, ensuring the integrity of the GCS utility functions. ### Highlights * **API Cleanup**: Removed numerous internal and test-only methods from the `GcsUtil` class, streamlining its public API and focusing on core functionalities. * **Constructor Simplification**: Simplified the `GcsUtil` constructor to delegate the creation of its internal `GcsUtilV1` and `GcsUtilV2` instances to their respective factory methods. * **Method Deprecation**: Deprecated `getNonWildcardPrefix` and `isWildcard` methods in `GcsUtil`, guiding users to use the equivalent methods directly from `GcsPath`. * **Test Updates**: Updated `GcsUtilTest` to reflect the API changes in `GcsUtil`, ensuring tests correctly interact with the refactored class by accessing internal methods via the `delegate` field. 🧠**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](https://codeassist.google/code-review/login) to enable Memory in your admin console.** <details> <summary><b>Changelog</b></summary> * **sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtil.java** * Removed unused imports related to V1 GCS client library components. * Simplified the `GcsUtil` constructor to use factory methods for `GcsUtilV1` and `GcsUtilV2` delegates. * Eliminated numerous `@VisibleForTesting` methods and their internal logic, which were specific to GcsUtilV1. * Deprecated `getNonWildcardPrefix` and `isWildcard` methods, recommending `GcsPath` alternatives. * **sdks/java/extensions/google-cloud-platform-core/src/test/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilTest.java** * Modified test calls to `GcsUtil` methods to correctly access them through the `delegate` field. * Updated the `GcsUtilMock` constructor to align with the refactored `GcsUtil` constructor. </details> <details> <summary><b>Activity</b></summary> * The author, shunping, requested a review from @Abacn. * The `github-actions[bot]` stopped reviewer notifications, indicating that a human reviewer was assigned. * The author, shunping, requested a Gemini summary. </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
