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

Unified Diff: appengine/cr-buildbucket/swarming/swarming.py

Issue 2098203002: swarmbucket: task TIMED_OUT is infra failure (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
« no previous file with comments | « no previous file | appengine/cr-buildbucket/swarming/test/swarming_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cr-buildbucket/swarming/swarming.py
diff --git a/appengine/cr-buildbucket/swarming/swarming.py b/appengine/cr-buildbucket/swarming/swarming.py
index f94cced7dbbe1e8d5596078b84634416619720cf..bee0801730b5380971cd98c31782a304c442e918 100644
--- a/appengine/cr-buildbucket/swarming/swarming.py
+++ b/appengine/cr-buildbucket/swarming/swarming.py
@@ -411,9 +411,14 @@ def _update_build(build, result):
if state == 'CANCELED':
build.result = model.BuildResult.CANCELED
build.cancelation_reason = model.CancelationReason.CANCELED_EXPLICITLY
- elif state in ('TIMED_OUT', 'EXPIRED'):
+ elif state == 'EXPIRED':
Vadim Sh. 2016/06/28 18:05:35 this is also INFRA_FAILURE, it happens when we hav
nodir 2016/06/28 22:13:50 Done.
+ # Task did not start.
build.result = model.BuildResult.CANCELED
build.cancelation_reason = model.CancelationReason.TIMEOUT
+ elif state == 'TIMED_OUT':
+ # Task started, but timed out.
+ build.result = model.BuildResult.FAILURE
+ build.failure_reason = model.FailureReason.INFRA_FAILURE
elif state == 'BOT_DIED' or result.get('internal_failure'):
build.result = model.BuildResult.FAILURE
build.failure_reason = model.FailureReason.INFRA_FAILURE
« no previous file with comments | « no previous file | appengine/cr-buildbucket/swarming/test/swarming_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698