Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
Ted Mielczarek 54b3bbd1ce bug 1505205 - don't write telemetry for recursive mach command invocations. r=firefox-build-system-reviewers,chmanchester
This change tries to ensure that we don't write telemetry data for mach
commands invoked recursively as part of other mach commands. The intent of
build system telemetry is to only collect data about commands that users are
invoking directly.

There are two ways that we found mach commands can be recursively invoked:
* By running a python subprocess to recursively invoke mach (used in
  `mach bootstrap` to call `mach artifact toolchain`)
* By using `Registrar.dispatch` to delegate to a sub-command (used by many
  build system commands to invoke `mach build`).

The subprocess case is handled here by having mach set a `MACH_MAIN_PID`
environment variable whose value is the current process' pid on startup if it
does not already exist in the environment. Telemetry code then checks that the
value of that variable matches the current pid and skips writing telemetry data
if not.

The dispatch case is handled by making `MachRegistrar` store the current depth
of the command stack and pass it to the `post_dispatch_handler` which will skip
writing telemetry data if depth != 1.

Additionally the `should_skip_dispatch` function in mach_bootstrap is renamed
to `should_skip_telemetry_submission`, which was its original intent. The
combination of checks added in this change should be sufficient for deciding
when to write telemetry data, and we were not collecting telemetry for the set
of mach commands in that function (which included `mach bootstrap`).

In order to facilitate writing a test for the dispatch case this change adds a
`mach python --exec-file` option to execute Python code directly in the context
of the `mach python` command.

Differential Revision: https://phabricator.services.mozilla.com/D11207

