-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(parametermanager): Added global and regional samples for parameter manager #3993
base: main
Are you sure you want to change the base?
feat(parametermanager): Added global and regional samples for parameter manager #3993
Conversation
Important The terms of service for this installation has not been accepted. Please ask the Organization owners to visit the Gemini Code Assist Admin Console to sign it. |
31dd679
to
d565135
Compare
/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 is currently in preview and 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 to provide feedback. |
/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
The pull request adds samples for the Global and Regional Parameter Manager API. The samples cover a wide range of functionalities and provide useful examples for developers. Overall, the code is well-structured and easy to follow. I have provided some suggestions for improvement in the review comments.
Summary of Findings
- TODO Comments: The code contains TODO comments with developer instructions to uncomment variables. Consider providing default values or a more descriptive approach to guide users.
- Copyright Year: The copyright year is set to 2025. Please confirm if this is the intended year.
- Consistent Parameter Version ID: In some samples, the parameterVersionId is hardcoded as 'v1'. Consider allowing users to specify this value as an argument.
Assessment
The pull request introduces samples for the Global and Regional Parameter Manager API. The code appears well-structured and includes comprehensive samples covering various functionalities. However, there are a few areas where improvements can be made to enhance clarity and maintainability. I recommend addressing these comments before merging, and users should have others review and approve this code before merging.
// const projectId = 'YOUR_PROJECT_ID'; | ||
// const parameterId = 'YOUR_PARAMETER_ID'; |
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.
Consider providing default values for projectId
, parameterId
, and parameterVersionId
within the TODO section to make it easier for developers to test the sample without immediately modifying the code.
// const projectId = 'YOUR_PROJECT_ID'; | |
// const parameterId = 'YOUR_PARAMETER_ID'; | |
// const projectId = 'YOUR_PROJECT_ID' || 'my-project'; | |
// const parameterId = 'YOUR_PARAMETER_ID' || 'my-parameter'; | |
// const parameterVersionId = 'YOUR_PARAMETER_VERSION_ID' || 'v1'; |
// const projectId = 'YOUR_PROJECT_ID'; | ||
// const locationId = 'YOUR_LOCATION_ID'; |
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.
Consider providing default values for projectId
, locationId
, parameterId
, and parameterVersionId
within the TODO section to make it easier for developers to test the sample without immediately modifying the code.
// const projectId = 'YOUR_PROJECT_ID'; | |
// const locationId = 'YOUR_LOCATION_ID'; | |
// const projectId = 'YOUR_PROJECT_ID' || 'my-project'; | |
// const locationId = 'YOUR_LOCATION_ID' || 'us-central1'; | |
// const parameterId = 'YOUR_PARAMETER_ID' || 'my-parameter'; | |
// const parameterVersionId = 'YOUR_PARAMETER_VERSION_ID' || 'v1'; |
Description
Created samples for Global and Regional Parameter Manager API
Samples (Global, Regional)
quickstart
parameter-structured-data
parameter-unstructured-data
add-parameter-version (structured, unstructured)
create-parameter-secret-reference
list-all-parameters
view-parameter-details
delete-parameter
list-all-parameters-versions
view-parameter-version-details
render-secret-parameter-version
disable-parameters-version
enable-disabled-parameters-version
delete-parameter-version
Checklist
npm test
(see Testing)npm run lint
(see Style)GCLOUD_LOCATION
to be set otherwise it will useus-central1
GoogleCloudPlatform/nodejs-docs-samples
. Not a fork.