-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix #484: Remove dataset from entity #488
Conversation
Also: - Dropping dataset and kind from Entity constructor. - Dropping Entity.from_path factory. - Removing Connection.dataset(). - helpers.entity_from_protobuf() no longer requires dataset. - Making Entity.key a data attribute instead of a getter/setter method. - Removing Entity.dataset() (since no longer stored). - Making Entity.kind() and Entity.exclude_from_indexes() @Property's. - Removing Entity._must_dataset (no longer needed). - Adding optional connection argument to Entity.save() and Entity.reload(). - Making Entity.save() and Entity.reload() return nothing. - Updating regression/datastore.py for changes.
0dbf10c
to
1dab892
Compare
@tseaver Rebase completed. PTAL. |
Looks OK. No impact on regression tests? |
The impact is the code looks nicer every time we throw something away 👍 LGTY? |
Yes -- I just didn't see any changes in the regression side. |
They're there, at the very bottom. |
Fix #484: Remove dataset from entity
We have regression failures right now. |
Where? If you're referring to build 808, that was a transitive failure (we should add retries so flakes stop occurring so often). UPDATE: Don't see any failures on PR builds: https://travis-ci.org/GoogleCloudPlatform/gcloud-python/pull_requests (latest is 819) |
Like so:
|
The test is I made |
Ugh:
|
Yeah, I will fix the utility after we get stable again. In the meantime: from gcloud import datastore
from gcloud.datastore.query import Query
datastore.set_default_connection()
datastore.set_default_dataset(dataset_id='foo')
q = Query(kind='Post')
for post in q.fetch():
post.key.delete() |
That works, but |
It could be that the tests don't run in a deterministic way? But each case cleans up after itself transactionally so it shouldn't matter. It should only fail if there are non-deleted keys. Are you using the same dataset ID for tests and in the snippet above? Do you have other failures occurring before that test gets run (hence failed deletes)? |
No other failures; I'm running by doing:
but the regression test still fails. |
Can you print the failure message? (Is it same as above?) |
The 'id' fields in the keys are different; everything else is the same. |
Uhoh: |
It's good to have found that though. |
So, now I've deleted them, and my regression tests are passing. |
w00t. Gonna supply some code in your issue which illustrates this regression. |
* Generate protos for Models API. The Models API is a component of the bigquery_v2 interface. It is not available as a gRPC API, but it does provide protocol buffers. This commit adds those protocol buffers to the client so that they can be used to avoid much manual work to create resource classes that can be serialized to/from JSON.
Source-Link: https://togithub.com/googleapis/synthtool/commit/26c7505b2f76981ec1707b851e1595c8c06e90fc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790
Source-Link: https://togithub.com/googleapis/synthtool/commit/26c7505b2f76981ec1707b851e1595c8c06e90fc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790
Source-Link: https://togithub.com/googleapis/synthtool/commit/26c7505b2f76981ec1707b851e1595c8c06e90fc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790
Source-Link: https://togithub.com/googleapis/synthtool/commit/26c7505b2f76981ec1707b851e1595c8c06e90fc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790
* feat: ResponseMessage proto contains channel information docs: updated go library package PiperOrigin-RevId: 501638939 Source-Link: googleapis/googleapis@529c07a Source-Link: googleapis/googleapis-gen@6dc5598 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmRjNTU5OGZhY2VjY2UyZTUyMDRjMzVhY2JlMmU0NjBmOWVjYTcxYyJ9 * 🦉 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>
* feat: added HUMAN_INTERVENTION_NEEDED type in ConversationEvent feat: added SetSuggestionFeatureConfig and ClearSuggestionFeatureConfig apis feat: added AGENT_FACING_SMART_REPLY type in KnowledgeType feat: added GcsDestination. docs: added explanation for uri fields in resources docs: added explanation for SuggestionResult docs: added explanation for language code in session PiperOrigin-RevId: 435479473 Source-Link: googleapis/googleapis@d9ca515 Source-Link: googleapis/googleapis-gen@358c4b9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzU4YzRiOWIxZGYxNDliYzUwNjIwYmMzODExMDA0ZjkxM2Q0MzIzNiJ9 * 🦉 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/0ddbff8012e47cde4462fe3f9feab01fbc4cdfd6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bced5ca77c4dda0fd2f5d845d4035fc3c5d3d6b81f245246a36aee114970082b
…p/templates/python_library/.kokoro (#488) Source-Link: https://togithub.com/googleapis/synthtool/commit/bb171351c3946d3c3c32e60f5f18cee8c464ec51 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f62c53736eccb0c4934a3ea9316e0d57696bb49c1a7c86c726e9bb8a2f87dadf
Source-Link: googleapis/synthtool@56da63e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:993a058718e84a82fda04c3177e58f0a43281a996c7c395e0a56ccc4d6d210d7
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@909573c Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ddf4551385d566771dc713090feb7b4c1164fb8a698fe52bbe7670b24236565b 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
Also:
dataset
andkind
fromEntity
constructor.Entity.from_path
factory.Connection.dataset()
quasi-factory.helpers.entity_from_protobuf()
no longer accepts / needsdataset
.Entity.key
a data attribute instead of a getter/setter method.Entity.dataset()
(since no longer stored).Entity.kind()
andEntity.exclude_from_indexes()
into@property
's.Entity._must_dataset
(no longer needed).Entity.save()
andEntity.reload()
.Entity.save()
andEntity.reload()
return nothing.regression/datastore.py
for changes.Fix #484
NOTE: Has #483 as diffbase.