Bug 1533398 - make wrong state for rerun action a soft error r=Callek
authorDustin J. Mitchell <dustin@mozilla.com>
Thu, 07 Mar 2019 17:47:36 +0000
changeset 520856 7a1c873a21b22134a1741db7b88268de2869263f
parent 520855 6490553fc843801070935e47e715e64ff0071615
child 520857 9f7170a27e4cfd08afa9026dbf9b826582bbed35
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1533398
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1533398 - make wrong state for rerun action a soft error r=Callek Differential Revision: https://phabricator.services.mozilla.com/D22538
taskcluster/taskgraph/actions/rerun.py
--- a/taskcluster/taskgraph/actions/rerun.py
+++ b/taskcluster/taskgraph/actions/rerun.py
@@ -2,17 +2,16 @@
 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 import logging
-import sys
 
 from taskgraph.util.taskcluster import (
     status_task,
     rerun_task
 )
 from .registry import register_callback_action
 from .util import fetch_graph_and_labels
 from taskgraph.util import taskcluster
@@ -49,14 +48,14 @@ def rerun_action(parameters, graph_confi
         logger.error(
             "Refusing to rerun {}: taskId {} not in decision task {} label_to_taskid!".format(
                 label, task_id, decision_task_id
             )
         )
 
     status = status_task(task_id)
     if status not in RERUN_STATES:
-        logger.error(
-            "Refusing to rerun {}: state {} not in {}!".format(label, status, RERUN_STATES)
+        logger.warning(
+            "No need to to rerun {}: state '{}' not in {}!".format(label, status, RERUN_STATES)
         )
-        sys.exit(1)
+        return
     rerun_task(task_id)
     logger.info('Reran {}'.format(label))