-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: add bucket encryption enforcement configuration #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @thiyaguk09, 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 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. 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
|
|
/gemini review |
There was a problem hiding this 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 adds support for encryption enforcement configurations in BucketMetadata, which is a great feature. The interface changes and JSDoc examples are clear. However, the new unit tests for setMetadata are flawed as they mock the method being tested, rendering them ineffective. I've provided a detailed comment with a suggestion on how to fix this to ensure the new functionality is properly tested.
There was a problem hiding this 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 adds support for encryption enforcement configurations in BucketMetadata. The changes to the BucketMetadata interface and the addition of the EncryptionEnforcementConfig interface are correct. The new JSDoc example is also a good addition.
However, the new unit tests for setMetadata are not effectively testing the functionality. They mock the method under test, which makes them tautological. I've provided a detailed comment with a suggestion on how to refactor them to properly test the behavior by mocking the underlying request method.
|
/gemini review |
There was a problem hiding this 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 support for encryption enforcement configurations in BucketMetadata, allowing for more granular control over object encryption within a bucket. The changes include updates to the BucketMetadata interface, new JSDoc examples, and a comprehensive set of new samples and tests.
The implementation looks solid, but I've found a few issues:
- A minor typo in a log message within one of the new sample files.
- Several system tests have assertions that do not match the output of the sample scripts they are testing, which will cause them to fail.
- The new unit tests for
setMetadataare flawed as they mock the method under test, rendering them ineffective. I've provided a detailed comment on how to refactor them.
Addressing these points will improve the quality and correctness of the new code and its tests.
Implement support for GoogleManaged, CustomerManaged, and CustomerSupplied encryption enforcement configurations in BucketMetadata. This allows buckets to restrict object creation based on encryption types. - Update BucketMetadata interface with new enforcement config fields - Add unit tests for metadata parsing, patching, and serialization - Include JSDoc examples for configuring CMEK-only enforcement
Adds comprehensive code samples and system tests to verify Google-managed, Customer-managed, and Customer-supplied encryption enforcement logic. - Add setBucketEncryptionEnforcementConfig.js sample - Add getBucketEncryptionEnforcementConfig.js sample - Add removeAllBucketEncryptionEnforcementConfig.js sample - Add system tests to verify CLI output and backend metadata state - Ensure server-side effectiveTime is correctly captured and displayed
1408130 to
1a72da1
Compare
mahendra-google
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Impact
Testing
Additional Information
Checklist
Fixes #🦕