Bug 1237739 - Sort keys in generated graph; r?garndt draft
authorGregory Szorc <gps@mozilla.com>
Thu, 07 Jan 2016 12:26:12 -0800
changeset 319773 5f4968b8d45b3ecf58796762c2a72a2aab449eec
parent 319654 e0bcd16e1d4b99ba3e542149d0d41e0f60c54b5c
child 319774 c8bb1f0159c287ab103d55f55122b3e046c1898f
push id9087
push usergszorc@mozilla.com
push dateThu, 07 Jan 2016 20:39:53 +0000
reviewersgarndt
bugs1237739
milestone46.0a1
Bug 1237739 - Sort keys in generated graph; r?garndt Deterministic output is easier to read and test. We're not fully deterministic with this patch, but it's a start.
testing/taskcluster/mach_commands.py
--- a/testing/taskcluster/mach_commands.py
+++ b/testing/taskcluster/mach_commands.py
@@ -565,17 +565,17 @@ class Graph(object):
                     print_task(task)
             return
 
         # When we are extending the graph remove extra fields...
         if params['ci'] is True:
             graph.pop('scopes', None)
             graph.pop('metadata', None)
 
-        print(json.dumps(graph, indent=4))
+        print(json.dumps(graph, indent=4, sort_keys=True))
 
 @CommandProvider
 class CIBuild(object):
     @Command('taskcluster-build', category='ci',
         description="Create taskcluster try server build task")
     @CommandArgument('--base-repository',
         help='URL for "base" repository to clone')
     @CommandArgument('--head-repository',