bug 1237610 - slight cleanup in should_skip_dispatch. r=gps
authorTed Mielczarek <ted@mielczarek.org>
Wed, 16 May 2018 12:26:52 -0400
changeset 437685 61de9d8b0bb22a0e95dac87b297f727f15e4f346
parent 437684 a413b8fa5c7f3b12b7161782d2b774e96120a78e
child 437686 328a9f04072daa04708d44ee729f54291e983691
push id34690
push usercbrindusan@mozilla.com
push dateFri, 21 Sep 2018 17:30:01 +0000
treeherdermozilla-central@ce4e883f7642 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1237610
milestone64.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 1237610 - slight cleanup in should_skip_dispatch. r=gps MozReview-Commit-ID: HJLO82QZQVO Differential Revision: https://phabricator.services.mozilla.com/D4595
build/mach_bootstrap.py
--- a/build/mach_bootstrap.py
+++ b/build/mach_bootstrap.py
@@ -207,17 +207,20 @@ def bootstrap(topsrcdir, mozilla_dir=Non
                 raise
 
         with open(os.path.join(outgoing_dir, str(uuid.uuid4()) + '.json'),
                   'w') as f:
             json.dump(data, f, sort_keys=True)
 
     def should_skip_dispatch(context, handler):
         # The user is performing a maintenance command.
-        if handler.name in ('bootstrap', 'doctor', 'mach-commands', 'vcs-setup'):
+        if handler.name in ('bootstrap', 'doctor', 'mach-commands', 'vcs-setup',
+                            # We call mach environment in client.mk which would cause the
+                            # data submission to block the forward progress of make.
+                            'environment'):
             return True
 
         # We are running in automation.
         if 'MOZ_AUTOMATION' in os.environ or 'TASK_ID' in os.environ:
             return True
 
         # The environment is likely a machine invocation.
         if sys.stdin.closed or not sys.stdin.isatty():
@@ -230,21 +233,16 @@ def bootstrap(topsrcdir, mozilla_dir=Non
 
 
         For now,  we will use this to handle build system telemetry.
         """
         # Don't do anything when...
         if should_skip_dispatch(context, handler):
             return
 
-        # We call mach environment in client.mk which would cause the
-        # data submission below to block the forward progress of make.
-        if handler.name in ('environment'):
-            return
-
         # We have not opted-in to telemetry
         if 'BUILD_SYSTEM_TELEMETRY' not in os.environ:
             return
 
         # Every n-th operation
         if random.randint(1, TELEMETRY_SUBMISSION_FREQUENCY) != 1:
             return