Skip to content
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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

vatsal-vora-crestdata
Copy link

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

  • I have followed guidelines from CONTRIBUTING.MD and Samples Style Guide
  • Tests pass: npm test (see Testing)
  • Lint pass: npm run lint (see Style)
  • These samples need a new API enabled in testing projects to pass (let us know which ones) - This requires Parameter manager API to be enabled
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones) - This requires GCLOUD_LOCATION to be set otherwise it will use us-central1
  • This pull request is from a branch created directly off of GoogleCloudPlatform/nodejs-docs-samples. Not a fork.
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new sample directory, and I created GitHub Actions workflow for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

Copy link

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.

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: appengine Issues related to the App Engine Admin API API. api: datacatalog Issues related to the Data Catalog API. api: workflows Issues related to the Workflows API. asset: pattern DEE Asset tagging - Pattern. labels Feb 26, 2025
@vatsal-vora-crestdata vatsal-vora-crestdata force-pushed the parametermanager-all-samples branch from 31dd679 to d565135 Compare February 26, 2025 18:03
@eddie-santos
Copy link
Member

/gemini help

Copy link

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

@eddie-santos
Copy link
Member

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a 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.

Comment on lines +41 to +42
// const projectId = 'YOUR_PROJECT_ID';
// const parameterId = 'YOUR_PARAMETER_ID';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
// 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';

Comment on lines +37 to +38
// const projectId = 'YOUR_PROJECT_ID';
// const locationId = 'YOUR_LOCATION_ID';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
// 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';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: appengine Issues related to the App Engine Admin API API. api: datacatalog Issues related to the Data Catalog API. api: workflows Issues related to the Workflows API. asset: pattern DEE Asset tagging - Pattern. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants