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: Adding API v2 Bigquery samples #3823

Closed

Conversation

thokalavinod
Copy link

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

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)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • 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

@thokalavinod thokalavinod requested review from a team as code owners September 4, 2024 02:29
Copy link

snippet-bot bot commented Sep 4, 2024

No region tags are edited in this PR.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: securitycenter Issues related to the Security Command Center API. api: workflows Issues related to the Workflows API. labels Sep 4, 2024
@iennae iennae assigned subfuzion and unassigned iennae Sep 4, 2024
@thokalavinod thokalavinod changed the title Bigquery samples feat: Adding API v2 Bigquery samples Sep 5, 2024
@iennae
Copy link
Contributor

iennae commented Nov 18, 2024

@gemini review

Copy link

@code-review-assist-experimental code-review-assist-experimental bot left a comment

Choose a reason for hiding this comment

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

This pull request adds API v2 BigQuery samples, which is a valuable addition. The code is well-structured and the tests seem comprehensive. However, there are a few minor suggestions for improvement.

The checklist in the description is not fully completed. Please ensure all boxes are checked and necessary information is provided before merging.

Consider adding a section to the README explaining how to use the new BigQuery export functionality. This would help users understand the purpose of the samples and how to integrate them into their own projects.

@@ -19,6 +19,7 @@ on:
- main
paths:
- 'security-center/snippets/v1/**'
- 'security-center/snippets/v2/**'

Choose a reason for hiding this comment

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

low

This workflow file now includes the v2 snippets, so consider renaming the workflow file to reflect this, or creating a new workflow file specifically for the v2 snippets for better organization.

@@ -94,5 +94,6 @@
"video-intelligence",
"vision/productSearch",
"workflows",
"workflows/invoke-private-endpoint"
"workflows/invoke-private-endpoint",
"security-center/snippets/v2"

Choose a reason for hiding this comment

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

low

Consider adding a short description for this new entry to clarify its purpose.

bigQueryExportName: bigQueryExportResponse.name,
untouchedbigQueryExportName: '',
};
console.log('my data bigQueryExport %j', data);

Choose a reason for hiding this comment

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

low

While this log statement is helpful for debugging, consider removing it before merging as it might expose sensitive information in the logs.

'use strict';

/**
* Demonstrates how to create a new security finding in CSCC.

Choose a reason for hiding this comment

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

medium

The description for this function mentions creating a security finding, but the code creates a BigQuery export. Please update the description to accurately reflect the function's purpose.

Suggested change
* Demonstrates how to create a new security finding in CSCC.
/**
* Demonstrates how to create a BigQuery export in CSCC.
*/

Comment on lines 29 to 34
* Required. Name of the BigQuery export to retrieve. The following list shows
* some examples of the format:
* +
* `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
* + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
* + `projects/{project}locations/{location}/bigQueryExports/{export_id}`

Choose a reason for hiding this comment

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

low

The comment mentions retrieving a BigQuery export, but the code updates it. Please correct the comment.

Suggested change
* Required. Name of the BigQuery export to retrieve. The following list shows
* some examples of the format:
* +
* `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
* + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
* + `projects/{project}locations/{location}/bigQueryExports/{export_id}`
/**
* Required. Name of the BigQuery export to update. The following list shows
* some examples of the format:
* `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
* `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
* `projects/{project}locations/{location}/bigQueryExports/{export_id}`
*/

@subfuzion
Copy link
Member

@thokalavinod I resubmitted your PR from a local branch so that workflow tests can run (they won't run for forks): #3919. I'm going to close this PR now. Thanks!

@subfuzion subfuzion closed this Nov 18, 2024
@subfuzion
Copy link
Member

Obsoleted by #3847

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: securitycenter Issues related to the Security Command Center API. api: workflows Issues related to the Workflows API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants