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

docs(iam): update comments and terminology in IAM samples #13118

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

eapl-gemugami
Copy link
Contributor

Description

Follow-up of #13010 and #13097

Checklist

@product-auto-label product-auto-label bot added api: iam Issues related to the Identity and Access Management API. samples Issues that are directly related to samples. labels Jan 31, 2025
Copy link

@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 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 parameter member to principal in modify_policy_add_role function (lines 17-23).
    • iam/cloud-client/snippets/modify_policy_add_member.py: Changed parameter member to principal, 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 parameter member to principal, updated docstring to reference principal IDs, and removed outdated member format examples (lines 24-41).
    • iam/cloud-client/snippets/quickstart.py: Changed parameter member to principal throughout the quickstart 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 to principal 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.

Copy link

@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 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.

@eapl-gemugami eapl-gemugami added snippet-bot:force-run Force snippet-bot runs its logic kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jan 31, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 31, 2025
@snippet-bot snippet-bot bot removed the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
@iennae iennae marked this pull request as ready for review January 31, 2025 03:50
@iennae iennae requested review from a team as code owners January 31, 2025 03:50
@iennae iennae marked this pull request as draft January 31, 2025 04:01
@eapl-gemugami eapl-gemugami marked this pull request as ready for review January 31, 2025 14:39
@eapl-gemugami eapl-gemugami marked this pull request as draft January 31, 2025 15:56
@eapl-gemugami eapl-gemugami added the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
@snippet-bot snippet-bot bot removed the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
- Fix google.api_core.exceptions.InvalidArgument: 400 Service account [EMAIL] does not exist on Python 3.13
@eapl-gemugami eapl-gemugami added the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
@snippet-bot snippet-bot bot removed the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
- Fix "The {email} service account was not deleted." for Python 3.13 CI
@eapl-gemugami eapl-gemugami added the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
@snippet-bot snippet-bot bot removed the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
- 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.'
@eapl-gemugami eapl-gemugami added the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
@snippet-bot snippet-bot bot removed the snippet-bot:force-run Force snippet-bot runs its logic label Jan 31, 2025
@eapl-gemugami eapl-gemugami marked this pull request as ready for review January 31, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: iam Issues related to the Identity and Access Management API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants