| Index: appengine/findit/model/crash/crash_analysis.py
|
| diff --git a/appengine/findit/model/crash/crash_analysis.py b/appengine/findit/model/crash/crash_analysis.py
|
| index 236208d4354e8e691ba6a10ace4b78566a8e4121..59bcdf4d62f757c9f19470b8303fac6857b9a419 100644
|
| --- a/appengine/findit/model/crash/crash_analysis.py
|
| +++ b/appengine/findit/model/crash/crash_analysis.py
|
| @@ -5,6 +5,7 @@
|
| from google.appengine.ext import ndb
|
|
|
| from model import analysis_status
|
| +from model import triage_status
|
|
|
|
|
| class CrashAnalysis(ndb.Model):
|
| @@ -50,13 +51,56 @@ class CrashAnalysis(ndb.Model):
|
| ################### Properties for the analysis result. ###################
|
|
|
| # Analysis results.
|
| - result = ndb.JsonProperty(compressed=True, indexed=False)
|
| + result = ndb.JsonProperty(compressed=True, indexed=False, default={})
|
|
|
| # Tags for query and monitoring.
|
| has_regression_range = ndb.BooleanProperty(indexed=True)
|
| found_suspects = ndb.BooleanProperty(indexed=True)
|
| + found_project = ndb.BooleanProperty(indexed=True)
|
| + found_components = ndb.BooleanProperty(indexed=True)
|
| +
|
| solution = ndb.StringProperty(indexed=True) # 'core', 'blame', etc.
|
|
|
| + # Triage results.
|
| + regression_range_triage_status = ndb.StringProperty(
|
| + indexed=True, default=triage_status.UNTRIAGED)
|
| + culprit_regression_range = ndb.JsonProperty(indexed=False)
|
| +
|
| + suspected_cls_triage_status = ndb.StringProperty(
|
| + indexed=True, default=triage_status.UNTRIAGED)
|
| + culprit_cls = ndb.JsonProperty(indexed=False, default=[])
|
| +
|
| + suspected_project_triage_status = ndb.StringProperty(
|
| + indexed=True, default=triage_status.UNTRIAGED)
|
| + culprit_project = ndb.JsonProperty(indexed=False, default=[])
|
| +
|
| + suspected_components_triage_status = ndb.StringProperty(
|
| + indexed=True, default=triage_status.UNTRIAGED)
|
| + culprit_components = ndb.JsonProperty(indexed=False, default=[])
|
| +
|
| + triage_history = ndb.JsonProperty(indexed=False)
|
| +
|
| + # Triage note.
|
| + note = ndb.StringProperty(indexed=False, default='')
|
| +
|
| + def ResultCorrect(self, result_property):
|
| + """Returns triage result of a result property.
|
| +
|
| + True if the result is triaged-correct, False if triaged-incorrect, else
|
| + return None.
|
| + """
|
| + if not self.completed or self.failed:
|
| + return None
|
| +
|
| + result_triage_status = getattr(self, '%s_triage_status' % result_property)
|
| + if result_triage_status == triage_status.TRIAGED_CORRECT:
|
| + return True
|
| +
|
| + if result_triage_status == triage_status.TRIAGED_INCORRECT:
|
| + return False
|
| +
|
| + return None
|
| +
|
| def Reset(self):
|
| self.pipeline_status_path = None
|
| self.status = analysis_status.PENDING
|
|
|