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

Unified Diff: appengine/findit/model/wf_analysis.py

Issue 2086113004: [Findit] Show build analysis references in UI for Findit Cross-platform auto-triage (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@build-matching
Patch Set: Merged with ("rebased" on) Issue 2029873002's code. Other changes. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: appengine/findit/model/wf_analysis.py
diff --git a/appengine/findit/model/wf_analysis.py b/appengine/findit/model/wf_analysis.py
index 2838adea93c03ac67cdba4ecd42d05e4cdaf226f..3cd1b2d0f5bbd01af0da929a4f992bfa9115e49a 100644
--- a/appengine/findit/model/wf_analysis.py
+++ b/appengine/findit/model/wf_analysis.py
@@ -16,6 +16,7 @@ class WfAnalysis(BaseBuildModel):
'Wf' is short for waterfall.
"""
+
@staticmethod
def _CreateKey(master_name, builder_name, build_number): # pragma: no cover
return ndb.Key('WfAnalysis',
@@ -82,6 +83,19 @@ class WfAnalysis(BaseBuildModel):
return None
+ @property
+ def is_duplicate(self):
lijeffrey 2016/06/27 20:38:22 nit: I would name this just duplicate but this is
+ """Returns whether the analysis result is a duplicate or not.
+
+ Returns:
+ True: duplicate.
+ False: not a duplicate.
+ """
+
+ return self.result_status in (
+ result_status.FOUND_CORRECT_DUPLICATE,
+ result_status.FOUND_INCORRECT_DUPLICATE)
+
def Reset(self): # pragma: no cover
"""Resets to the state as if no analysis is run."""
self.pipeline_status_path = None
@@ -153,3 +167,8 @@ class WfAnalysis(BaseBuildModel):
result_status = ndb.IntegerProperty(indexed=True)
# Record the history of triage.
triage_history = ndb.JsonProperty(indexed=False, compressed=True)
+ # An optional reference to the analysis that might have caused this analysis
+ # to be marked as a duplicate.
+ triage_reference_analysis_master_name = ndb.StringProperty(indexed=False)
+ triage_reference_analysis_builder_name = ndb.StringProperty(indexed=False)
+ triage_reference_analysis_build_number = ndb.IntegerProperty(indexed=False)

Powered by Google App Engine
This is Rietveld 408576698