Bug 1100775 - some try builds are missing binaries and artifacts in ftp, r=mgerva
--- a/mozharness/mozilla/building/buildbase.py
+++ b/mozharness/mozilla/building/buildbase.py
@@ -839,24 +839,28 @@ or run without that action (ie: --no-{ac
def _query_who(self):
""" looks for who triggered the build with a change.
This is used for things like try builds where the upload dir is
associated with who pushed to try. First it will look in self.config
and failing that, will poll buildbot_config
If nothing is found, it will default to returning "nobody@example.com"
"""
- _who = ''
+ _who = "nobody@example.com"
if self.config.get('who'):
_who = self.config['who']
- if self.buildbot_config and 'sourcestamp' in self.buildbot_config:
- if self.buildbot_config['sourcestamp'].get('who'):
- _who = self.buildbot_config['sourcestamp']['who']
- if not _who:
- _who = "nobody@example.com"
+ else:
+ try:
+ if self.buildbot_config:
+ _who = self.buildbot_config['sourcestamp']['changes'][0]['who']
+ except (KeyError, IndexError):
+ # KeyError: "sourcestamp" or "changes" or "who" not in buildbot_config
+ # IndexError: buildbot_config['sourcestamp']['changes'] is empty
+ # "who" is not available, using the default value
+ pass
return _who
def _query_post_upload_cmd(self):
c = self.config
post_upload_cmd = ["post_upload.py"]
buildid = self.query_buildid()
revision = self.query_revision()
platform = self.stage_platform