Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Issue 1667403003: Add support for uint8, uint16 and uint32 in luci/gae (Closed)

Created:
4 years, 10 months ago by iannucci
Modified:
4 years, 10 months ago
Reviewers:
dnj, Vadim Sh., estaab, martiniss
CC:
chromium-reviews, infra-reviews+luci-gae_chromium.org
Base URL:
https://github.com/luci/gae.git@master
Target Ref:
refs/heads/master
Project:
luci-gae
Visibility:
Public.

Description

Add support for uint8, uint16 and uint32 in luci/gae This has come up for like 3 models in DM so far, and I'm tired of having this be a stupid "gotcha!". I was working around it with some PropertyConverter, but with this change it will just be obvious what the heck is going on. They all map to positive int64 values (which should make indexes obvious), and they include out-of-bounds checks on deserialization. I excluded uint64, since there's no way to properly encode it in the native datastore representation which still makes any sense for indexes. I also added some (apparently?) missing documentation in PLS which explicitly lays out what field types are allowed in a pls-managed struct. R=dnj@chromium.org, estaab@chromium.org, martiniss@chromium.org, vadimsh@chromium.org BUG=550684 Committed: https://github.com/luci/gae/commit/daecce9bc5397d278cf86dbab752bc15ddb91b7c

Patch Set 1 #

Patch Set 2 : Add support for meta fields (e.g. $id) too #

Total comments: 2

Patch Set 3 : allow negative #

Unified diffs Side-by-side diffs Delta from patch set Stats (+189 lines, -43 lines) Patch
M service/datastore/pls.go View 1 2 chunks +21 lines, -5 lines 0 comments Download
M service/datastore/pls_impl.go View 1 2 4 chunks +39 lines, -2 lines 0 comments Download
M service/datastore/pls_test.go View 1 2 10 chunks +106 lines, -36 lines 0 comments Download
M service/datastore/properties.go View 1 chunk +2 lines, -0 lines 0 comments Download
M service/datastore/properties_test.go View 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
iannucci
4 years, 10 months ago (2016-02-05 03:03:52 UTC) #1
dnj
lgtm w/ comment https://chromiumcodereview.appspot.com/1667403003/diff/20001/service/datastore/pls_impl.go File service/datastore/pls_impl.go (right): https://chromiumcodereview.appspot.com/1667403003/diff/20001/service/datastore/pls_impl.go#newcode412 service/datastore/pls_impl.go:412: if intVal < 0 || f.OverflowInt(intVal) ...
4 years, 10 months ago (2016-02-05 07:30:31 UTC) #2
iannucci
https://chromiumcodereview.appspot.com/1667403003/diff/20001/service/datastore/pls_impl.go File service/datastore/pls_impl.go (right): https://chromiumcodereview.appspot.com/1667403003/diff/20001/service/datastore/pls_impl.go#newcode412 service/datastore/pls_impl.go:412: if intVal < 0 || f.OverflowInt(intVal) { On 2016/02/05 ...
4 years, 10 months ago (2016-02-05 08:22:01 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1667403003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1667403003/40001
4 years, 10 months ago (2016-02-05 08:22:22 UTC) #6
commit-bot: I haz the power
4 years, 10 months ago (2016-02-05 08:26:41 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://github.com/luci/gae/commit/daecce9bc5397d278cf86dbab752bc15ddb91b7c

Powered by Google App Engine
This is Rietveld 408576698