Skip to content

Commit 6d4287d

Browse files
committed
Do not schedule downstream jobs without upstream jobs
Downstream tasks (Buildbot test and talos builders) that do not have an upstream task (Buildbot build builder) is because the build that triggers it is executed in the TaskCluster CI rather than on the Buildbot CI. For instance, Linux64 talos jobs are executed on Buildbot while the Linux64 builds are generated by TaskCluster. The decision task schedules the Buildbot downstream jobs via the Buildbot bridge. In this change we change determine_trigger_objective to ignore try to schedule Buildbot builders that do not have a Buildbot upstream builder but a TaskCluster upstream task.
1 parent 1e17405 commit 6d4287d

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

mozci/mozci.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,18 @@ def determine_trigger_objective(revision, buildername,
173173
* Files, if needed, to trigger such builder
174174
175175
"""
176+
# Upstream builders return their ownself
177+
build_buildername = determine_upstream_builder(buildername)
178+
179+
if build_buildername is None:
180+
LOG.info("We believe {} is a builder triggered via Buildbot bridge "
181+
"and we won't schedule anything.".format(buildername))
182+
return None, None, None
183+
176184
builder_to_trigger = None
177185
files = None
178186
repo_name = query_repo_name_from_buildername(buildername)
179187

180-
build_buildername = determine_upstream_builder(buildername)
181-
182188
if VALIDATE and not valid_builder(build_buildername):
183189
raise MozciError("Our platforms mapping system has failed.")
184190

test/test_platforms.py

+13
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@
3838
get_builder_extra_properties,
3939
)
4040

41+
@patch('mozci.platforms.fetch_allthethings_data')
42+
def test_no_buildbot_upstream_builder(fetch_allthethings_data):
43+
fetch_allthethings_data.return_value = ALLTHETHINGS
44+
assert determine_upstream_builder(
45+
"Ubuntu HW 12.04 x64 autoland talos g2-e10s") is None
46+
47+
@patch('mozci.platforms.fetch_allthethings_data')
48+
def test_has_buildbot_upstream_builder(fetch_allthethings_data):
49+
fetch_allthethings_data.return_value = ALLTHETHINGS
50+
assert determine_upstream_builder(
51+
"Rev7 MacOSX Yosemite 10.10.5 mozilla-esr52 debug test cppunit") == \
52+
'OS X 10.7 64-bit mozilla-esr52 leak test build'
53+
4154

4255
class TestIsDownstream(unittest.TestCase):
4356

0 commit comments

Comments
 (0)