Bug 1204077 - For TryToolsMixin grab the commit message from pushlog if not available in Buildbot Changes. r=chmanchester
authorArmen Zambrano Gasparnian <armenzg@mozilla.com>
Fri, 18 Sep 2015 13:06:09 -0400
changeset 295904 03233057f1e699551915436d9fa98818b28f9b4d
parent 295903 c9dbc1119342145b08883bb85566a270a3081b48
child 295905 82767b12c2334eff297653cf9eb6c7241541cc7f
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1204077
milestone43.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 1204077 - For TryToolsMixin grab the commit message from pushlog if not available in Buildbot Changes. r=chmanchester TryToolsMixin tries to grab the commit message associated to a test job by inspecting the associated Changes object of a buildbot job. For Buildbot jobs triggered through the Buildbot Bridge the Changes object is not set hence we fail. In this patch we teach it to use the pushlog to determine the commit message for such cases.
testing/mozharness/mozharness/mozilla/testing/try_tools.py
--- a/testing/mozharness/mozharness/mozilla/testing/try_tools.py
+++ b/testing/mozharness/mozharness/mozilla/testing/try_tools.py
@@ -23,18 +23,21 @@ class TryToolsMixin(TransferMixin):
         '--tag': {
             'action': 'append',
             'dest': 'tags',
             'default': None,
         },
     }
 
     def _extract_try_message(self):
-        msg = self.buildbot_config['sourcestamp']['changes'][-1]['comments']
-        if len(msg) == 1024:
+        msg = None
+        if self.buildbot_config['sourcestamp']['changes']:
+            msg = self.buildbot_config['sourcestamp']['changes'][-1]['comments']
+
+        if msg is None or len(msg) == 1024:
             # This commit message was potentially truncated, get the full message
             # from hg.
             props = self.buildbot_config['properties']
             rev = props['revision']
             repo = props['repo_path']
             url = 'https://hg.mozilla.org/%s/json-pushes?changeset=%s&full=1' % (repo, rev)
 
             pushinfo = self.load_json_from_url(url)