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

Issue 2345093002: [Findit] Extending versioned_model.py to support versioning multiple entities of the same class. (Closed)

Created:
4 years, 3 months ago by lijeffrey
Modified:
4 years, 2 months ago
Reviewers:
chanli, stgao
CC:
chromium-reviews, infra-reviews+infra_chromium.org, Sharu Jiang
Target Ref:
refs/heads/master
Project:
infra
Visibility:
Public.

Description

[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 Committed: https://chromium.googlesource.com/infra/infra/+/b5d534432bbd9697a0fed9ff6b8d1b0f3504fadb

Patch Set 1 #

Patch Set 2 : Changing versioning mechanism to use integer for version number and fixing concurrency issue #

Total comments: 17

Patch Set 3 : Addressing comments #

Patch Set 4 : Adding test #

Total comments: 4

Patch Set 5 : Addressing comments #

Patch Set 6 : clean up #

Total comments: 6

Patch Set 7 : addressing comments #

Total comments: 12

Patch Set 8 : Fixing nits #

Patch Set 9 : Ignore this patch, uploaded unrelated change to wrong branch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+388 lines, -228 lines) Patch
M appengine/findit/handlers/flake/check_flake.py View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -4 lines 0 comments Download
M appengine/findit/handlers/flake/test/check_flake_test.py View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M appengine/findit/model/flake/flake_swarming_task.py View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
M appengine/findit/model/flake/master_flake_analysis.py View 1 2 3 4 5 6 7 8 2 chunks +73 lines, -27 lines 0 comments Download
D appengine/findit/model/flake/master_flake_analysis_data.py View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -92 lines 0 comments Download
M appengine/findit/model/flake/test/flake_swarming_task_test.py View 1 2 3 4 5 6 7 8 2 chunks +29 lines, -0 lines 0 comments Download
M appengine/findit/model/test/versioned_model_test.py View 1 2 3 4 5 6 7 4 chunks +108 lines, -31 lines 0 comments Download
M appengine/findit/model/versioned_config.py View 1 chunk +1 line, -1 line 0 comments Download
M appengine/findit/model/versioned_model.py View 1 2 3 4 5 6 7 5 chunks +64 lines, -15 lines 0 comments Download
M appengine/findit/templates/flake/result.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M appengine/findit/waterfall/flake/initialize_flake_pipeline.py View 1 2 3 4 5 6 7 8 5 chunks +13 lines, -1 line 0 comments Download
M appengine/findit/waterfall/flake/recursive_flake_pipeline.py View 1 2 3 4 5 6 7 8 9 chunks +40 lines, -21 lines 0 comments Download
M appengine/findit/waterfall/flake/test/recursive_flake_pipeline_test.py View 1 2 3 4 5 6 7 8 18 chunks +18 lines, -18 lines 0 comments Download
M appengine/findit/waterfall/process_base_swarming_task_result_pipeline.py View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M appengine/findit/waterfall/process_flake_swarming_task_result_pipeline.py View 1 2 3 4 5 6 7 8 1 chunk +16 lines, -8 lines 0 comments Download
M appengine/findit/waterfall/test/process_flake_swarming_task_result_pipeline_test.py View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 28 (8 generated)
lijeffrey
ptal
4 years, 3 months ago (2016-09-15 21:38:33 UTC) #3
lijeffrey
ptal
4 years, 3 months ago (2016-09-15 21:39:26 UTC) #4
stgao
For children of different parents, I think they could have the same id. Do you ...
4 years, 3 months ago (2016-09-15 22:39:02 UTC) #5
lijeffrey
On 2016/09/15 22:39:02, stgao (slow) wrote: > For children of different parents, I think they ...
4 years, 3 months ago (2016-09-16 19:54:17 UTC) #6
lijeffrey
ptal
4 years, 3 months ago (2016-09-21 23:20:38 UTC) #7
chanli
https://codereview.chromium.org/2345093002/diff/20001/appengine/findit/model/versioned_model.py File appengine/findit/model/versioned_model.py (right): https://codereview.chromium.org/2345093002/diff/20001/appengine/findit/model/versioned_model.py#newcode152 appengine/findit/model/versioned_model.py:152: return self.key, False Based on https://docs.python.org/3/tutorial/errors.html#handling-exceptions : 'The try ...
4 years, 3 months ago (2016-09-22 00:11:25 UTC) #8
stgao
https://codereview.chromium.org/2345093002/diff/20001/appengine/findit/model/versioned_model.py File appengine/findit/model/versioned_model.py (right): https://codereview.chromium.org/2345093002/diff/20001/appengine/findit/model/versioned_model.py#newcode34 appengine/findit/model/versioned_model.py:34: def root_string_id(self): Why do we care whether the root ...
4 years, 3 months ago (2016-09-22 00:44:01 UTC) #9
lijeffrey
Comments addressed, ptal https://codereview.chromium.org/2345093002/diff/20001/appengine/findit/model/versioned_model.py File appengine/findit/model/versioned_model.py (right): https://codereview.chromium.org/2345093002/diff/20001/appengine/findit/model/versioned_model.py#newcode34 appengine/findit/model/versioned_model.py:34: def root_string_id(self): On 2016/09/22 00:44:01, stgao ...
4 years, 3 months ago (2016-09-22 17:36:15 UTC) #11
stgao
https://codereview.chromium.org/2345093002/diff/20001/appengine/findit/model/versioned_model.py File appengine/findit/model/versioned_model.py (right): https://codereview.chromium.org/2345093002/diff/20001/appengine/findit/model/versioned_model.py#newcode59 appengine/findit/model/versioned_model.py:59: # Key(root, version_number) or Key(kind, string_id). The latter is ...
4 years, 3 months ago (2016-09-23 06:27:14 UTC) #12
stgao
Another question: after we versionize the MasterFlakeAnalysis, do we plan to show all instances in ...
4 years, 3 months ago (2016-09-23 16:35:53 UTC) #13
stgao
https://codereview.chromium.org/2345093002/diff/60001/appengine/findit/model/test/versioned_model_test.py File appengine/findit/model/test/versioned_model_test.py (right): https://codereview.chromium.org/2345093002/diff/60001/appengine/findit/model/test/versioned_model_test.py#newcode172 appengine/findit/model/test/versioned_model_test.py:172: # When the call to SaveData() starts, another transaction ...
4 years, 3 months ago (2016-09-23 16:45:20 UTC) #14
lijeffrey
comments addressed, ptal for getting version, I had to keep the check to return self.key.integer_id() ...
4 years, 3 months ago (2016-09-23 19:56:09 UTC) #15
stgao
lgtm with nits. https://codereview.chromium.org/2345093002/diff/100001/appengine/findit/model/test/versioned_model_test.py File appengine/findit/model/test/versioned_model_test.py (right): https://codereview.chromium.org/2345093002/diff/100001/appengine/findit/model/test/versioned_model_test.py#newcode48 appengine/findit/model/test/versioned_model_test.py:48: self.assertIsNone(_Entity.Create('m1').GetVersion()) Why testing instance.GetVersion? https://codereview.chromium.org/2345093002/diff/100001/appengine/findit/model/test/versioned_model_test.py#newcode72 appengine/findit/model/test/versioned_model_test.py:72: ...
4 years, 3 months ago (2016-09-24 01:43:12 UTC) #16
lijeffrey
Comments addressed, mind a quick last-pass (mostly for the updated testcases)? https://codereview.chromium.org/2345093002/diff/100001/appengine/findit/model/test/versioned_model_test.py File appengine/findit/model/test/versioned_model_test.py (right): ...
4 years, 2 months ago (2016-09-24 06:13:15 UTC) #17
stgao
lgtm with some more nits. https://codereview.chromium.org/2345093002/diff/120001/appengine/findit/model/test/versioned_model_test.py File appengine/findit/model/test/versioned_model_test.py (right): https://codereview.chromium.org/2345093002/diff/120001/appengine/findit/model/test/versioned_model_test.py#newcode26 appengine/findit/model/test/versioned_model_test.py:26: self.assertEqual(0, _Entity().version) nit: all ...
4 years, 2 months ago (2016-09-24 18:00:37 UTC) #18
lijeffrey
https://codereview.chromium.org/2345093002/diff/120001/appengine/findit/model/test/versioned_model_test.py File appengine/findit/model/test/versioned_model_test.py (right): https://codereview.chromium.org/2345093002/diff/120001/appengine/findit/model/test/versioned_model_test.py#newcode26 appengine/findit/model/test/versioned_model_test.py:26: self.assertEqual(0, _Entity().version) On 2016/09/24 18:00:37, stgao (slow) wrote: > ...
4 years, 2 months ago (2016-09-26 19:03:53 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2345093002/140001
4 years, 2 months ago (2016-09-26 19:04:18 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: Infra Win Tester on luci.infra.try (JOB_FAILED, https://luci-milo.appspot.com/swarming/task/3180b3ea487ca810)
4 years, 2 months ago (2016-09-26 21:30:16 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2345093002/140001
4 years, 2 months ago (2016-09-26 21:31:57 UTC) #26
commit-bot: I haz the power
4 years, 2 months ago (2016-09-26 21:43:05 UTC) #28
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/infra/infra/+/b5d534432bbd9697a0fed9ff6b8d1...

Powered by Google App Engine
This is Rietveld 408576698