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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ensure message fields are copied when building retry request #533

Merged
merged 5 commits into from Mar 17, 2022

Conversation

Mariatta
Copy link
Contributor

@Mariatta Mariatta commented Mar 10, 2022

Use the copy_from() function when building the ReadRowsRequest arguments.

Fixes internal bug #214449800

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 #214449800 馃

Use the to_dict() function when building the ReadRowsRequest arguments.

This way, all available fields in the message will get copied over.
The `message.filter` field needed a special handling, since the to_dict() function doesn't seem to parse the value the way we want it to be.

Fixes internal bug #214449800
@Mariatta Mariatta requested review from a team as code owners March 10, 2022 00:06
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/python-bigtable API. label Mar 10, 2022
@Mariatta Mariatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 10, 2022
@yoshi-kokoro yoshi-kokoro removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Mar 10, 2022
copy_from doesn't copy over "empty" fields, so had to adjust the test case expected values.
Copy link
Contributor

@igorbernstein2 igorbernstein2 left a comment

Choose a reason for hiding this comment

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

It looks like unit tests are broken. Please fix

google/cloud/bigtable/row_data.py Outdated Show resolved Hide resolved
google/cloud/bigtable/row_data.py Show resolved Hide resolved
Copy link
Contributor

@igorbernstein2 igorbernstein2 left a comment

Choose a reason for hiding this comment

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

lgtm

@igorbernstein2 igorbernstein2 merged commit ff7f190 into main Mar 17, 2022
@igorbernstein2 igorbernstein2 deleted the retry-request-fix branch March 17, 2022 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/python-bigtable API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants