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

Unified Diff: appengine/findit/handlers/build_failure.py

Issue 1921893004: [Findit] Fix Key error in build_failure handler. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Add a special status to this case and add test. Created 4 years, 8 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
« no previous file with comments | « no previous file | appengine/findit/handlers/result_status.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/handlers/build_failure.py
diff --git a/appengine/findit/handlers/build_failure.py b/appengine/findit/handlers/build_failure.py
index 16245b68fc64e27ffe65911c5501500704b58260..9b75d58baa75fc41ca96a38be1535ed9ee64d537 100644
--- a/appengine/findit/handlers/build_failure.py
+++ b/appengine/findit/handlers/build_failure.py
@@ -253,11 +253,14 @@ def _GetAnalysisResultWithTryJobInfo(
'supported': heuristic_result['supported']
}
- if try_job_result['status'] == result_status.FLAKY:
- step_updated_results['flaky_failures'].append(final_result)
- elif try_job_result['status'] in NO_TRY_JOB_REASON_MAP.values():
+ if ('status' not in try_job_result or
+ try_job_result['status'] in NO_TRY_JOB_REASON_MAP.values()):
# There is no try job info but only heuristic result.
+ try_job_result['status'] = try_job_result.get(
+ 'status', result_status.UNKNOWN)
step_updated_results['unclassified_failures'].append(final_result)
+ elif try_job_result['status'] == result_status.FLAKY:
+ step_updated_results['flaky_failures'].append(final_result)
else:
step_updated_results['reliable_failures'].append(final_result)
« no previous file with comments | « no previous file | appengine/findit/handlers/result_status.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698