Skip to content

datastore: properly encode entity values#1206

Merged
callmehiphop merged 1 commit intogoogleapis:masterfrom
stephenplusplus:spp--1205
Apr 5, 2016
Merged

datastore: properly encode entity values#1206
callmehiphop merged 1 commit intogoogleapis:masterfrom
stephenplusplus:spp--1205

Conversation

@stephenplusplus
Copy link
Copy Markdown
Contributor

Fixes #1205

We weren't following the schema for an embedded object inside of an entity. We didn't catch this because we weren't testing saving objects in our system tests -- added a test for that.

Thanks @richardkazuomiller for catching this!

You can test with:

$ npm install --save stephenplusplus/gcloud-node#spp--1205

@stephenplusplus stephenplusplus added api: datastore Issues related to the Datastore API. patch labels Apr 5, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 5, 2016
@richardkazuomiller
Copy link
Copy Markdown

Tested and LGTM. Thanks for the fast work (^^♪

As a side note, I think the error that was being thrown in #1205 should be in the callback of runInTransaction so you might need a try{} somewhere. All I know about GRPC is what I heard in that one GCP Podcast episode and I don't have time to look through the code right now so just my uninformed opinion.

@stephenplusplus
Copy link
Copy Markdown
Contributor Author

This error is our code's fault. When using gRPC, we have to agree to the format which Datastore expects to receive requests. If we give it data in any other format, gRPC prevents the request and throws an error saying Datastore won't understand it. After this fix, that won't happen again, so nothing to catch here.

@richardkazuomiller
Copy link
Copy Markdown

Ah, OK sounds good d(^_^)b

@callmehiphop callmehiphop merged commit b72cb04 into googleapis:master Apr 5, 2016
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
* changes without context

        autosynth cannot find the source of changes triggered by earlier changes in this
        repository, or by version upgrades to tools such as linters.

* fix: use repo metadata to populate nodejs CODEOWNERS

* fix: use repo metadata to populate nodejs CODEOWNERS

* chore: small formatting tweaks

Co-authored-by: Benjamin Coe <bencoe@google.com>

Source-Author: Justin Beckwith <justin.beckwith@gmail.com>
Source-Date: Wed Feb 3 15:09:55 2021 -0800
Source-Repo: googleapis/synthtool
Source-Sha: 318e351e26ba65b2b3cfa3f61b3b64e3540c3525
Source-Link: googleapis/synthtool@318e351

* docs: fix case in README for samples

Co-authored-by: Megan Potter <57276408+feywind@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. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants