Uh oh!
There was an error while loading. Please reload this page.
Adding one-time RPC to find unaliased / true dataset ID. - #528
Conversation
coveralls
commented
Jan 9, 2015
coveralls
commented
Jan 9, 2015
pcostell
commented
Jan 9, 2015
Pretty soon the datastore will normalize all types of keys, so you should never need to provide anything except the project id. Importantly, In the near-future we don't want anyone to have to deal with the "s~", it should be purely an implementation detail of the Datastore. I think the client libraries should probably be written pretending the "s~" doesn't exist since it is cleaner that way (with the caveat that it is slightly broken atm). |
dhermes
commented
Jan 9, 2015
Thanks for the quick followup. That is great news! It will certainly be much cleaner if we can ignore How do you mean normalize? Currently it seems some normalization is happening, but that means if I send no dataset ID in the request and |
pcostell
commented
Jan 9, 2015
I believe the goal is that everywhere you will specify @eddavisson can you confirm? |
eddavisson
commented
Jan 9, 2015
That's correct. Note that if you want to do a one-time RPC in the mean time, you can do a Lookup request and check both the found and missing fields in the response for the resolved dataset id (basically what you're doing in this pull request but it's a read-only RPC). |
dhermes
commented
Jan 9, 2015
I didn't think to use UPDATE: DERP, no projection on lookup. |
silvolu
commented
Jan 9, 2015
I think we should go forward with @eddavisson suggestion while waiting for the API updates to land. |
coveralls
commented
Jan 9, 2015
dhermes
commented
Jan 9, 2015
@pcostell RE: foreign keys. I'm not sure why that's an issue if the application is managing those keys. I double checked and the backend does not change the foreign dataset ID after storing (seems it shouldn't, for privacy reasons). From 0525530: >>>fromgcloudimportdatastore>>>fromgcloud.datastoreimport_implicit_environ>>>fromgcloud.datastore.entityimportEntity>>>fromgcloud.datastore.keyimportKey>>>>>>datastore.set_default_connection()
>>>dataset_id='foo'>>>datastore.set_default_dataset_id(dataset_id)
>>>>>>e=Entity(key=Key('Foo', 1))
>>>e['bar'] =Key('Baz', 1, dataset_id='foreignappid')
>>>e.save()
>>>>>>e_retrieved=datastore.get(e.key)
>>>e_retrieved['bar'].dataset_idu'foreignappid'>>>>>>entity_pb, =_implicit_environ.CONNECTION.lookup(
... dataset_id=dataset_id,
... key_pbs=[e.key.to_protobuf()],
... )
>>>entity_pb.property
[<gcloud.datastore.datastore_v1_pb2.Propertyobjectat0x7f4a5006d398>]
>>>printentity_pb.property[0].value.key_valuepartition_id {
dataset_id: "foreignappid"
}
path_element {
kind: "Baz"id: 1
}
>>>e.key.delete()FWIW I tried this both with a foreign dataset that my (user, not service account) OAuth 2.0 token had access to and one that the token did not. |
pcostell
commented
Jan 12, 2015
I believe we want to remove the notion of "s~" completely. So anywhere the user interacts with a dataset it should never have this extra prefix, including foreign keys. Note that this is not implemented, so it isn't finalized and definitely won't work yet. |
ab4c103 to
0cf4333Comparecoveralls
commented
Jan 12, 2015
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
0cf4333 to
31fd6fdComparedhermes
commented
Jan 15, 2015
coveralls
commented
Jan 15, 2015
Changes Unknown when pulling 31fd6fd on dhermes:non-fuzzy-app-id into * on GoogleCloudPlatform:master*. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
tseaver
commented
Jan 15, 2015
LGTM. |
31fd6fd to
612a569Comparedhermes
commented
Jan 15, 2015
@tseaver We can't / shouldn't merge this until the discussion above is resolved. |
612a569 to
5d631a6Comparecoveralls
commented
Jan 15, 2015
Also removing unnecessary functions that are no longer needed since there is no need to muck with the dataset ID.
0c4f4c6 to
9b0f87aComparecoveralls
commented
Feb 5, 2015
Done via: - Moving `_add_keys_to_request` definition to connection module - Removing only other use (in `batch`, was not a list of keys) - Copying `_prepare_key_for_request` from helpers (googleapis#528 would be nice, since we could just remove `_prepare_key_for_request` all together)
Done via: - Moving `_add_keys_to_request` definition to connection module - Removing only other use (in `batch`, was not a list of keys) - Copying `_prepare_key_for_request` from helpers (googleapis#528 would be nice, since we could just remove `_prepare_key_for_request` all together)
dhermes
commented
Apr 13, 2015
Source-Link: https://togithub.com/googleapis/synthtool/commit/cb960373d12d20f8dc38beee2bf884d49627165e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore: Update gapic-generator-python to v1.9.0 PiperOrigin-RevId: 517425588 Source-Link: googleapis/googleapis@33c93eb Source-Link: googleapis/googleapis-gen@d5f5978 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDVmNTk3ODlkMTlmYzQzMjcwZmYyMTI0OTY3ZDRlYzg5OTJiOGU4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: Fix formatting of request arg in docstring chore: Update gapic-generator-python to v1.9.1 PiperOrigin-RevId: 518604533 Source-Link: googleapis/googleapis@8a085ae Source-Link: googleapis/googleapis-gen@b2ab4b0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJhYjRiMGEwYWUyOTA3ZTgxMmMyMDkxOThhNzRlMDg5OGFmY2IwNCJ9 * 🦉 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: Add support for python 3.11 chore: Update gapic-generator-python to v1.8.0 PiperOrigin-RevId: 500768693 Source-Link: googleapis/googleapis@190b612 Source-Link: googleapis/googleapis-gen@7bf29a4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update setup.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore(deps): update all dependencies * revert ipython * add dependency ipywidgets Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies * revert ipython * add dependency ipywidgets Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Source-Link: googleapis/synthtool@82f5cb2 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5d8da01438ece4021d135433f2cf3227aa39ef0eaccc941d62aa35e6902832ae Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
#528) * Narrow acceptable RSA versions to maintain Python 2 compat * Update setup.py Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com> * Use a more specific pin to support new versions that may support python 2. * Update setup.py Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> * how many commits to get the format correct? Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com> Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
🤖 I have created a release \*beep\* \*boop\* --- ### [1.17.1](https://www.github.com/googleapis/google-auth-library-python/compare/v1.17.0...v1.17.1) (2020-06-11) ### Bug Fixes * narrow acceptable RSA versions to maintain Python 2 compatability ([#528](https://www.github.com/googleapis/google-auth-library-python/issues/528)) ([9434868](https://www.github.com/googleapis/google-auth-library-python/commit/9434868a6789464549af1d4562f62d8a899b6809)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Related to #528. RSA seems to have released another version without `python_requires` being enforced. This will guard against that for our package.
Also removing unnecessary functions that are no longer
needed since there is no need to muck with the dataset ID.
@tseaver This is really an exploratory PR, no need to review just yet.
@pcostell Can you check out the
_find_true_dataset_idmethod ingcloud/datastore/__init__.py(feel free to ignore the rest).Is this a dumb idea? Is there an actual API available to convert from the "human friendly" ID
footo the unaliased / prefixeds~foo?