-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Address second part of 477: Remove query(), entity(), and transaction() methods from Dataset. #479
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
Conversation
|
I'm not sure about removing transaction from dataset (and dataset/transactions in general). Is it not valuable to support working on multiple transactions simultaneously? Transactions are not unique to a dataset much less a connection. |
|
@dhermes and it was determined that editing multiple datasets simultaneously was not a valuable enough use case to justify a class which stores dataset-id and forwards methods to connection (so users don't have to track string literals?) it does seem like an edge case, but also I kinda like the abstraction of connection. EDIT: This was addressed briefly in the design doc, but it seems like we are moving towards splitting methods across |
|
RE: "Tracking string literals". Carrying around RE: "Multiple datasets". This support is not being removed. RE: "Splitting methods across All this notwithstanding, the |
|
Other than the fact that Eliminating dataset prevents us from allowing users to associate persistent settings on a per dataset basis, for example, eventually consistent reads, or forced mutations. Instead they have to specify these options each time they call the method in connection. In my mind a dataset was an immutable wrapper for all the optional arguments to mutations and fetches. So the interface for
None of this functionality should be merged into connection, as it all depends on options which could reasonably be different depending on the dataset. All of this could be done with optional arguments to |
|
These seem like great ideas, can we track elsewhere? RE: Methods on from gcloud import datastore
datastore.set_defaults()and then from then forward etc. |
|
@dhermes, you you want to rebase, or should we just merge it manually. |
|
LGTM, by the way. |
|
with that Also would you like me to create an issue? Alternatively I can try to sketch out a basic implementation and make a pull request for discussion. Whichever you prefer. |
Addresses second part of googleapis#477.
|
@elibixby Please file an issue. Let's discuss please before any implementation. |
Address second part of 477: Remove query(), entity(), and transaction() methods from Dataset.
Source-Link: https://togithub.com/googleapis/synthtool/commit/d0f51a0c2a9a6bcca86911eabea9e484baadf64b Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:240b5bcc2bafd450912d2da2be15e62bc6de2cf839823ae4bf94d4f392b451dc
… webhook_prebuilt_telecom sample (#479) * fix: Update previous month logic to avoid zer-index bug * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
fix(deps): require proto-plus>=1.15.0
* docs: remove migrated snippets * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: https://togithub.com/googleapis/synthtool/commit/26c7505b2f76981ec1707b851e1595c8c06e90fc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790
Source-Link: googleapis/synthtool@56da63e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:993a058718e84a82fda04c3177e58f0a43281a996c7c395e0a56ccc4d6d210d7
Source-Link: googleapis/synthtool@0941ef3 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2f90537dd7df70f6b663cd654b1fa5dee483cf6a4edcfd46072b2775be8a23ec Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* fix: construct messages with nested struct * fix lint issues * some cleanup * remove code for handling underscore keys * update commit message * fix style --------- Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* feat: Support PyArrow versions 3.0.0 through 9 (#479) * allow pyarrow < 10 * remove top constraint Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: Tim Swast <swast@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* Add .python-version to .gitignore * Add initial class/test for instrumentation_source * Add version and truncate logic * Add instrumentation tests and severity info * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add method to update and validate existing info * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add .python-version to gitignore * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Implement hook to add instrumentation for logger * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add tests for logger instrumentation logic * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update structured log handler to emit info * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Refactor structured log and add unit test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add side effect to unit test * Ensure that instrumentation info is only called once * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update to environment submodule * Fix linter errors * chore(main): release 3.1.0 (#479) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * docs: Change button in README to .png file (#554) * fix: Change button to .png file * Change the "Guide Me" button to a .png file to work with RST `image` * Avoids `raw` directive disabled by PyPi * Fixes #553 * Fix unexpected unindent in docs Add copy of png file to render correctly in GitHub readme and Sphinx generated docs. * chore(main): release 3.1.1 (#557) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * Update env-tests submodule * Minor format update * Fix system test to skip diagnostic log entry * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update truncation logic based on feedback * Update environment tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Fix broken unit test * Fix broken unit test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Change default name/version * Refactor add_instrumentation Return a new list instead of a mutated original Do not return after first log without info * Add more documentation to validation methods * Refactor add_instrumentation to be more pythonic * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update environemnt tests * Refactor _is_valid and add test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add more detail to method documentation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Move methods to private * Change instumentation_added to private * Fix some issues with validation method Add a test * Fix bug in _add_instrumentation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Simplify string truncation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Remove unused import to fix lint * Remove validate_and_update_instrumentation Simplify code by adding a single instrumentation entry instead of validating potential existing entries * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Remove _is_valid code (no longer checked) * Run nox blacken * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Remove extraneous unit test Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Daniel Sanche <d.sanche14@gmail.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* Add .python-version to .gitignore * Add initial class/test for instrumentation_source * Add version and truncate logic * Add instrumentation tests and severity info * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add method to update and validate existing info * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add .python-version to gitignore * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Implement hook to add instrumentation for logger * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add tests for logger instrumentation logic * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update structured log handler to emit info * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Refactor structured log and add unit test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add side effect to unit test * Ensure that instrumentation info is only called once * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update to environment submodule * Fix linter errors * chore(main): release 3.1.0 (#479) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * docs: Change button in README to .png file (#554) * fix: Change button to .png file * Change the "Guide Me" button to a .png file to work with RST `image` * Avoids `raw` directive disabled by PyPi * Fixes #553 * Fix unexpected unindent in docs Add copy of png file to render correctly in GitHub readme and Sphinx generated docs. * chore(main): release 3.1.1 (#557) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * Update env-tests submodule * Minor format update * Fix system test to skip diagnostic log entry * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update truncation logic based on feedback * Update environment tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Fix broken unit test * Fix broken unit test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Change default name/version * Refactor add_instrumentation Return a new list instead of a mutated original Do not return after first log without info * Add more documentation to validation methods * Refactor add_instrumentation to be more pythonic * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update environemnt tests * Refactor _is_valid and add test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add more detail to method documentation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Move methods to private * Change instumentation_added to private * Fix some issues with validation method Add a test * Fix bug in _add_instrumentation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Simplify string truncation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Remove unused import to fix lint * Remove validate_and_update_instrumentation Simplify code by adding a single instrumentation entry instead of validating potential existing entries * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Remove _is_valid code (no longer checked) * Run nox blacken * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Remove extraneous unit test Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Daniel Sanche <d.sanche14@gmail.com>
NOTE: Has #478 as diffbase.