New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 649396 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[Findit] Add support for versioning models with string keys specified

Project Member Reported by lijeffrey@chromium.org, Sep 22 2016

Issue description

versioned_model.py only supports creating entities with a default key of 1. Add support for specifying custom string keys to support versioning of other ndb models that may have other keys specified.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/infra.git/+/b5d534432bbd9697a0fed9ff6b8d1b0f3504fadb

commit b5d534432bbd9697a0fed9ff6b8d1b0f3504fadb
Author: lijeffrey <lijeffrey@chromium.org>
Date: Mon Sep 26 21:43:01 2016

[Findit] Extending versioned_model.py to support versioning multiple entities of the same class.

Previously, versioned_model.py supports creating a singular versioned entity within Findit, and with each update of that singular entity a new version is created and saved. An example of this is wf_config.py, of which there is only 1 entity at any point that is periodically updated.

This change extends versioned_model.py to support creating multiple entities of the same base type by allowing for a string id for the root. For example, MasterFlakeAnalysis is to be versioned, so would have each instance's root key specified as 'master/builder/build_number/step/test' and the integer_id() component responsible for keeping track of which version number is being represented.

BUG= 649396 

Review-Url: https://codereview.chromium.org/2345093002

[modify] https://crrev.com/b5d534432bbd9697a0fed9ff6b8d1b0f3504fadb/appengine/findit/model/test/versioned_model_test.py
[modify] https://crrev.com/b5d534432bbd9697a0fed9ff6b8d1b0f3504fadb/appengine/findit/model/versioned_config.py
[modify] https://crrev.com/b5d534432bbd9697a0fed9ff6b8d1b0f3504fadb/appengine/findit/model/versioned_model.py

Status: Verified (was: Assigned)

Sign in to add a comment