{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/510","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/510/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/510/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/510/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/510","id":53710299,"number":510,"title":"Removing dataset_id from allocate_ids and get_entities","user":{"login":"dhermes","id":520669,"avatar_url":"https://avatars.githubusercontent.com/u/520669?v=3","gravatar_id":"","url":"https://api.github.com/users/dhermes","html_url":"https://github.com/dhermes","followers_url":"https://api.github.com/users/dhermes/followers","following_url":"https://api.github.com/users/dhermes/following{/other_user}","gists_url":"https://api.github.com/users/dhermes/gists{/gist_id}","starred_url":"https://api.github.com/users/dhermes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhermes/subscriptions","organizations_url":"https://api.github.com/users/dhermes/orgs","repos_url":"https://api.github.com/users/dhermes/repos","events_url":"https://api.github.com/users/dhermes/events{/privacy}","received_events_url":"https://api.github.com/users/dhermes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-01-08T03:16:27Z","updated_at":"2015-01-08T21:56:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/510","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/510","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/510.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/510.patch"},"body":"Since we require `Key` to have a dataset ID, these methods should not be allowed to ignore this value.\r\n\r\nFor `allocate_ids` this is cut and dry but for `get_entities` we may want to allow the user to provide `dataset_id` since there are potentially **many** keys to check. (Performance sensitive.)\r\n\r\n--------\r\n\r\n@pcostell \r\n\r\nIn the `get_entities` change, we check that the `dataset_id` of every `Key` in a list is identical.\r\n\r\nThis can cause all kinds of trouble, just in comparing prefixed and un-prefixed alone. Do you think this check can be avoided? Due to GoogleCloudPlatform/google-cloud-datastore#59 it's not possible to just set the dataset ID on the `Key` protobuf and let the backend do the checking for us.\r\n\r\nOTOH, creating the protobufs for each `Key` will be the same O(n) work that checking the dataset IDs will, so maybe the performance cost is negligible?"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/comments/69256884","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/510#issuecomment-69256884","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/510","id":69256884,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T21:56:41Z","updated_at":"2015-01-08T21:56:41Z","body":"\n[![Coverage Status](https://coveralls.io/builds/1713704/badge)](https://coveralls.io/builds/1713704)\n\nCoverage remained the same when pulling **ac5221b785a6e266b8c4baea972b2c37fc4e0f49 on dhermes:remove-dependence-on-dataset-id** into **7c01fcc992032b8e82d8dfd642f7af64df2e8d88 on GoogleCloudPlatform:master**.\n"}}