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

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

Issue 1827903002: [Findit] Modify handlers_util to prepare for the new UI change. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: remove possible flaky tests. Created 4 years, 9 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 | « appengine/findit/handlers/handlers_util.py ('k') | appengine/findit/handlers/swarming_task.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/handlers/result_status.py
diff --git a/appengine/findit/handlers/result_status.py b/appengine/findit/handlers/result_status.py
new file mode 100644
index 0000000000000000000000000000000000000000..5835f294c7b9d85f1971c101e1f0efa09f18717f
--- /dev/null
+++ b/appengine/findit/handlers/result_status.py
@@ -0,0 +1,40 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from model import wf_analysis_status
+
+# Additional status for swarming tasks and try jobs.
+NO_SWARMING_TASK_FOUND = 110
+NON_SWARMING_NO_RERUN = 120
+#Additional reasons for no try job information.
+SWARMING_TASK_PENDING = 130
+SWARMING_TASK_RUNNING = 140
+SWARMING_TASK_ERROR = 150
+NO_FAILURE_RESULT_MAP = 160
+FLAKY = 200
+
+NO_TRY_JOB_REASON_MAP = {
+ NO_SWARMING_TASK_FOUND: NO_SWARMING_TASK_FOUND,
+ NON_SWARMING_NO_RERUN: NON_SWARMING_NO_RERUN,
+ NO_FAILURE_RESULT_MAP: NO_FAILURE_RESULT_MAP,
+ wf_analysis_status.PENDING: SWARMING_TASK_PENDING,
+ wf_analysis_status.ANALYZING: SWARMING_TASK_RUNNING,
+ wf_analysis_status.ERROR: SWARMING_TASK_ERROR,
+}
+
+STATUS_MESSAGE_MAP = {
+ wf_analysis_status.PENDING: 'Try job is pending.',
+ wf_analysis_status.ANALYZING: 'Try job is running.',
+ wf_analysis_status.ANALYZED: 'Not Found.',
+ wf_analysis_status.ERROR: 'Try job failed.',
+ NO_SWARMING_TASK_FOUND: 'No swarming task found, hence no try job.',
+ NON_SWARMING_NO_RERUN: ('No swarming task nor try job will be triggered'
+ ' for non-swarming steps.'),
+ SWARMING_TASK_PENDING: 'Swarming task is pending, no try job yet.',
+ SWARMING_TASK_RUNNING: 'Swarming task is running, no try job yet.',
+ SWARMING_TASK_ERROR: (
+ 'Swarming task failed, try job will not be triggered.'),
+ NO_FAILURE_RESULT_MAP: 'No swarming task nor try job was triggered.',
+ FLAKY: 'Flaky tests.',
+}
« no previous file with comments | « appengine/findit/handlers/handlers_util.py ('k') | appengine/findit/handlers/swarming_task.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698