Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

feat: add fields parameter to set_iam_policy for consistency with update methods - #1872

Merged
tswast merged 2 commits into
mainfrom
issue1871-get_iam_policy-set_iam_policy
Mar 27, 2024
Merged

feat: add fields parameter to set_iam_policy for consistency with update methods#1872
tswast merged 2 commits into
mainfrom
issue1871-get_iam_policy-set_iam_policy

Conversation

@tswast

@tswasttswast commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

Also:

  • Add docstrings for get_iam_policy and set_iam_policy
  • Add code sample for get_iam_policy and set_iam_policy

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes#1871 🦕

@tswast
tswast requested a review from a teamMarch 26, 2024 15:46
@tswast
tswast requested a review from a team as a code ownerMarch 26, 2024 15:46
@tswast
tswast requested review from a team, engelke and farhan0102March 26, 2024 15:46
@snippet-bot

snippet-botBot commented Mar 26, 2024

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

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

@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. labels Mar 26, 2024
@tswast
tswast requested a review from LinchinMarch 26, 2024 15:46
def test_create_iam_policy(table_id: str):
your_table_id = table_id

# [START bigquery_create_iam_policy]

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

got_rows = self._fetch_single_page(dest_table)
self.assertTrue(len(got_rows) > 0)

def test_get_set_iam_policy(self):

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This test is now redundant with a code sample which serves the same purpose with regards to testing.

@chalmerlowechalmerlowe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@tswast
tswast enabled auto-merge (squash) March 27, 2024 14:59
@tswast
tswast merged commit 08b1e6f into mainMar 27, 2024
@tswast
tswast deleted the issue1871-get_iam_policy-set_iam_policy branch March 27, 2024 15:28
@release-pleaserelease-pleaseBot mentioned this pull request Mar 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.size: mPull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_iam_policy and set_iam_policy are missing doc strings

2 participants

@tswast@chalmerlowe