-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
docs(iam): update comments and terminology in IAM samples #13118
base: main
Are you sure you want to change the base?
docs(iam): update comments and terminology in IAM samples #13118
Conversation
There was a problem hiding this 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 quickly get up to speed:
This pull request, submitted by @eapl-gemugami, updates comments and terminology in IAM samples. The goal is to improve clarity and consistency across the documentation. Specifically, the changes involve replacing the term "member" with "principal" in several files to reflect best practices and Google Cloud's terminology.
Here's a breakdown of the changes:
-
Files Modified:
iam/cloud-client/snippets/iam_modify_policy_add_role.py
: Changed parametermember
toprincipal
inmodify_policy_add_role
function (lines 17-23).iam/cloud-client/snippets/modify_policy_add_member.py
: Changed parametermember
toprincipal
, updated docstring to reference principal IDs, and removed outdated member format examples (lines 24-41 and 50-55).iam/cloud-client/snippets/modify_policy_remove_member.py
: Changed parametermember
toprincipal
, updated docstring to reference principal IDs, and removed outdated member format examples (lines 24-41).iam/cloud-client/snippets/quickstart.py
: Changed parametermember
toprincipal
throughout thequickstart
function and updated comments to reflect the change (lines 21-51, 79-98, 102-127).
-
Summary of Changes: The core change is a consistent renaming of the
member
parameter toprincipal
across multiple IAM sample files. The documentation has also been updated to improve clarity and point to the correct documentation for principal ID formats.
The author has indicated that all tests and lint checks have passed.
Let me know if you have any questions.
And now, a little haiku to brighten your day:
Code flows like a stream,
Clear and concise, a clean fix,
Review's swift and kind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request updates comments and terminology in IAM samples, replacing "member" with "principal." This change improves clarity and aligns the samples with current IAM documentation. The changes are well-implemented and follow the sample guidelines. I have referenced the Sample Guidelines from AUTHORING_GUIDE.MD, specifically the sections on Coding Style, Documenting Arguments, and Documenting Types, in this review.
- Fix google.api_core.exceptions.InvalidArgument: 400 Service account [EMAIL] does not exist on Python 3.13
- Fix "The {email} service account was not deleted." for Python 3.13 CI
- Fix 'NotFound: 404 Service account [NAME] does not exist.' - Fix 'Aborted: 409 There were concurrent policy changes. Please retry the whole read-modify-write with exponential backoff.'
Description
Follow-up of #13010 and #13097
Checklist
nox -s py-3.13
(see Test Environment Setup)nox -s lint
(see Test Environment Setup)