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

Unified Diff: appengine/findit/waterfall/detect_first_failure_pipeline.py

Issue 2027333002: [Findit] don't included skipped or unknown tests in swarming tasks into failed tests. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
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/waterfall/detect_first_failure_pipeline.py
diff --git a/appengine/findit/waterfall/detect_first_failure_pipeline.py b/appengine/findit/waterfall/detect_first_failure_pipeline.py
index a6dd42e025edc92e68057099ee4417dc7493aa35..06cc093a024b4eacbe62398ac14c82f166031df6 100644
--- a/appengine/findit/waterfall/detect_first_failure_pipeline.py
+++ b/appengine/findit/waterfall/detect_first_failure_pipeline.py
@@ -18,6 +18,7 @@ from waterfall import swarming_util
_MAX_BUILDS_TO_CHECK = 20
+_NON_FAILURE_STATUS = ['SUCCESS', 'SKIPPED', 'UNKNOWN']
class DetectFirstFailurePipeline(BasePipeline):
@@ -181,8 +182,11 @@ class DetectFirstFailurePipeline(BasePipeline):
for test_name in iteration.keys():
is_reliable_failure = True
- if any(test['status'] == 'SUCCESS' for test in iteration[test_name]):
- # Ignore the test if any of the attempts were 'SUCCESS'.
+ if (any(test['status'] in _NON_FAILURE_STATUS
+ for test in iteration[test_name])):
+ # Ignore the test if any of the attempts didn't fail.
+ # If a test is skipped, that means it was not run at all.
+ # Treats it as success since the status cannot be determined.
is_reliable_failure = False
if is_reliable_failure:
« no previous file with comments | « appengine/findit/model/wf_swarming_task.py ('k') | appengine/findit/waterfall/swarming_tasks_to_try_job_pipeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698