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

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: 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..e5749ae66a93459fa39e70b7a56d526b9694f163 100644
--- a/appengine/findit/model/wf_analysis.py
+++ b/appengine/findit/model/wf_analysis.py
@@ -82,6 +82,22 @@ class WfAnalysis(BaseBuildModel):
return None
+ @property
+ def duplicate(self):
+ """Returns whether the analysis result is a duplicate or not.
+
+ Returns:
+ True: duplicate
+ False: not a duplicate
+ """
+
+ if self.result_status in (
+ result_status.FOUND_CORRECT_DUPLICATE,
+ result_status.FOUND_INCORRECT_DUPLICATE):
+ return True
+
+ return False
chanli 2016/06/24 18:24:20 Nit: you can also use: return True if self.result
josiahk 2016/06/27 19:33:25 Done.
+
def Reset(self): # pragma: no cover
"""Resets to the state as if no analysis is run."""
self.pipeline_status_path = None
@@ -153,3 +169,9 @@ 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_key = ndb.StringProperty(indexed=False)
chanli 2016/06/24 18:24:20 If you don't need this anymore, please remove it.
josiahk 2016/06/27 19:33:25 Done.
+ 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