Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: AccessEntry API representation parsing#1682

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@jonathan-ostrander
Copy link
Contributor

Overriding theAccessEntry#_properties with a deep copy of the API resource overwrites therole property set inAccessEntry.__init__ which isn't present in the resource if therole is set toNone. This causesAccessEntrys generated from API representations to no longer evaluate to equal with equivalentAccessEntry resources instantiated throughAccessEntry.__init__. The added unit test fails without the change and passes with the change.

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 abug/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#1681 🦕

Overriding the `AccessEntry#_properties` with a deep copy of the API resource overwrites the `role` property set in `AccessEntry.__init__` which isn't present in the resource if the `role` is set to `None`. This causes `AccessEntry`s generated from API representations to no longer evaluate to equal with equivalent `AccessEntry` resources instantiated through `AccessEntry.__init__`. The added unit test fails without the change and passes with the change.
@product-auto-labelproduct-auto-labelbot added size: sPull request size is small. api: bigqueryIssues related to the googleapis/python-bigquery API. labelsOct 13, 2023
@LinchinLinchin added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelOct 17, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelOct 17, 2023
@LinchinLinchin requested review fromLinchin andchalmerlowe and removed request forPhongChuongOctober 17, 2023 16:47
@Linchin
Copy link
Contributor

Hi@jonathan-ostrander, thank you so much for your contribution! The PR looks good, but it seems the lint test failed. As seen in the kokoro results:
image

Please see theinstructions in the contribution doc for more info on coding style. If you need any help, please let us know! :)

Copy link
Contributor

@LinchinLinchin left a comment

Choose a reason for hiding this comment

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

please fix linting error

@jonathan-ostrander
Copy link
ContributorAuthor

@Linchin should be fixed in15153e6 although I couldn't get nox working locally so I just ran black.

@dandhleedandhlee added the kokoro:runAdd this label to force Kokoro to re-run the tests. labelOct 18, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:runAdd this label to force Kokoro to re-run the tests. labelOct 18, 2023
@LinchinLinchin added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelOct 19, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelOct 19, 2023
@LinchinLinchin added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelOct 19, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelOct 19, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@LinchinLinchinLinchin approved these changes

@chalmerlowechalmerloweAwaiting requested review from chalmerlowe

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AccessEntry incorrectly parsed from API Representation

4 participants

@jonathan-ostrander@Linchin@yoshi-kokoro@dandhlee

[8]ページ先頭

©2009-2025 Movatter.jp