Skip to content

SecurityCenter: update Code Snippets.#7628

Merged
busunkim96 merged 13 commits into
masterfrom
cscc_examples
Aug 30, 2019
Merged

SecurityCenter: update Code Snippets.#7628
busunkim96 merged 13 commits into
masterfrom
cscc_examples

Conversation

@emkornfield
Copy link
Copy Markdown
Contributor

This should complete the snippets needed for the initial version of the documentation. I'm going through now and adding them to staging, so there might be one or two that need to be refined.

@emkornfield emkornfield requested a review from crwilcox as a code owner April 1, 2019 10:32
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 1, 2019
@crwilcox crwilcox requested a review from busunkim96 April 4, 2019 22:58
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 8, 2019
@busunkim96
Copy link
Copy Markdown
Contributor

@engelke Would you be able to review this?

@tseaver tseaver changed the title CSCC Code Snippets SecurityCenter: update Code Snippets. Apr 17, 2019
@tseaver tseaver added api:securitycenter type: docs Improvement to the documentation for an API. labels Apr 17, 2019
Comment thread securitycenter/docs/snippets_list_assets.py Outdated
Comment thread securitycenter/docs/snippets_findings.py Outdated
Comment thread securitycenter/docs/snippets_findings.py
Comment thread securitycenter/docs/snippets_findings.py Outdated
Comment thread securitycenter/docs/snippets_findings.py
Comment thread securitycenter/docs/snippets_findings.py
)


def test_list_source(organization_id):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What if nobody has set up this organization before running tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Then the tests fail. I have a sample org that I need to enable access to python test service accounts for this repo. Could you provide me with these and i'll can enable them?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@engelke snippets/noxfile.py skips running the snippets if the GCLOUD_ORGANIZATION environment variable is not test.

@emkornfield The default CI account for the google-cloud-python repository is precise-truck-742. Once that project has access to that organization, please have @busunkim96 or @crwilcox change the Kokoro setup to add that environment variable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tseaver I need to full service account associated with the project to grant access, i.e. something like foo@precise-truck-742.iam.gserviceaccount.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@busunkim96 can you provide the right service account to @emkornfield here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@emkornfield I sent you an email with the full account name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@crwilcox @busunkim96 I granted access to the account can you set the environment variable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ORG (1081635000895)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I should set GCLOUD_ORGANIZATION to 1081635000895?

Comment thread securitycenter/docs/snippets_findings.py
Copy link
Copy Markdown
Contributor

@engelke engelke left a comment

Choose a reason for hiding this comment

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

Are these intended to be example code snippets (in which case I suggest they belong in python-docs-samples, not here) or tests of the libraries? Many of the _test procedures aren't tests at all, just examples.

Please clarify, or move to python-docs-samples and restructure the code as snippets (examples) and tests (to test the examples) instead of having a single kind of file.

@tseaver
Copy link
Copy Markdown
Contributor

tseaver commented May 14, 2019

@engelke

Are these intended to be example code snippets (in which case I suggest they belong in python-docs-samples, not here) or tests of the libraries?

That isn't consistent across the API libraries: we host snippets here for a number of them (bigquery, bigtable, logging, and storage.

@yoshi-automation yoshi-automation removed the 🚨 This issue needs some love. label Jul 3, 2019
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 30, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 30, 2019
@busunkim96 busunkim96 merged commit db481bf into master Aug 30, 2019
@tseaver tseaver deleted the cscc_examples branch September 5, 2019 00:00
emar-kar pushed a commit to MaxxleLLC/google-cloud-python that referenced this pull request Sep 11, 2019
emar-kar pushed a commit to MaxxleLLC/google-cloud-python that referenced this pull request Sep 18, 2019
parthea pushed a commit that referenced this pull request Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. type: docs Improvement to the documentation for an API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants