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

feat: adding support for spanner request options tags #276

Merged
merged 34 commits into from Sep 29, 2021
Merged

feat: adding support for spanner request options tags #276

merged 34 commits into from Sep 29, 2021

Conversation

vi3k6i5
Copy link
Contributor

@vi3k6i5 vi3k6i5 commented Mar 16, 2021

Adding request options to relevant methods and adding unit tests for the same.
Fixes #253 🦕

@vi3k6i5 vi3k6i5 requested a review from larkee March 16, 2021 08:07
@vi3k6i5 vi3k6i5 requested a review from a team as a code owner March 16, 2021 08:07
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 16, 2021
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Mar 16, 2021
@vi3k6i5 vi3k6i5 changed the title Spanner request options 2 feat: adding support for spanner request options tags Mar 16, 2021
@vi3k6i5
Copy link
Contributor Author

vi3k6i5 commented Mar 23, 2021

System tests are failure is expected because of pending feature release.

Added sleep time of 200 seconds before looking up the tags in db. Just for validation it's okay for now, this will have to be fixed before we merge with mainline.

@larkee larkee added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 8, 2021
tests/system/test_system.py Outdated Show resolved Hide resolved
tests/system/test_system.py Outdated Show resolved Hide resolved
tests/system/test_system.py Outdated Show resolved Hide resolved
Copy link
Contributor

@larkee larkee left a comment

Choose a reason for hiding this comment

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

Added some comments with more details on transactions.

Additionally, we discussed adding validation but had difficulties due to class inheritance. I think if we add a _read_only attribute to _SnapshotBase and Transaction which is set to True and False respectively, similar to _multi_use, then we should be able to add validation for the request_options.

google/cloud/spanner_v1/batch.py Outdated Show resolved Hide resolved
google/cloud/spanner_v1/snapshot.py Outdated Show resolved Hide resolved
google/cloud/spanner_v1/transaction.py Outdated Show resolved Hide resolved
tests/system/test_system.py Outdated Show resolved Hide resolved
@skuruppu skuruppu requested a review from larkee July 21, 2021 00:58
@snippet-bot
Copy link

snippet-bot bot commented Aug 27, 2021

No region tags are edited in this PR.

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

@vi3k6i5
Copy link
Contributor Author

vi3k6i5 commented Aug 27, 2021

Added some comments with more details on transactions.

Additionally, we discussed adding validation but had difficulties due to class inheritance. I think if we add a _read_only attribute to _SnapshotBase and Transaction which is set to True and False respectively, similar to _multi_use, then we should be able to add validation for the request_options.

Made these changes as well.

@vi3k6i5 vi3k6i5 requested a review from larkee September 10, 2021 08:17
@skuruppu
Copy link
Contributor

@thiagotnunes I ran out of time to review this before I go on vacation. Would you please be able to review and approve on Monday?

@larkee larkee removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 29, 2021
@larkee larkee merged commit e16f376 into googleapis:main Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tagging support on database operations such as reads, queries and transactions.
4 participants