Skip to content

Only using 'id' OR 'name' from pb path in datastore.Entity.save. - #291

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fix-key-error-in-entity-save
Oct 23, 2014
Merged

Only using 'id' OR 'name' from pb path in datastore.Entity.save.#291
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:fix-key-error-in-entity-save

Conversation

@dhermes

Copy link
Copy Markdown
Contributor

This was introduced in #289 and discovered while rebasing those
changes into #281.

The datastore backend fails if both 'id' and 'name' are set on
a key, so this only copies the parts of the saved pb key that
are actually set.

@tseaver Please give this a look. #289 actually broke datastore when saving keys with no id/name set.

This was introduced in googleapis#289 and discovered while rebasing those
changes into googleapis#281.
The datastore backend fails if both 'id' and 'name' are set on
a key, so this only copies the parts of the saved pb key that
are actually set.
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Oct 23, 2014
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 6c3b983 on dhermes:fix-key-error-in-entity-save into 8a21978 on GoogleCloudPlatform:master.

dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Oct 23, 2014
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Oct 23, 2014
@tseaver

Copy link
Copy Markdown
Contributor

LGTM,

dhermes added a commit that referenced this pull request Oct 23, 2014
Only using 'id' OR 'name' from pb path in datastore.Entity.save.
@dhermes
dhermes merged commit b6d3e74 into googleapis:masterOct 23, 2014
@dhermes
dhermes deleted the fix-key-error-in-entity-save branch October 23, 2014 23:05
@dhermesdhermes added the api: datastore Issues related to the Datastore API. label Dec 31, 2015
atulep pushed a commit that referenced this pull request Apr 3, 2023
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 413728495
Source-Link: googleapis/googleapis@10f96cb
Source-Link: googleapis/googleapis-gen@f464864
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjQ2NDg2NDI5MmViNmIwNTVmMWUxZDg0MDhhZmY4NzgxN2NjYTY0YyJ9
docs: add clarification for global and regional endpoints
atulep pushed a commit that referenced this pull request Apr 6, 2023
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 413728495
Source-Link: googleapis/googleapis@10f96cb
Source-Link: googleapis/googleapis-gen@f464864
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjQ2NDg2NDI5MmViNmIwNTVmMWUxZDg0MDhhZmY4NzgxN2NjYTY0YyJ9
docs: add clarification for global and regional endpoints
atulep pushed a commit that referenced this pull request Apr 6, 2023
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 413728495
Source-Link: googleapis/googleapis@10f96cb
Source-Link: googleapis/googleapis-gen@f464864
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjQ2NDg2NDI5MmViNmIwNTVmMWUxZDg0MDhhZmY4NzgxN2NjYTY0YyJ9
docs: add clarification for global and regional endpoints
atulep pushed a commit that referenced this pull request Apr 18, 2023
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 413728495
Source-Link: googleapis/googleapis@10f96cb
Source-Link: googleapis/googleapis-gen@f464864
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjQ2NDg2NDI5MmViNmIwNTVmMWUxZDg0MDhhZmY4NzgxN2NjYTY0YyJ9
docs: add clarification for global and regional endpoints
parthea pushed a commit that referenced this pull request Jun 4, 2023
…ic enums (#291)
* feat: enable "rest" transport in Python for services supporting numeric enums
PiperOrigin-RevId: 508143576
Source-Link: googleapis/googleapis@7a702a9
Source-Link: googleapis/googleapis-gen@6ad1279
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9
* 🦉 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 pull request Jun 4, 2023
Source-Link: googleapis/synthtool@c4dd595
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ce3c1686bc81145c81dd269bd12c4025c6b275b22d14641358827334fddb1d72
parthea pushed a commit that referenced this pull request Jun 4, 2023
* chore: upgrade gapic-generator-java, gax-java and gapic-generator-python
PiperOrigin-RevId: 423842556
Source-Link: googleapis/googleapis@a616ca0
Source-Link: googleapis/googleapis-gen@29b938c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjliOTM4YzU4YzFlNTFkMDE5ZjJlZTUzOWQ1NWRjMGEzYzg2YTkwNSJ9
* 🦉 Updates from OwlBot
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 pull request Jun 4, 2023
Source-Link: googleapis/synthtool@6ed3a83
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3abfa0f1886adaf0b83f07cb117b24a639ea1cb9cffe56d43280b977033563eb
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Jun 4, 2023
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 473833416
Source-Link: googleapis/googleapis@565a550
Source-Link: googleapis/googleapis-gen@1ee1a06
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9
parthea added a commit that referenced this pull request Jun 4, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Sep 20, 2023
…291)
Source-Link: googleapis/synthtool@95d9289
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c8878270182edaab99f2927969d4f700c3af265accd472c3425deedff2b7fd93
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
vchudnov-g pushed a commit that referenced this pull request Sep 20, 2023
PR #290 included changes to the generated client but the conventional commit messages were not included in the PR. This PR updates the `begin-after-commit-hash` that owl-bot uses to pull changes from googleapis-gen to match [this commit](https://github.com/googleapis/googleapis-gen/search?q=0a3c7d272d697796db75857bac73905c68e498c3&type=commits).
The following changes are already in master:
feat: added more Environment RPCs
feat: added Versions service
feat: added Fulfillment service
feat: added TextToSpeechSettings.
feat: added location in some resource patterns
fix: removed incorrect resource annotation for UpdateEnvironmentRequest.
fix: add async client to %name_%version/init.py
chore: add autogenerated snippets
chore: remove auth, policy, and options from the reserved names list
feat: support self-signed JWT flow for service accounts
chore: enable GAPIC metadata generation
chore: sort subpackages in %namespace/%name/init.py
parthea pushed a commit that referenced this pull request Sep 22, 2023
* chore: Update gapic-generator-python to v1.8.4
PiperOrigin-RevId: 507808936
Source-Link: googleapis/googleapis@64cf849
Source-Link: googleapis/googleapis-gen@53c48ca
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTNjNDhjYWMxNTNkM2IzN2YzZDJjMmRlYzQ4MzBjZmQ5MWVjNDE1MyJ9
* 🦉 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 pull request Sep 22, 2023
…291)
Source-Link: googleapis/synthtool@8e55b32
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c6c965a4bf40c19011b11f87dbc801a66d3a23fbc6704102be064ef31c51f1c3
parthea pushed a commit that referenced this pull request Sep 22, 2023
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 404333740
Source-Link: googleapis/googleapis@5088bd7
Source-Link: googleapis/googleapis-gen@44b8707
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDRiODcwNzgzYzE5NDM3NzFiY2RlYzc0OGFlNGQ1MjA4YzNkN2YwZSJ9
parthea added a commit that referenced this pull request Oct 21, 2023
* feat: Add client library support for AssetService v1 SavedQuery APIs
Committer: jeffreyai@
PiperOrigin-RevId: 475366952
Source-Link: googleapis/googleapis@7428dad
Source-Link: googleapis/googleapis-gen@5629e2a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTYyOWUyYWI3Mjg0NDNhMWE2YWJiMDNmMzRmOTI1ZDVjZDRlMGM0NyJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* chore: update gapic-generator-python to 1.4.3 with test fixes
PiperOrigin-RevId: 475399737
Source-Link: googleapis/googleapis@4c4a9a2
Source-Link: googleapis/googleapis-gen@72fdb5a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzJmZGI1YWU1NWE0ZDY1ODM4OTNhM2U1N2I3ZWYyNjQ4NTBkMDZjZCJ9
* 🦉 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: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Oct 22, 2023
Source-Link: googleapis/synthtool@d52e638
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:4f9b3b106ad0beafc2c8a415e3f62c1a0cc23cabea115dbe841b848f581cfe99
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 22, 2023
- [ ] Regenerate this pull request now.
PiperOrigin-RevId: 413728495
Source-Link: googleapis/googleapis@10f96cb
Source-Link: googleapis/googleapis-gen@f464864
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjQ2NDg2NDI5MmViNmIwNTVmMWUxZDg0MDhhZmY4NzgxN2NjYTY0YyJ9
docs: add clarification for global and regional endpoints
parthea pushed a commit that referenced this pull request Oct 22, 2023
* docs: Add documentation for enums
fix: Add context manager return types
chore: Update gapic-generator-python to v1.8.1
PiperOrigin-RevId: 503210727
Source-Link: googleapis/googleapis@a391fd1
Source-Link: googleapis/googleapis-gen@0080f83
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9
* 🦉 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 pull request Aug 21, 2025
parthea pushed a commit that referenced this pull request Sep 16, 2025
parthea pushed a commit that referenced this pull request Sep 18, 2025
The closing parenthesis is missing in the current code example, making copy/paste of the code failing.
parthea pushed a commit that referenced this pull request Nov 22, 2025
* docs(python): add empty lines between methods
Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Source-Date: Wed Apr 14 14:41:09 2021 -0600
Source-Repo: googleapis/synthtool
Source-Sha: 721339ab60a6eb63b889978b3d9b295dcb3be370
Source-Link: googleapis/synthtool@721339a
* build: use PyPI API token in secret manager
Migrate python libraries onto the PyPI API token stored in secret manager.
A PyPI API token is limited in scope to uploading new releases. https://pypi.org/help/#apitoken
Verified that this works with [build](https://fusion2.corp.google.com/invocations/14bae126-83fa-4328-8da9-d390ed99315c/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fpython-vision%2Frelease%2Frelease;config=default/log) on googleapis/python-vision#136
Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Source-Date: Wed Apr 14 17:46:06 2021 -0600
Source-Repo: googleapis/synthtool
Source-Sha: 043cc620d6a6111816d9e09f2a97208565fde958
Source-Link: googleapis/synthtool@043cc62
parthea pushed a commit that referenced this pull request Nov 24, 2025
Source-Link: googleapis/synthtool@9ae0785
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:52210e0e0559f5ea8c52be148b33504022e1faef4e95fbe4b32d68022af2fa7e
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Only script parameters are a single input dir and a single output dir
Fixups are no longer in-place: they are written to the corresponding
path in the output dir. The files in the input dir are unmodified.
Fixup script works on all services in an api concurrently instead of
one script per service. It has been renamed accordingly.
parthea pushed a commit that referenced this pull request Nov 24, 2025
)
Source-Link: googleapis/synthtool@d6103f4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:39f0f3f2be02ef036e297e376fe3b6256775576da8a6ccb1d5eeb80f4c8bf8fb
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Nov 24, 2025
🤖 I have created a release *beep* *boop*
---
## [1.20.0](googleapis/proto-plus-python@v1.19.9...v1.20.0) (2022-02-07)
### Features
* add custom __dir__ for messages and message classes ([#289](googleapis/proto-plus-python#289)) ([35e019e](googleapis/proto-plus-python@35e019e))
### Bug Fixes
* workaround for buggy pytest ([#291](googleapis/proto-plus-python#291)) ([28aa3b2](googleapis/proto-plus-python@28aa3b2))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Nov 24, 2025
Source-Link: googleapis/synthtool@a37f74c
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:d3de8a02819f65001effcbd3ea76ce97e9bcff035c7a89457f40f892c87c5b32
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
Source-Link: googleapis/synthtool@7ff4aad
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:462782b0b492346b2d9099aaff52206dd30bc8e031ea97082e6facecc2373244
parthea pushed a commit that referenced this pull request Nov 24, 2025
* test: update conf tests
* test: use relative directories, not hardcoded, in conf test makefile
* test: add format at end of generation
* test: remove unused var
* Updated Makefile to make less assumptions about project structure
Co-authored-by: Craig Labenz <craig.labenz@gmail.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Nov 25, 2025
parthea pushed a commit that referenced this pull request Nov 25, 2025
parthea added a commit that referenced this pull request Mar 2, 2026
* chore: update .repo-metadata.json
* remove api_shortname
parthea pushed a commit that referenced this pull request Mar 6, 2026
Apparently invoking
spanner_v1.Database.session()
by-passes using the provided session pool as advised at:
googleapis/python-spanner#10 (comment)
so this change using the logic that's provided with the
context manager, but our use case to use Transactions with
ORMs hadn't been thought of, so we have to use private methods
and the methods used by spanner_v1.pool.SessionCheckout.
Fixes#291
parthea pushed a commit that referenced this pull request Mar 9, 2026
Fix a wrong keyword argument `key_set`.
Correctly, it is `keyset`, and the value must be a instance of `spanner.KeySet()`.
`snapshot.read()` and `snapshot.execute_sql()` returns an iterable.
It does not have `rows` attribute.
parthea pushed a commit that referenced this pull request Mar 9, 2026
🤖 I have created a release \*beep\* \*boop\*
---
## [3.3.0](https://www.github.com/googleapis/python-spanner/compare/v3.2.0...v3.3.0) (2021-03-25)
### Features
* add encryption_info to Database ([#284](https://www.github.com/googleapis/python-spanner/issues/284)) ([2fd0352](https://www.github.com/googleapis/python-spanner/commit/2fd0352f695d7ab85e57d8c4388f42f91cf39435))
* add support for CMEK ([#105](https://www.github.com/googleapis/python-spanner/issues/105)) ([e990ff7](https://www.github.com/googleapis/python-spanner/commit/e990ff70342e7c2e27059e82c8d74cce39eb85d0))
* add support for custom timeout and retry parameters in execute_update method in transactions ([#251](https://www.github.com/googleapis/python-spanner/issues/251)) ([8abaebd](https://www.github.com/googleapis/python-spanner/commit/8abaebd9edac198596e7bd51d068d50147d0391d))
* added retry and timeout params to partition read in database and snapshot class ([#278](https://www.github.com/googleapis/python-spanner/issues/278)) ([1a7c9d2](https://www.github.com/googleapis/python-spanner/commit/1a7c9d296c23dfa7be7b07ea511a4a8fc2c0693f))
* **db_api:** support executing several DDLs separated by semicolon ([#277](https://www.github.com/googleapis/python-spanner/issues/277)) ([801ddc8](https://www.github.com/googleapis/python-spanner/commit/801ddc87434ff9e3c86b1281ebfeac26195c06e8))
### Bug Fixes
* avoid consuming pending null values when merging ([#286](https://www.github.com/googleapis/python-spanner/issues/286)) ([c6cba9f](https://www.github.com/googleapis/python-spanner/commit/c6cba9fbe4c717f1f8e2a97e3f76bfe6b956e55b))
* **db_api:** allow file path for credentials ([#221](https://www.github.com/googleapis/python-spanner/issues/221)) ([1de0284](https://www.github.com/googleapis/python-spanner/commit/1de028430b779a50d38242fe70567e92b560df5a))
* **db_api:** ensure DDL statements are being executed ([#290](https://www.github.com/googleapis/python-spanner/issues/290)) ([baa02ee](https://www.github.com/googleapis/python-spanner/commit/baa02ee1a352f7c509a3e169927cf220913e521f))
* **db_api:** revert Mutations API usage ([#285](https://www.github.com/googleapis/python-spanner/issues/285)) ([e5d4901](https://www.github.com/googleapis/python-spanner/commit/e5d4901e9b7111b39dfec4c56032875dc7c6e74c))
### Documentation
* fix docstring types and typos ([#259](https://www.github.com/googleapis/python-spanner/issues/259)) ([1b0ce1d](https://www.github.com/googleapis/python-spanner/commit/1b0ce1d2986085ce4033cf773eb6c5d3b904473c))
* fix snapshot usage ([#291](https://www.github.com/googleapis/python-spanner/issues/291)) ([eee2181](https://www.github.com/googleapis/python-spanner/commit/eee218164c3177586b73278aa21495280984af89))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
parthea pushed a commit that referenced this pull request Mar 9, 2026
* fix: add support for return annotation in syntax
* test: update unit test
* test: update goldens
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastoreIssues related to the Datastore API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dhermes@coveralls@tseaver