8000 [IAM] Add client initialization to each access.py sample by askmeegs · Pull Request #2297 · GoogleCloudPlatform/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content

[IAM] Add client initialization to each access.py sample #2297

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

Merged
merged 3 commits into from
Jul 24, 2019

Conversation

askmeegs
Copy link
Contributor

Initializes a cloudresourcemanager client in each snippet.

Reason: received a bug report where a user tried to call these functions on an IAM API client, not a ResourceManager client. This sample code lives in the IAM docs, so not being clear about which API is used here could be confusing.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 24, 2019
@askmeegs askmeegs requested a review from tswast July 24, 2019 18:25
@tswast
Copy link
Contributor
tswast commented Jul 24, 2019

Thanks! I agree this will be clearer for users who find these snippets in non-ResourceManager contexts.

@tswast tswast merged commit f25c5d2 into GoogleCloudPlatform:master Jul 24, 2019
gguuss pushed a commit that referenced this pull request Jul 24, 2019
* Initialize client in each IAM access sample

* lint

* lint
8000
@tswast
Copy link
Contributor
tswast commented Jul 25, 2019

Looks like there's maybe a problem with requirements.txt? https://travis-ci.org/GoogleCloudPlatform/python-docs-samples/builds/563281779?utm_medium=notification&utm_source=email is complaining about missing oauth2client.

@tswast
Copy link
Contributor
tswast commented Jul 25, 2019

FYI: in the future, only a subset of the tests run on travis when a PR is from a fork. Best to create a new branch on python-docs-samples, instead. (I usually prefix the branch name with either an issue number or my username)

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0