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

Side by Side Diff: appengine/findit/model/wf_failure_group.py

Issue 2227223002: [Findit] Fix 1500 byte cap on failed_steps_and_tests and output_nodes (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from google.appengine.ext import ndb 5 from google.appengine.ext import ndb
6 6
7 from model.base_build_model import BaseBuildModel 7 from model.base_build_model import BaseBuildModel
8 8
9 9
10 class WfFailureGroup(BaseBuildModel): 10 class WfFailureGroup(BaseBuildModel):
(...skipping 13 matching lines...) Expand all
24 24
25 @staticmethod 25 @staticmethod
26 def Get(master_name, builder_name, build_number): # pragma: no cover 26 def Get(master_name, builder_name, build_number): # pragma: no cover
27 return WfFailureGroup._CreateKey( 27 return WfFailureGroup._CreateKey(
28 master_name, builder_name, build_number).get() 28 master_name, builder_name, build_number).get()
29 29
30 # Integer representation for build failure type. 30 # Integer representation for build failure type.
31 # Refer to common/waterfall/failure_type.py for all the failure types. 31 # Refer to common/waterfall/failure_type.py for all the failure types.
32 build_failure_type = ndb.IntegerProperty(indexed=True) 32 build_failure_type = ndb.IntegerProperty(indexed=True)
33 33
34 # When the group was created.
35 created_time = ndb.DateTimeProperty(indexed=True)
36
34 # The blame list of CLs that make up the regression range for this group. 37 # The blame list of CLs that make up the regression range for this group.
35 blame_list = ndb.JsonProperty(indexed=False, compressed=True) 38 blame_list = ndb.JsonProperty(indexed=False, compressed=True)
36 39
37 # The list of compile failure output nodes (from signals). 40 # The list of compile failure output nodes (from signals).
38 # Only not None if this group represents a compile failure. 41 # Only not None if this group represents a compile failure.
39 output_nodes = ndb.JsonProperty(indexed=True) 42 output_nodes = ndb.JsonProperty(indexed=False)
40 43
41 # A sorted list of lists of the failed steps and tests of a test failure. 44 # A sorted list of lists of the failed steps and tests of a test failure.
42 # Only not None if this group represents a test failure. 45 # Only not None if this group represents a test failure.
43 # Example: 46 # Example:
44 # [ 47 # [
45 # ['step_a', 'test1'], 48 # ['step_a', 'test1'],
46 # ['step_a', 'test2'], 49 # ['step_a', 'test2'],
47 # ['step_b', None] 50 # ['step_b', None]
48 # ] 51 # ]
49 # ndb.JsonProperty uses json.dumps() without sort_keys=True, which causes 52 # ndb.JsonProperty uses json.dumps() without sort_keys=True, which causes
50 # dicts that are identical except for their internal key order to have 53 # dicts that are identical except for their internal key order to have
51 # different JSON representations. So, for the failed_steps_and_tests JSON 54 # different JSON representations. So, for the failed_steps_and_tests JSON
52 # property, a list is used instead of a dict (json.dumps() preserves the order 55 # property, a list is used instead of a dict (json.dumps() preserves the order
53 # of list elements). This enables a WfFailureGroup query based on equivalent 56 # of list elements). This enables a WfFailureGroup query based on equivalent
54 # failed_steps_and_tests to return all of the matching results, instead of 57 # failed_steps_and_tests to return all of the matching results, instead of
55 # missing some results. Missing results is a possibility if 58 # missing some results. Missing results is a possibility if
56 # failed_steps_and_tests used a dict, and the keys of the original dict (that 59 # failed_steps_and_tests used a dict, and the keys of the original dict (that
57 # went to the database) were JSONified to string in a different order than the 60 # went to the database) were JSONified to string in a different order than the
58 # keys of the dict used in the query. For example: 61 # keys of the dict used in the query. For example:
59 # '{"step_a": [], "step_y": []}' versus '{"step_y": [], "step_a": []}'. 62 # '{"step_a": [], "step_y": []}' versus '{"step_y": [], "step_a": []}'.
60 failed_steps_and_tests = ndb.JsonProperty(indexed=True) 63 failed_steps_and_tests = ndb.JsonProperty(indexed=False)
61 64
62 # The sorted list of suspected tuples, if available, from heuristic analysis. 65 # The sorted list of suspected tuples, if available, from heuristic analysis.
63 suspected_tuples = ndb.JsonProperty(indexed=False, compressed=True) 66 suspected_tuples = ndb.JsonProperty(indexed=False, compressed=True)
67
lijeffrey 2016/08/09 23:00:00 nit: remove empty line
josiahk 2016/08/09 23:10:36 Done.
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/waterfall/try_job_util.py » ('j') | appengine/findit/waterfall/try_job_util.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698