summaryrefslogtreecommitdiffstats
path: root/taskcluster/gecko_taskgraph/decision.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /taskcluster/gecko_taskgraph/decision.py
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/gecko_taskgraph/decision.py')
-rw-r--r--taskcluster/gecko_taskgraph/decision.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/taskcluster/gecko_taskgraph/decision.py b/taskcluster/gecko_taskgraph/decision.py
index e0bc9e3ca8..9fd8a5b5c1 100644
--- a/taskcluster/gecko_taskgraph/decision.py
+++ b/taskcluster/gecko_taskgraph/decision.py
@@ -32,6 +32,7 @@ from taskgraph.util.yaml import load_yaml
from . import GECKO
from .actions import render_actions_json
+from .files_changed import get_changed_files
from .parameters import get_app_version, get_version
from .try_option_syntax import parse_message
from .util.backstop import BACKSTOP_INDEX, is_backstop
@@ -308,6 +309,9 @@ def get_decision_parameters(graph_config, options):
parameters["hg_branch"] = get_hg_revision_branch(
GECKO, revision=parameters["head_rev"]
)
+ parameters["files_changed"] = sorted(
+ get_changed_files(parameters["head_repository"], parameters["head_rev"])
+ )
parameters["next_version"] = None
parameters["optimize_strategies"] = None
parameters["optimize_target_tasks"] = True
@@ -448,14 +452,17 @@ def set_try_config(parameters, task_config_file):
def set_decision_indexes(decision_task_id, params, graph_config):
index_paths = []
if params["backstop"]:
- index_paths.append(BACKSTOP_INDEX)
+ # When two Decision tasks run at nearly the same time, it's possible
+ # they both end up being backstops if the second checks the backstop
+ # index before the first inserts it. Insert this index first to reduce
+ # the chances of that happening.
+ index_paths.insert(0, BACKSTOP_INDEX)
subs = params.copy()
subs["trust-domain"] = graph_config["trust-domain"]
- index_paths = [i.format(**subs) for i in index_paths]
for index_path in index_paths:
- insert_index(index_path, decision_task_id, use_proxy=True)
+ insert_index(index_path.format(**subs), decision_task_id, use_proxy=True)
def write_artifact(filename, data):