GeezerVison is showing github.com — Add support for gcd local development server · Issue #650 · googleapis/google-cloud-python
Add support for gcd local development server #650DescriptionRight now, there doesn't appear to be any support for the datastore local development server gcd. For instance, the usage instructions tell you to set the dataset id in the environment variable DATASTORE_DATASET but gcloud-python doesn't appear to look for that in the set_default_dataset_id() function. Activityrstuart85 commented on Feb 16, 2015 It's not clear to me how exactly this is meant to work. I have set the environment variable DATASTORE_HOST to be the local development server as per the gcd instructions but it seems to be completely ignored by gcloud-python. It works with the googledatastore library so it would be nice if it worked here too. dhermes commented on Feb 17, 2015 @rstuart85 Thanks for the request. I have not used gcd and will look into this. It should be easy enough to support in gcloud/datastore/connection.py (at 61c6814)
class Connection(connection.Connection):
...
API_BASE_URL = os.getenv('DATASTORE_HOST', connection.Connection.API_BASE_URL)
...
and in gcloud/datastore/__init__.py
def set_default_dataset_id(dataset_id=None):
if dataset_id is None:
dataset_id = os.getenv(_DATASET_ENV_VAR_NAME)
if dataset_id is None:
dataset_id = os.getenv('DATASTORE_DATASET')
if dataset_id is None:
dataset_id = _implicit_environ.app_engine_id()
...
(check comes before App Engine but after the production environment variable) rstuart85 commented on Feb 17, 2015 Certainly seems straightforward and would really simplify local development of products that use Datastore. Hopefully it will also reduce latency when developing! added a commit that references this issue on Feb 17, 2015This issue will close once commit d2aaab8 is merged into the 'master' branch.d2aaab8 added type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. on Feb 17, 2015added this to the This milestone has been deleted milestone on Feb 17, 2015changed the title [-]Add support for gcd[/-] [+]Add support for gcd local development server[/+] on Feb 17, 2015dhermes commented on Feb 18, 2015 @rstuart85 support is in. We'll (hopefully) cut 0.4.2 on Friday so you'll be able to use gcd out of the box. rstuart85 commented on Feb 18, 2015 @dhermes Wonderful, thanks for all the hard work. dhermes commented on Feb 26, 2015 @rstuart85 sorry for the delay but 0.4.2 went out today so use gcd at your heart's content!
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|