nodejs-docs-samples icon indicating copy to clipboard operation
nodejs-docs-samples copied to clipboard

feat:add finding sources iam samples

Open rafaelMurata opened this issue 1 year ago • 1 comments

Description

b/339808836

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

rafaelMurata avatar Jun 26 '24 14:06 rafaelMurata

Here is the summary of changes.

You are about to add 17 region tags.

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

snippet-bot[bot] avatar Jun 26 '24 14:06 snippet-bot[bot]

Hi @rafaelMurata, thanks for submitting. I'm going to take a look at this and your other pending pull requests and get you updates within the next five days.

subfuzion avatar Jul 11 '24 03:07 subfuzion

Hi @rafaelMurata, I've been involved in a deep dive on security, but I just did an analysis on why tests are failing for your pull request. Here are steps for you to follow to be able to get this over the line. You can reference the commits in my experimental pull request for guidance: #3743

  1. Rebase on main. I made changes (merged in #3744) to the security-center v1 workflow paths to isolate tests from v2 and make diagnosing issues easier.

  2. Amend the commit message. It fails the convention commit test. Insert a space following the colon of the commit message.

    Change: "​​feat:add finding sources iam samples"

    to: "feat: add finding sources iam samples"

  3. Update paths for security-center-snippets-v2.yaml. See this commit: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/pull/3743/commits/5bfdac6f9aceaa18a3c4d53c81d0f83304ac67aa

  4. Ensure GCLOUD_ORGANIZATION is set before using test.yaml. See this commit: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/pull/3743/commits/f4deec01098d0ac4185c8807d8a874e74d015f97

    Also fix projectId (see the diff for findings.test.js in the same commit).

    Note: you might also be able to set the GCLOUD_ORGANIZATIONenvironment variable using a repository variable (tested in this commit: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/pull/3743/commits/dcbefb343dd916dfd8fc6269105a702df559c73e), but this is experimental and it's not clear yet if we'll keep it. I'll shoot to have an answer by tomorrow.

  5. Force push your changes to update the pull request.

    This should leave two final test failures (matching the experimental PR: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/actions/runs/9985548491/job/27596569424?pr=3743#step:11:45).

    Error: spawnSync /bin/sh ENOBUFS

    This is due to exceeding the output buffer for exec. To resolve the issue, try experimenting with setting exec's maxBuffer to a larger size or perhaps consider using spawn instead of exec since that will stream output instead of buffering it.

subfuzion avatar Jul 18 '24 06:07 subfuzion