Conversation
Summary of ChangesHello @shubhangi-google, 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 introduces comprehensive support for managing bucket encryption enforcement configurations within the Highlights
🧠 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. Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces new functionality for managing bucket encryption enforcement configurations. I've identified a critical issue in the core logic within bucket.rb where setting one configuration property inadvertently overwrites others. I've provided suggestions to rectify this. Additionally, I found some copy-paste errors in the documentation, a potential crash in one of the new sample files due to not handling nil values, and an opportunity to make another sample more efficient by batching API calls. Addressing these points will improve the robustness and correctness of the new feature.
google-cloud-storage/samples/storage_get_encryption_enforcement_config.rb
Outdated
Show resolved
Hide resolved
google-cloud-storage/samples/storage_set_encryption_enforcement_config.rb
Outdated
Show resolved
Hide resolved
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for configuring bucket encryption enforcement for customer-managed, customer-supplied, and Google-managed keys. The changes include adding accessor methods on the Bucket class, acceptance tests for the new functionality, and sample scripts demonstrating how to use it. The implementation looks good overall. I've found a few minor issues in the documentation and sample code, including a potential crash in one of the samples if an encryption config is not set. Please see my detailed comments for suggestions.
google-cloud-storage/samples/storage_get_encryption_enforcement_config.rb
Outdated
Show resolved
Hide resolved
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for bucket encryption enforcement configurations. The changes are well-implemented, adding accessors to the Bucket class, along with comprehensive acceptance tests and usage samples. The code is clean and follows existing patterns. I've provided a few suggestions to improve the clarity of the API documentation for the new methods.
|
/gemini review |
There was a problem hiding this comment.
Code Review
The pull request introduces new functionality for managing bucket encryption enforcement configurations (customer-managed, customer-supplied, and Google-managed). This includes adding getter and setter methods in the Bucket class, new acceptance tests, and sample code for setting, getting, and clearing these configurations. The changes are well-structured and follow the existing patterns in the codebase. I've identified a few areas for improvement regarding consistency and clarity in the documentation and test setup.
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
| bucket = storage.create_bucket bucket_name do |b| | ||
| b.customer_managed_encryption_enforcement_config = customer_managed_config | ||
| b.customer_supplied_encryption_enforcement_config = customer_supplied_config | ||
| b.google_managed_encryption_enforcement_config = google_managed_config |
There was a problem hiding this comment.
add kms_key sample also
There was a problem hiding this comment.
samples for default kms key are already there
https://github.com/shubhangi-google/google-cloud-ruby/blob/main/google-cloud-storage/samples/storage_set_bucket_default_kms_key.rb
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:
bundle exec rake ciin the gem subdirectory.closes: #<issue_number_goes_here>