feat(secretmanager): Add filter and cmek related samples#3292
feat(secretmanager): Add filter and cmek related samples#3292khilan-crest wants to merge 12 commits intoGoogleCloudPlatform:mainfrom
Conversation
Summary of ChangesHello @khilan-crest, 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 a suite of new C# samples for Google Cloud Secret Manager. These additions aim to broaden the coverage of common Secret Manager operations, specifically focusing on the management of secret metadata like annotations and labels, advanced listing capabilities using filters, and the creation of secrets secured with Customer-Managed Encryption Keys (CMEK). The new samples provide practical, ready-to-use code examples for developers interacting with the Secret Manager API. Highlights
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 adds several new samples and tests for Secret Manager, focusing on features like filtering, CMEK, and managing annotations/labels. The additions are valuable, but I've identified a few areas for improvement. A recurring issue in the new tests is the lack of guaranteed resource cleanup, which could lead to leaked secrets in the test environment. I've suggested using try...finally blocks to make cleanup more robust. Additionally, some samples manually construct resource name strings, which is less safe and inconsistent with other samples that use strongly-typed resource name classes. Finally, one sample contains a misleading log message that could confuse users. My comments provide specific suggestions to address these points.
secretmanager/api/SecretManager.Samples.Tests/DeleteRegionalSecretAnnotationTests.cs
Show resolved
Hide resolved
secretmanager/api/SecretManager.Samples.Tests/DeleteRegionalSecretLabelTests.cs
Show resolved
Hide resolved
secretmanager/api/SecretManager.Samples.Tests/DeleteSecretAnnotationTests.cs
Show resolved
Hide resolved
secretmanager/api/SecretManager.Samples.Tests/ListSecretsWithFilterTests.cs
Show resolved
Hide resolved
secretmanager/api/SecretManager.Samples.Tests/createRegionalSecretWithCmekTests.cs
Show resolved
Hide resolved
secretmanager/api/SecretManager.Samples.Tests/createSecretWithCmekTests.cs
Show resolved
Hide resolved
secretmanager/api/SecretManager.Samples/DeleteRegionalSecretAnnotation.cs
Outdated
Show resolved
Hide resolved
secretmanager/api/SecretManager.Samples/DeleteRegionalSecretLabel.cs
Outdated
Show resolved
Hide resolved
…lan-crest/dotnet-docs-samples into cs_filter_cmek_samples
…lan-crest/dotnet-docs-samples into cs_filter_cmek_samples
…lan-crest/dotnet-docs-samples into cs_filter_cmek_samples
|
Here is the summary of changes. You are about to add 9 region tags.
This comment is generated by snippet-bot.
|
Add filter and cmek related samples