Skip to content

Commit f53d242

Browse files
author
Bob Clary
committed
Bug 1675330 - Do not use exception tasks when replacing tasks using index-search. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D96565
1 parent 7a64111 commit f53d242

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

taskcluster/taskgraph/optimize/strategies.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from taskgraph import files_changed
1414
from taskgraph.optimize import register_strategy, OptimizationStrategy
15-
from taskgraph.util.taskcluster import find_task_id
15+
from taskgraph.util.taskcluster import find_task_id, status_task
1616

1717
logger = logging.getLogger(__name__)
1818

@@ -35,7 +35,9 @@ def should_replace_task(self, task, params, index_paths):
3535
for index_path in index_paths:
3636
try:
3737
task_id = find_task_id(index_path)
38-
return task_id
38+
status = status_task(task_id)
39+
if status not in ("exception", "failed"):
40+
return task_id
3941
except KeyError:
4042
# 404 will end up here and go on to the next index path
4143
pass

0 commit comments

Comments
 (0)