--HG--
extra : moz-landing-system : lando
2018-11-10 19:04:30 +00:00
.cargo Bug 1504507 - Update serde branch for changes in WR PR #3264. r=kats 2018-11-05 13:14:07 +00:00
.vscode Bug 1493017 - Tweak vscode tasks.json problemMatcher regexes to handle clang/Windows output - r=jya 2018-09-21 10:00:59 +00:00
accessible Merge inbound to mozilla-central. a=merge 2018-11-08 20:48:31 +02:00
browser Bug 1504032 - Remove concept of card types, supportedTypes, BasicCardType enum r=MattN,baku 2018-11-10 06:59:26 +00:00
build bug 1505205 - don't write telemetry for recursive mach command invocations. r=firefox-build-system-reviewers,chmanchester 2018-11-10 19:04:30 +00:00
caps Bug 1502743 - Replace black/whitelist within caps to block/allowlist r=ckerschb 2018-10-31 17:56:43 +00:00
chrome Bug 1356412: Part 2 - Remove script loader path mangling from DOM code. r=bz 2018-11-02 16:15:26 -07:00
config Bug 1502530 - Part 2: Update tzdata in ICU data files to 2018g. r=Waldo 2018-11-06 02:52:01 -08:00
db Bug 1495238 - Upgrade to SQLite 3.25.3. r=mak 2018-11-06 16:59:19 +00:00
devtools Bug 1505896 - fix JS error when calling this._telemetry.finish(A11Y_SERVICE_DURATION, this, true); on a11y panel open. r=gl 2018-11-09 15:58:04 +00:00
docshell Backed out changeset 365e0d2414bf (bug 1504728) for browser-chrome failures. CLOSED TREE 2018-11-09 18:48:39 +02:00
dom Bug 1504032 - Remove concept of card types, supportedTypes, BasicCardType enum r=MattN,baku 2018-11-10 06:59:26 +00:00
editor Merge inbound to mozilla-central. a=merge 2018-11-07 18:17:51 +02:00
embedding
extensions Bug 1504442 - Remove nsIReadConfig r=mkaply 2018-11-07 18:23:16 +00:00
gfx Bug 1506206 - Update webrender to commit 9e65149a487afa35994076d7db918c07d2b967bf (WR PR #3293). r=kats 2018-11-10 01:37:27 +00:00
gradle/wrapper
hal Bug 1488401 - Remove the remnants of the DiskSpaceWatcher r=asuth,janv,smaug 2018-09-13 06:40:51 +00:00
image Bug 1505180 - Add an SVG image drawing profiler label. r=mattwoodrow 2018-11-07 01:47:08 +00:00
intl Bug 1502530 - Part 2: Update tzdata in ICU data files to 2018g. r=Waldo 2018-11-06 02:52:01 -08:00
ipc Backed out 9 changesets (bug 1471535) for Mochitest failures in build/src/dom/media/ipc/VideoDecoderChild.cpp 2018-11-09 12:14:50 +02:00
js Bug 1506152 - Revisions to the comment at the top of Stream.h. r=tcampbell 2018-11-09 22:22:42 +00:00
layout Bug 1497990 Part 2 - Do not carry block-end margin out of ColumnSetFrame. r=dbaron 2018-11-09 21:02:12 +00:00
media Bug 1505419 - replace nestegg's README_MOZILLA with moz.yaml r=kinetik 2018-11-07 20:24:49 +00:00
memory Backed out 2 changesets (bug 1402282) for turning multiple browser chrome bugs into permafail 2018-11-05 17:56:37 +02:00
mfbt Bug 1502207 Part 2 - Fix useUse new atomic access API in Gecko, r=froydnj. 2018-10-25 11:42:18 -10:00
mobile Bug 1506096 - Restore browser.urlbar.autocomplete.enabled for Android. r=JanH 2018-11-09 21:07:13 +00:00
modules Bug 1505867 - Add pref for hpack table dumps. r=bagder 2018-11-09 07:23:17 +00:00
mozglue Backed out 2 changesets (bug 1495512) for failing Win MinGW builds 2018-11-10 04:06:10 +02:00
netwerk Bug 1505867 - Add pref for hpack table dumps. r=bagder 2018-11-09 07:23:17 +00:00
nsprpub Bug 1477680, NSPR 4.20 RTM, no code change, only version number, r=me 2018-08-28 16:21:01 +02:00
other-licenses Backed out changeset 196dcfd11ce3 (bug 1468544) for landing twice 2018-11-06 20:46:50 +02:00
parser Bug 1364399 follow-up - Test cases and clarifying comment. r=smaug. 2018-11-07 12:54:42 +02:00
python bug 1505205 - don't write telemetry for recursive mach command invocations. r=firefox-build-system-reviewers,chmanchester 2018-11-10 19:04:30 +00:00
security Bug 1506264 - Fix querying the nsIObserver interface in all classes implementing it r=erahm 2018-11-09 22:20:54 +00:00
services No Bug, mozilla-central repo-update HSTS HPKP blocklist remote-settings tld-suffixes - a=repo-update r=RyanVM 2018-11-08 13:54:03 +00:00
servo Bug 1505156 - Percentage values of translate are serialized as percent for computed values. r=emilio 2018-11-08 22:41:00 +00:00
startupcache Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj 2018-10-31 20:39:03 +00:00
storage Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop 2018-10-19 12:55:39 +00:00
taskcluster Bug 1475512 - Beetmove .msi's for nightlies and releases. r=mtabara 2018-11-09 15:05:45 +00:00
testing Bug 1506367 - Tests fail for network attempt to snippets.cdn.mozilla.net on Nightly builds r=r1cky 2018-11-10 18:23:05 +00:00
third_party Bug 1506129 - Re-vendor rust dependencies. r=kats 2018-11-09 18:55:23 +00:00
toolkit Bug 1501295 - Extend FX_TAB_REMOTE_NAVIGATION_DELAY_MS probe lifetime another 6 months. data-review=chutten, r=Gijs 2018-11-10 00:17:10 +00:00
tools No bug: [try-staging] Geneate the correct release_type for esr60 staging runs; r=nthomas 2018-11-09 02:02:25 +00:00
uriloader Bug 1371509 - fix issues with comparing window URIs in browser_auto_close_window.js, r=Felipe 2018-11-09 19:11:30 +00:00
view Bug 1504521 - rename in-tree mentions of bugzilla metadata for product and component "Core :: Layout: Web Painting" to "Core :: Web Painting" r=kats 2018-11-04 12:57:04 +00:00
widget Bug 1506264 - Fix querying the nsIObserver interface in all classes implementing it r=erahm 2018-11-09 22:20:54 +00:00
xpcom Bug 1504643 - Enforce template-parameter classes restrictions in MozPromise. r=gerald 2018-11-09 15:45:31 +00:00
xpfe/appshell Bug 1496722 - Make nsIDocShellTreeItem.itemType readonly. r=peterv 2018-11-08 21:58:58 +00:00
.arcconfig
.clang-format
.clang-format-ignore Bug 1506177 - Ignore the formating on all layout/style/ns*List.h file r=emilio 2018-11-09 16:51:01 +00:00
.cron.yml Bug 1503547 - Move searchfox indexing jobs a half hour earlier to match nightly build times. r=mccr8 2018-11-01 15:37:07 +00:00
.eslintignore Bug 1501445 - Remove unused netwerk/wifi/tests/wifi_access_point_test.html. r=jdm 2018-11-09 15:29:43 +00:00
.eslintrc.js Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (setup ESLint). r=mossop 2018-10-19 08:46:31 +00:00
.flake8 Bug 1479503: Check infer in ./mach static-analysis autotest. r=nalexander 2018-10-24 21:54:34 +00:00
.gdbinit Bug 1486903 - Add "ftl" command to dump frame subtree to .gdbinit. r=Ehsan 2018-08-28 20:20:21 +00:00
.gdbinit_python
.gitignore Bug 1484708 - Update .gitignore rules and add js/src/obj-*. r=ted.mielczarek 2018-08-20 09:03:00 +03:00
.hgignore Bug 1479503: Check infer in ./mach static-analysis autotest. r=nalexander 2018-10-24 21:54:34 +00:00
.hgtags No bug - Tagging mozilla-central c44fbdd5173548c9035256dda8fd3512f67118a8 with FIREFOX_NIGHTLY_64_END a=release DONTBUILD CLOSED TREE 2018-10-22 08:48:42 -07:00
.lldbinit Bug 1481555: Use lldb's python API to summarise nsAtoms. r=froydnj 2018-08-08 15:11:22 +00:00
.mailmap
.taskcluster.yml Bug 1505930 - Promote try-push analysis result r=catlee 2018-11-08 21:40:53 +00:00
.trackerignore Bug 1486468 - Add .trackerignore file to avoid GNOME Tracker indexing mozilla-central files. r=ahal 2018-08-27 16:45:03 +02:00
.yamllint
.ycm_extra_conf.py
aclocal.m4
AUTHORS Bug 1481409 - Use HTTPS protocol for Mozilla's Credits link in AUTHORS file r=mossop 2018-08-13 16:39:30 +00:00
build.gradle Bug 1485439 - Pre: Upgrade Android Gradle plugin. r=nalexander 2018-09-04 22:33:00 +02:00
Cargo.lock Bug 1506129 - Re-vendor rust dependencies. r=kats 2018-11-09 18:55:23 +00:00
Cargo.toml Bug 1504507 - Update serde branch for changes in WR PR #3264. r=kats 2018-11-05 13:14:07 +00:00
client.mk Bug 1498031 - Merge code paths for running configure between Tup and Make based backends. r=firefox-build-system-reviewers,mshal 2018-10-16 22:21:36 +00:00
client.py
CLOBBER Bug 1499026 - Part 3: Updating ICU requires a clobber. r=clobber 2018-11-01 06:32:49 -07:00
configure.in
configure.py
GNUmakefile
gradle.properties
gradlew
LEGAL
LICENSE
mach
Makefile.in Bug 1498031 - Merge code paths for running configure between Tup and Make based backends. r=firefox-build-system-reviewers,mshal 2018-10-16 22:21:36 +00:00
moz.build Bug 1490253 - Replace pipenv with pip-tools for vendoring packages and dependencies; r=ahal 2018-10-10 08:58:41 +00:00
moz.configure Bug 1492716 - Part 2: Add formatting rule to help text for --{enable,disable,with,without}. r=glandium 2018-10-16 20:28:12 +09:00
mozilla-config.h.in Bug 1504022 - Map GetExceptionCode to a nop to avoid an error r=bobowen 2018-11-02 13:28:01 -05:00
old-configure.in Bug 1495238 - Upgrade to SQLite 3.25.3. r=mak 2018-11-06 16:59:19 +00:00
package-lock.json Bug 1495397 - Update mozilla-central's package.json for being more generic, and move existing ESLint modules to dev dependencies. r=firefox-build-system-reviewers,nalexander 2018-10-01 17:28:45 +00:00
package.json Bug 1495397 - Update mozilla-central's package.json for being more generic, and move existing ESLint modules to dev dependencies. r=firefox-build-system-reviewers,nalexander 2018-10-01 17:28:45 +00:00
README.txt Bug 1480997 - Remove "Mozilla FTP server" link in README.txt r=mossop 2018-10-23 10:06:29 +00:00
settings.gradle
test.mozbuild

An explanation of the Mozilla Source Code Directory Structure and links to
project pages with documentation can be found at:

    https://developer.mozilla.org/en/Mozilla_Source_Code_Directory_Structure

For information on how to build Mozilla from the source code, see:

    https://developer.mozilla.org/en/docs/Build_Documentation

To have your bug fix / feature added to Mozilla, you should create a patch and
submit it to Bugzilla (https://bugzilla.mozilla.org). Instructions are at:

    https://developer.mozilla.org/en/docs/Creating_a_patch
    https://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree

If you have a question about developing Mozilla, and can't find the solution
on https://developer.mozilla.org, you can try asking your question in a
mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]

Nightly development builds can be downloaded from:

    https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
            - or -
    https://www.mozilla.org/firefox/channel/desktop/#nightly

Keep in mind that nightly builds, which are used by Mozilla developers for
testing, may be buggy.