Bug 1305795 - Sort buildbot properties for logging; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Tue, 27 Sep 2016 12:09:26 -0700
changeset 418561 20778ec3ffb51c8359ac1a993057323f0f9e6438
parent 418560 7a3db9326a6dd5d6ca452de948cdf2aca695a495
child 418562 5054f1cfa74e13d23ff1de4a26a9d644a918277e
push id30707
push userbmo:gps@mozilla.com
push dateWed, 28 Sep 2016 18:02:51 +0000
reviewersted
bugs1305795
milestone52.0a1
Bug 1305795 - Sort buildbot properties for logging; r?ted Not really related to the task at hand. But my brain was angry I had to read unsorted buildbot properties in log files as part of reverse engineering what mozharness is doing. MozReview-Commit-ID: HcglRXImXCA
testing/mozharness/mozharness/mozilla/buildbot.py
--- a/testing/mozharness/mozharness/mozilla/buildbot.py
+++ b/testing/mozharness/mozharness/mozilla/buildbot.py
@@ -63,17 +63,17 @@ class BuildbotMixin(object):
             # TODO try/except?
             self.buildbot_config = parse_config_file(c['buildbot_json_path'])
             buildbot_properties = copy.deepcopy(self.buildbot_config.get('properties', {}))
             if 'commit_titles' in buildbot_properties:
                 # Remove the commit messages since they can cause false positives with
                 # Treeherder log parsers. Eg: "Bug X - Fix TEST-UNEPXECTED-FAIL ...".
                 del buildbot_properties['commit_titles']
             self.info("Using buildbot properties:")
-            self.info(json.dumps(buildbot_properties, indent=4))
+            self.info(json.dumps(buildbot_properties, indent=4, sort_keys=True))
 
     def tryserver_email(self):
         pass
 
     def buildbot_status(self, tbpl_status, level=None, set_return_code=True):
         if tbpl_status not in TBPL_STATUS_DICT:
             self.error("buildbot_status() doesn't grok the status %s!" % tbpl_status)
         else: