Bug 1533398 - make wrong state for rerun action a soft error r=Callek

Differential Revision: https://phabricator.services.mozilla.com/D22538

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dustin J. Mitchell 2019-03-07 17:47:36 +00:00
parent 5b0d4e70f1
commit cbee2881bd

View File

@ -7,7 +7,6 @@
from __future__ import absolute_import, print_function, unicode_literals
import logging
import sys
from taskgraph.util.taskcluster import (
status_task,
@ -54,9 +53,9 @@ def rerun_action(parameters, graph_config, input, task_group_id, 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))