-
Notifications
You must be signed in to change notification settings - Fork 0
samples(storagecontrol): add samples for anywhere cache #18
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
ed7ce6d to
7d2e947
Compare
samples(storage): add sample for create anywhere cache samples(storage): add samples for anywhere cache samples(storage): add sample to create anywhere cache samples(storage): add sample to disable anywhere cahce
6603ae8 to
ca82d74
Compare
|
/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 new samples for Storage Control Anywhere Cache and Model Armor features, along with corresponding tests. The changes are generally well-implemented. I've identified a couple of areas for improvement in the test files: one regarding resource cleanup in a test, which could lead to resource leaks, and another concerning code duplication in another test. Addressing these points will improve the robustness and maintainability of the test suite.
modelarmor/api/ModelArmor.Samples.Tests/CreateTemplateWithLabelsTest.cs
Outdated
Show resolved
Hide resolved
|
/gemini summary |
Summary of ChangesThis pull request introduces a comprehensive set of C# sample code for managing Google Cloud Storage's new "anywhere cache" feature, demonstrating how to create, retrieve, list, update, pause, disable, and resume anywhere cache instances. Additionally, it includes new samples and tests for Google Cloud Model Armor, focusing on template creation with labels and metadata, providing practical examples for developers to integrate these functionalities into their applications. Highlights
Changelog
Activity
|
|
/Gemini help |
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) 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. |
|
/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 new samples and corresponding tests for the Model Armor and Storage Control APIs, specifically for the 'anywhere cache' feature. The changes are well-structured and cover the intended functionality. I've provided a few suggestions to improve code consistency, readability, and adherence to best practices, such as using collection initializers, reusing test fixture resources, ensuring consistent namespacing, and correcting license header formatting.
modelarmor/api/ModelArmor.Samples.Tests/CreateTemplateWithLabelsTest.cs
Outdated
Show resolved
Hide resolved
modelarmor/api/ModelArmor.Samples/CreateTemplateWithMetadata.cs
Outdated
Show resolved
Hide resolved
modelarmor/api/ModelArmor.Samples/CreateTemplateWithMetadata.cs
Outdated
Show resolved
Hide resolved
|
/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 new samples for Storage Control's Anywhere Cache feature and also includes new samples and tests for Model Armor. My review focuses on improving code consistency, fixing potential bugs, and addressing style issues. Key points include correcting a potential resource leak in a test, fixing an incorrect property name that would cause a compilation error, and improving consistency across sample files. I've also noted some minor issues in the license headers and documentation.
modelarmor/api/ModelArmor.Samples.Tests/CreateTemplateWithLabelsTest.cs
Outdated
Show resolved
Hide resolved
modelarmor/api/ModelArmor.Samples.Tests/CreateTemplateWithMetadataTest.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
@mahendra-google why those modelarmor files are needed in this PR |
|
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
thiyaguk09
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.
I’ve added a few comments—please address them. Otherwise, everything looks good to me.
storage/api/Storage.Samples/StorageControlCreateAnywhereCache.cs
Outdated
Show resolved
Hide resolved
storage/api/Storage.Samples/StorageControlDisableAnywhereCache.cs
Outdated
Show resolved
Hide resolved
storage/api/Storage.Samples/StorageControlPauseAnywhereCache.cs
Outdated
Show resolved
Hide resolved
storage/api/Storage.Samples/StorageControlResumeAnywhereCache.cs
Outdated
Show resolved
Hide resolved
storage/api/Storage.Samples/StorageControlUpdateAnywhereCache.cs
Outdated
Show resolved
Hide resolved
…torageControlCreateAnywhereCache.cs
thiyaguk09
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
This internal PR adds sample code for the anywhere cache feature, allowing users to:
Canonical PR used as a guide :- PR
Note
Sample tests are not included because of the long operation time.