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

ci: attempt to enable new CI for security-center #3966

Merged
merged 3 commits into from
Jan 31, 2025

Conversation

briandorsey
Copy link
Member

@briandorsey briandorsey commented Jan 30, 2025

Description

CI related config change. Adding ci-setup.json to support running these tests under the new CI runner. No changes to tests themselves.

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

@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. labels Jan 30, 2025
Copy link
Contributor

@code-review-assist code-review-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.

Hi team,

I'm currently reviewing this pull request and will provide my feedback shortly. In the meantime, here's a summary of the changes for you and other reviewers to get up to speed quickly:

This pull request, authored by briandorsey, aims to enable a new CI for the security-center samples. The changes are focused on CI configuration and don't modify the tests themselves.

Here's a breakdown of the changes:

  • Added ci-setup.json: This file contains configuration settings (GCLOUD_ORGANIZATION and GOOGLE_SAMPLES_PROJECT) necessary for running the CI on the new runner. This file is located at security-center/snippets/ci-setup.json and contains the following:
{
  "GCLOUD_ORGANIZATION": "1081635000895",
  "GOOGLE_SAMPLES_PROJECT": "long-door-651"
}
  • Updated nodejs-dev.jsonc: The security-center/snippets directory was added to the list of samples included in the development CI configuration. The line was added between lines 196 and 197.
  • Updated nodejs-prod.jsonc: The security-center/snippets directory was removed from the list of samples excluded in the production CI configuration. This was line 105, which was removed.

The author has indicated that tests haven't been modified, but I will verify this during my review. I'll also check the overall functionality and ensure the new CI setup works as intended.


A little haiku to brighten your day:

Code flows like a stream,
New CI builds, a steady hand,
Bugs flee in the night.

Thanks,
Gemini

Copy link
Contributor

@code-review-assist code-review-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.

This pull request adds CI configuration for the security-center/snippets directory, enabling it to run under the new CI runner. This is a positive change that improves the reliability and automation of the test suite. The added ci-setup.json file provides the necessary environment variables for the tests. The removal of security-center/snippets from the exclude-packages list in .github/config/nodejs-prod.jsonc is also correct. However, the checklist items related to testing and linting haven't been completed. It's crucial to ensure tests pass and linting is clean before merging. I've also noticed a few minor style inconsistencies in the ci-setup.json file. I'm referencing elements from the Samples Style Guide in this review.

@briandorsey briandorsey marked this pull request as ready for review January 31, 2025 00:12
@briandorsey briandorsey requested review from a team as code owners January 31, 2025 00:12
@briandorsey
Copy link
Member Author

This final test run looks a bit weird because I removed the ci-setup.json in the package directory since it's not needed, so those tests didn't run this time. They did run successfully on the last two checkins, though.

@davidcavazos davidcavazos merged commit 28b03c8 into main Jan 31, 2025
11 checks passed
@davidcavazos davidcavazos deleted the briandorsey_ci_security-center branch January 31, 2025 00:17
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. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants