-
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
Add GAE/GCE support for datastore.set_default_dataset and add exception on failure #475
Comments
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' |
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. |
@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 |
Re-opening until exception questions resolved. |
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. |
* Regenerate google-cloud-bigquery-storage * Re-synthed
* 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.
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>
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>
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>
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>
…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>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
- [ ] 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
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 472772457 Source-Link: googleapis/googleapis@855b74d Source-Link: googleapis/googleapis-gen@b64b1e7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY0YjFlN2RhM2UxMzhmMTVjYTM2MTU1MmVmMDU0NWU1NDg5MWI0ZiJ9
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
fix(deps): require proto-plus >= 1.22.0
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@fdba3ed Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:1f0dbd02745fb7cf255563dab5968345989308544e52b7f460deadd5e78e63b0
…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>
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>
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#93Not blocking for M1.
The text was updated successfully, but these errors were encountered: