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

Add GAE/GCE support for datastore.set_default_dataset and add exception on failure #475

Closed
dhermes opened this issue Dec 30, 2014 · 5 comments · Fixed by #572 or #610
Closed

Add GAE/GCE support for datastore.set_default_dataset and add exception on failure #475

dhermes opened this issue Dec 30, 2014 · 5 comments · Fixed by #572 or #610
Assignees
Labels
api: datastore Issues related to the Datastore API. 🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@dhermes
Copy link
Contributor

dhermes commented Dec 30, 2014

See discussion in #444 for comments on exception.

Something like oauth2client.client._get_environment could be good to detect GAE/GCE dataset ID's but _detect_gce_environment should be better as discussed in googleapis/oauth2client#93

Not blocking for M1.

@dhermes dhermes added the api: datastore Issues related to the Datastore API. label Dec 30, 2014
@dhermes
Copy link
Contributor Author

dhermes commented Jan 9, 2015

Relevant to GAE:

>>> import os
>>> from google.appengine.api import app_identity
>>>
>>> print repr(os.getenv('APPLICATION_ID'))
's~foo'
>>> print repr(app_identity.get_application_id())
'foo'

@dhermes
Copy link
Contributor Author

dhermes commented Jan 11, 2015

Relevant to GCE:

>>> import urllib2
>>> BASE = 'http://metadata.google.internal/'
>>> PROJECT_PATH = 'computeMetadata/v1/project/project-id'
>>> URI = BASE + PROJECT_PATH
>>> request = urllib2.Request(URI, headers={'Metadata-Flavor': 'Google'})
>>> response = urllib2.urlopen(request)
>>> contents = response.read()
>>> response.close()
>>> contents
'foo'

No prefix there.

dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 27, 2015
@dhermes dhermes assigned a-robinson and dhermes and unassigned a-robinson Jan 27, 2015
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Jan 27, 2015
@dhermes
Copy link
Contributor Author

dhermes commented Jan 27, 2015

@tseaver I just realized that #572 does not raise when setting fails.

We can add this in a sweeping way for both packages after #572 goes through? We'll have to determine the difference between "required" defaults (always raise) and "optional" defaults (sometimes raise) for the set_defaults functions.

@dhermes
Copy link
Contributor Author

dhermes commented Jan 27, 2015

Re-opening until exception questions resolved.

@dhermes dhermes reopened this Jan 27, 2015
@jgeewax jgeewax modified the milestones: Datastore Stable, Datastore Future Jan 30, 2015
@jgeewax
Copy link
Contributor

jgeewax commented Feb 3, 2015

This isn't possible with the current dataset_id situation requiring s~ or e~ prefixes in the key protobuf. Moving to Datastore Future since we don't know for sure when this will be fixed.

dhermes added a commit to dhermes/google-cloud-python that referenced this issue Feb 10, 2015
dhermes added a commit to dhermes/google-cloud-python that referenced this issue Feb 12, 2015
tswast added a commit to tswast/google-cloud-python that referenced this issue Nov 29, 2018
* Regenerate google-cloud-bigquery-storage

* Re-synthed
tswast added a commit that referenced this issue Nov 29, 2018
* Generate google-cloud-bigquery-storage library using synthtool. (#472)

* Add simple system test for BigQuery Storage API (#473)

* Add simple system test for BigQuery Storage API

For the system tests to run correctly, an unreleased version of api_core
is required. Updates the setup.py file to indicate the minimum version.

* Remove mock dependency and unnecessary imports.

* Use -e for local deps.

* Add manual client for BigQuery Storage (#474)

* Add manual client for BigQuery Storage.

The manual client adds a default project, which is used by the wrapped
create_read_session to make the project parameter optional.

A future purpose of the manual client is to override the read_rows
method to return an iterator that can reconnect with the correct offset,
much like Spanner's StreamedResultSet class. This work is not yet
complete.  I'd like feedback on the approach for the manual client
first.

* Use same client name as wrapped gapic class.

* Use subclass for BigQueryStorageClient

Also, change create_read_session project argument back to 'parent' to
better match the super class.

* Add unit tests.

* Remove default project from manual client.

* Use project_id fixture in system tests.

* Regenerate google-cloud-bigquery-storage (#475)

* Regenerate google-cloud-bigquery-storage

* Re-synthed

* Handwritten reader to reconnect on ReadRows streams (#477)

* WIP: reader to reconnect on ReadRows streams

* Add method to copy a StreamPosition.

* Add unit tests for hand-written reader module.

* Add docs for new hand-written module.

* Add fastavro to root intersphinx

* Add ServiceUnavailable to list of resumable exceptions.

Pull in .coveragerc file from upstream google-cloud-python.
erikwebb pushed a commit to erikwebb/google-cloud-python that referenced this issue Dec 3, 2018
* Generate google-cloud-bigquery-storage library using synthtool. (googleapis#472)

* Add simple system test for BigQuery Storage API (googleapis#473)

* Add simple system test for BigQuery Storage API

For the system tests to run correctly, an unreleased version of api_core
is required. Updates the setup.py file to indicate the minimum version.

* Remove mock dependency and unnecessary imports.

* Use -e for local deps.

* Add manual client for BigQuery Storage (googleapis#474)

* Add manual client for BigQuery Storage.

The manual client adds a default project, which is used by the wrapped
create_read_session to make the project parameter optional.

A future purpose of the manual client is to override the read_rows
method to return an iterator that can reconnect with the correct offset,
much like Spanner's StreamedResultSet class. This work is not yet
complete.  I'd like feedback on the approach for the manual client
first.

* Use same client name as wrapped gapic class.

* Use subclass for BigQueryStorageClient

Also, change create_read_session project argument back to 'parent' to
better match the super class.

* Add unit tests.

* Remove default project from manual client.

* Use project_id fixture in system tests.

* Regenerate google-cloud-bigquery-storage (googleapis#475)

* Regenerate google-cloud-bigquery-storage

* Re-synthed

* Handwritten reader to reconnect on ReadRows streams (googleapis#477)

* WIP: reader to reconnect on ReadRows streams

* Add method to copy a StreamPosition.

* Add unit tests for hand-written reader module.

* Add docs for new hand-written module.

* Add fastavro to root intersphinx

* Add ServiceUnavailable to list of resumable exceptions.

Pull in .coveragerc file from upstream google-cloud-python.
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 7, 2020
atulep pushed a commit that referenced this issue Apr 3, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this issue Apr 6, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this issue Apr 6, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
atulep pushed a commit that referenced this issue Apr 18, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Jun 4, 2023
…le (#475)

* feat: add support for entries associated with Spanner and ClougBigTable
feat: expand SearchCatalogResponse with totalSize
feat: modify documentation for FQN support
feat: extend ImportApiRequest with jobId parameter

PiperOrigin-RevId: 536127089

Source-Link: googleapis/googleapis@208fb58

Source-Link: googleapis/googleapis-gen@df299c5
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGYyOTljNTg4OGFiMGY1NWYxZGFkNjM5MThhYzg4YjJiMTViYTRlMiJ9

* 🦉 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>
parthea pushed a commit that referenced this issue Aug 15, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
vchudnov-g pushed a commit that referenced this issue Sep 20, 2023
- [ ] Regenerate this pull request now.

docs: clarified wording around Cloud Storage usage
docs: added a new resource name pattern for ConversationModel

PiperOrigin-RevId: 432962774

Source-Link: googleapis/googleapis@5556688

Source-Link: googleapis/googleapis-gen@ca6f30a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2E2ZjMwYTIyMzM0NjlmZjdkYTM2MWZlOWZiNzg3ODRkY2JjNmM3ZSJ9

chore: update copyright year to 2022
PiperOrigin-RevId: 431037888

Source-Link: googleapis/googleapis@b3397f5

Source-Link: googleapis/googleapis-gen@510b54e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTEwYjU0ZTFjZGVmZDUzMTczOTg0ZGYxNjY0NTA4MTMwOGZlODk3ZSJ9

feat: added ConversationModel resource and its APIs
feat: added ConversationDataset resource and its APIs
feat: added SetSuggestionFeatureConfig and ClearSuggestionFeatureConfig APIs for ConversationProfile
feat: added new knowledge type of Document content
feat: added states of Document
feat: added metadata for the Knowledge operation
docs: updated copyright

PiperOrigin-RevId: 430829291

Source-Link: googleapis/googleapis@83795dd

Source-Link: googleapis/googleapis-gen@b6b58a4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjZiNThhNGQ5YjJjZDY2NTdiYjZkNjQwNmM5MDFmMTZkMWQ1MjEzZiJ9

chore: use gapic-generator-python 0.63.4
chore: fix snippet region tag format
chore: fix docstring code block formatting
PiperOrigin-RevId: 430730865

Source-Link: googleapis/googleapis@ea58002

Source-Link: googleapis/googleapis-gen@ca893ff
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2E4OTNmZjhhZjI1ZmM3ZmUwMDFkZTE0MDVhNTE3ZDgwNDQ2ZWNjYSJ9
parthea added a commit that referenced this issue Sep 22, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this issue Sep 22, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 472772457

Source-Link: googleapis/googleapis@855b74d

Source-Link: googleapis/googleapis-gen@b64b1e7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY0YjFlN2RhM2UxMzhmMTVjYTM2MTU1MmVmMDU0NWU1NDg5MWI0ZiJ9
parthea pushed a commit that referenced this issue Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this issue Oct 21, 2023
fix(deps): require proto-plus >= 1.22.0
parthea pushed a commit that referenced this issue Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Oct 21, 2023
Source-Link: googleapis/synthtool@fdba3ed
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:1f0dbd02745fb7cf255563dab5968345989308544e52b7f460deadd5e78e63b0
parthea pushed a commit that referenced this issue Oct 21, 2023
…rgets (#475)

* fix: Add service_yaml_parameters to py_gapic_library BUILD.bazel targets

PiperOrigin-RevId: 510187992

Source-Link: googleapis/googleapis@5edc235

Source-Link: googleapis/googleapis-gen@b0bedb7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBiZWRiNzJlNDc2NWEzZTBiNjc0YTI4YzUwZWEwZjlhOWIyNmE4OSJ9

* 🦉 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>
parthea pushed a commit that referenced this issue Oct 22, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. 🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
4 participants