Commit Graph

47 Commits (main)

Author SHA1 Message Date
Junji Watanabe 8050ac421d ninjalog_uploader: Send is_cloudtop=false explicitly
This allows us to distinguish between old data without is_cloudtop
flag and new data from non-Cloudtop.

Bug: 367856712
Change-Id: I01995a050a5780b11465ecd6923e530dff6f7929
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5889398
Reviewed-by: Philipp Wollermann <philwo@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
5 months ago
Junji Watanabe ec715a4dac ninjalog_uploader: Add is_cloudtop, gce_machine_type, is_cog to the Ninjalog metadata
Bug: 367856712
Change-Id: Ibaa96d779cc3fc896e8203525346e3ca27d9d8b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5877849
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
5 months ago
Junji Watanabe 20a0cda9e9 ninjalog_uploader: Distinguish between explicit and default build configs
This CL adds `explicit_build_config_keys` to the metadata for the server
to distinguish between explicit and default configs.
This CL excludes the configs set in `//.gn` from the list, so that
the configs specified by users will be considered as explicit.

Bug: 364971744
Change-Id: I6a3d289d8ca6e054dac691051b53c92ad1ec23c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5853009
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
6 months ago
Junji Watanabe 4250face7b ninjalog_uploader: Collect all GN args except sensitive information
Bug: 364971744
Fixed: 364971744
Change-Id: Ia09ba43f3cd12638923b3add458f2f32f9a03860
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5836322
Commit-Queue: Junji Watanabe <jwata@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
6 months ago
Junji Watanabe 4a08b97dd4 ninjalog_uploader: Add user email to ninjalog metadata
Bug: 348527311
Change-Id: Idb623a57a2374f4ed5461a9cf159b2eda62c94f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5823448
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
6 months ago
Junji Watanabe 8f617b4617 autoninja: Add exit code and build duration to ninjalog metadata
- exit code will be useful to distinguish between successful builds and
others.
- build duration will cover the overhead outside of ninja invocation
e.g. Reclient and Siso's startup/shutdown.

Bug: 348527311
Change-Id: Ibebdf3d64597fb0e57914a84d33e46bca66671da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5804201
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
6 months ago
Junji Watanabe fca881606e ninjalog: Send AUTONINJA_BUILD_ID as invocation_id in metadata
Bug: 355127782
Change-Id: Iee9cb6228e568cc6d3ec12a7764e04442776af4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5740774
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
7 months ago
Junji Watanabe 28a7eef132 ninjalog: Store last uploaded .ninja_log mtime
The current logic checks if the mtime of .ninja_log is 2s older or not
to avoid duplicated uploads. This is problematic if post process takes
longer than 2s. e.g. Siso and/or Reclient's post process.

This CL changes the logic to store the last uploaded mtime as `.ninja_log.last_upload` file.

Bug: 353644846
Fixed: 353644846
Change-Id: I7fb82e43808476174644c50d97e984358a43409e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5724768
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
7 months ago
Junji Watanabe b12257963c autoninja: Replace ninjalog_uploader_wrapper.py and reclient_metrics.py with build_telemetry.py
This CL unifies the opt-in/opt-out handling for build telemetry collections about Reclient and Ninjalog.

The user consent message will be displayed only once at the beginning of a build.

```
❯ autoninja -C out/deterministic-andorid-dbg base
*** NOTICE ***
Google-internal telemetry (including build logs, username, and hostname) is collected on corp machines to diagnose performance and fix build issues. This reminder will be shown 9 more times. See http://go/chrome-build-telemetry for details. Hide this notice or opt out by running: build_telemetry [opt-in] [opt-out]
*** END NOTICE ***

Proxy started successfully.
...
```

Bug: 345113094
Change-Id: Ie5886287c4bd20262be0ff247508ac3869441eb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5669094
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Michael Savigny <msavigny@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
7 months ago
Junji Watanabe c117716649 ninjalog_uploader: Handles urllib.error.HTTPError
Bug: 350886098
Change-Id: I5d25c2b979da103b8ab6e61742d5a8da0c07b19d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5675205
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
8 months ago
Takuto Ikuta d32e1cb571 remove references to goma
We don't use goma anymore.

Bug: 41489832
Change-Id: Ia816ed49f55740090665f308da82781f60f64d23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5545484
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
9 months ago
Takuto Ikuta b433697f22 ninjalog_uploader.py: sort ALLOWLISTED_CONFIGS
Change-Id: I5de4ddc5efc71f1c96f4bc792bd521d76127e940
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5546604
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
9 months ago
Junji Watanabe 03821aea69 [ninjalog_uploader] Collect use_siso/use_remoteexec GN args metrics
These GN args specify which remote execution engine to use, in addition
to use_goma.

Change-Id: I422a7c857101c08298f38c852e857e8df5c5947f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5316078
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
1 year ago
Takuto Ikuta b5393e57bb ninjalog_uploader.py: use cipd to check authenticated account
Googlers authenticate with CIPD now to use reclient.

This is for
https://crrev.com/c/5035266/20#message-6bcb2d14f6758d0ba82d5cff99d699985c934707

Change-Id: Ie78675e6f7a8b47f7cafd85141f87139d1472f1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5058275
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
1 year ago
Takuto Ikuta df3e577855 apply black and `git cl format` for ninja related python files
This is made by
$ black --line-length 79 *ninja*.py
$ git cl format

Change-Id: Ic446898a5461ae536542f6312cae2ce126dfe82a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5035265
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Philipp Wollermann <philwo@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
1 year ago
Philipp Wollermann af369d8962 [ninja_log_uploader] fix minor issues
These changes are extracted from https://crrev.com/c/4881800

- rename a variable name to allowlisted
- remove an empty line
- fix typo

Change-Id: Iac2dc1664330311d55b3174ede8929f38f115adc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4886532
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
1 year ago
Gavin Mak 7f5b53ff8d Remove last py2 workarounds
python3 is the only supported version of python in depot_tools.

Changes include:
  * updating python version requirements
  * removing third_party/six

Bug: 1475402
Change-Id: Ib86231413fcac494ceb27d1783e53b9d86533c26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4845292
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 years ago
Mike Frysinger 124bb8e53c switch to 4 space indent
Leave the recipes/ code at 2 space to match the rest of the recipes
project in other repos.

Reformatted using:
files=( $(
	git ls-tree -r --name-only HEAD | \
		grep -Ev -e '^(third_party|recipes)/' | \
		grep '\.py$';
	git grep -l '#!/usr/bin/env.*python' | grep -v '\.py$'
) )
parallel ./yapf -i -- "${files[@]}"
~/chromiumos/chromite/contrib/reflow_overlong_comments "${files[@]}"

The files that still had strings that were too long were manually
reformatted because they were easy and only a few issues.
autoninja.py
clang_format.py
download_from_google_storage.py
fix_encoding.py
gclient_utils.py
git_cache.py
git_common.py
git_map_branches.py
git_reparent_branch.py
gn.py
my_activity.py
owners_finder.py
presubmit_canned_checks.py
reclient_helper.py
reclientreport.py
roll_dep.py
rustfmt.py
siso.py
split_cl.py
subcommand.py
subprocess2.py
swift_format.py
upload_to_google_storage.py

These files still had lines (strings) that were too long, so the pylint
warnings were suppressed with a TODO.
auth.py
gclient.py
gclient_eval.py
gclient_paths.py
gclient_scm.py
gerrit_util.py
git_cl.py
presubmit_canned_checks.py
presubmit_support.py
scm.py

Change-Id: Ia6535c4f2c48d46b589ec1e791dde6c6b2ea858f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4836379
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Junji Watanabe 8d6af632bf [ninjalog_uploader] Exclude absolute paths and options from targets
Absolute paths and options start with '-' should be excluded from targetrs.

Bug: b/270907050
Change-Id: Ic430381084b6d3673c34b45c8b3ca967f0f8af89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4302232
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
2 years ago
Takuto Ikuta 4b6a833b54 Revert "disable log collection temporarily"
This reverts commit 7bf7e06945.

Reason for revert:
Issue is fixed in https://crrev.com/c/4297356

Original change's description:
> disable log collection temporarily
>
> This is for b/270907050#comment2.
>
> Bug: b/270907050
> Change-Id: I4e816d38c1a0f379662533e278ab77cc46a8664a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4290688
> Commit-Queue: Dirk Pranke <dpranke@google.com>
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Junji Watanabe <jwata@google.com>

Bug: b/270907050
Change-Id: I63a4e9a872708d57e8a782b59e43a06c884a92ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4297698
Commit-Queue: Junji Watanabe <jwata@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
2 years ago
Junji Watanabe 56a18a86fe [ninjalog_uploader] Exclude -p ninja option from targets metrics
Some records include '-p' as a target in the ninja metrics.

Bug: b/270907050
Change-Id: I4040db5793e682eaa48242bc27756c91d05ad320
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4302230
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
2 years ago
Junji Watanabe 07edc50f39 Fix ninjalog_uploader.py to exclude /path/to/depot_tools/ninja.py
Bug: b/270907050
Change-Id: I2bb5ffbb9ae8590078c92e2c7e0095f28f0c21be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4297356
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
2 years ago
Takuto Ikuta 7bf7e06945 disable log collection temporarily
This is for b/270907050#comment2.

Bug: b/270907050
Change-Id: I4e816d38c1a0f379662533e278ab77cc46a8664a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4290688
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
2 years ago
Peter Wen 4ee32ce4cb [ninjalog uploader] Collect more android GN args
Chrome on Android is going to use android_static_analysis to control
how static analysis runs (values can be: on, off, or build_server). This
arg matters a great deal for build performance.

Bug: 1202732
Change-Id: I0f7437452605f59c9bd01ff75aba56274f115a5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3427859
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Takuto Ikuta 98cf932814 ninjalog_uploader: do not redirect stderr
Fixed: 1292542
Change-Id: Ia312eb7e4e3fd8d4c2b0fdaa10b7cc0290d38b93
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3428659
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
3 years ago
Takuto Ikuta 18a2844b53 ninjalog_uploader: do not use capture_output and text
capture_output and text args are not available in Python3.6.

Bug: 1290210
Change-Id: Id3c70ad456c5ca56df9935d64229f599d7aae4b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3406721
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: David Munro <davidmunro@google.com>
Commit-Queue: David Munro <davidmunro@google.com>
3 years ago
Takuto Ikuta 3dc0172a6b fix ninjalog_uploader.py
This is to fix https://crbug.com/1288639#c5

Bug: 1288639
Change-Id: Ife224fb5d5fe4faa4a78785828d4fa488fda3c6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3403475
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
3 years ago
Takuto Ikuta a657331e90 ninjalog_uploader: use goma_auth to detect googler
Bug: 1288639
Change-Id: I447e2f66603ffb8d68599dcf22023fd7857dc4fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400398
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Victor Hugo Vianna Silva 787f2f0eb5 [ninjalog uploader] Collect more performance-relevant GN args
Collect the Android args from the "Faster Edit/Deploy" section of the
build instructions [1], as well as blink_symbol_level. A TODO about
collecing enable_js_type_check is deleted, since that argument will
disappear in the near future as Chrome migrates to typescript.

[1] https://source.chromium.org/chromium/chromium/src/+/main:docs/android_build_instructions.md;l=364;drc=bbc1a1ee3eab2d5e4a5bf7c8b3b7e8d64f83e45d

R=tikuta@chromium.org

Bug: 1263441
Change-Id: I55dbc37d8543443d8767127523dfa8cb281fce6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3245375
Auto-Submit: Victor Vianna <victorvianna@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Takuto Ikuta 4bb3a7d00d ninjalog_uploader: ignore http.client.RemoteDisconnected
Bug: b/190562569
Change-Id: Iaa8d119ad643e64bdf231fe5ae43ea4daa69996f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2947272
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
4 years ago
Takuto Ikuta 84e43fa2c4 ninjalog uploader: migrate to python3
This removes dependency to httplib2 by using urllib.
https://docs.python.org/3/library/http.client.html#httpresponse-objects

Use six for both py2/py3 unittest.

Bug: b/177465438
Change-Id: I48383559842615f97abea45b55ca0acf4d7c8bd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2629087
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
4 years ago
Takuto Ikuta c603339365 autoninja: use pure python for ninjalog_uploader_wrapper.py
I'll update to python3 separately.

Bug: b/177465438
Change-Id: Id204789f2d0854a796e5408597700d90dc8cd191
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2626863
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
4 years ago
Gavin Mak e6a623392d [depot_tools] Use logging.warning
logging.warn is deprecated and should be replaced with logging.warning.

Bug:1097402
Change-Id: I55ce007bec47608eeafcf3cd9ac2b90f60073115
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2575621
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 years ago
Bruce Dawson 9e633036da Fix reference to enable_js_type_check
A TODO in ninjalog_uploader.py referred to the closure_compile gn arg
which was recently renamed (as of crrev.com/c/2248564) to
enable_js_type_check. This updates it (and adds a missing space and a
bug number). This is purely a comment fix.

Change-Id: I117fa7910663491fd7c6e017fe98e2a977a75f13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2336176
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
5 years ago
Takuto Ikuta 6c7b829e54 remove reference to jumbo build
Bug: 994387
Change-Id: I0c675bb6aca04d64593de420c7936cb88ff6a051
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2334503
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
5 years ago
Takuto Ikuta a2e91dbb61 apply yapf for ninjalog*.py
This is preparation to fix the issue.

Bug: 992282
Change-Id: I64b237670bf460ff765df3eaf069b0e0bdcfb31d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2237268
Commit-Queue: Ye Kuang <yekuang@google.com>
Reviewed-by: Ye Kuang <yekuang@google.com>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
5 years ago
Edward Lemur 59a3b2fd5d Run autoninja scripts using vpython.
Bug: 1002153
Change-Id: I769a5370d726f4ce478035f59bfd1df50fef452e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1992315
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lesmes 1961043388 Revert "Move httplib2 import above third_party."
This reverts commit cd1331ea69.

Reason for revert:
Original CL was reverted.

Original change's description:
> Move httplib2 import above third_party.
> 
> 7fd6347be3 removed the third_party/httplib2 files, but left the pyc files. This is breaking CQ for nest.
> 
> move httplib2 import above adding third_party to the path in ninjalog_uploader_wrapper to fix.
> 
> Change-Id: Id28f68ce7e3eb94783bdd5ee7ce15ae5930fde7e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1988690
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Mark Orchard <morchard@google.com>

TBR=ehmaldonado@webrtc.org,ehmaldonado@chromium.org,morchard@google.com,apolito@google.com

Change-Id: Ic7775cdb4abae1855358711335349fc39eb37dfb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1988739
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Mark Orchard cd1331ea69 Move httplib2 import above third_party.
7fd6347be3 removed the third_party/httplib2 files, but left the pyc files. This is breaking CQ for nest.

move httplib2 import above adding third_party to the path in ninjalog_uploader_wrapper to fix.

Change-Id: Id28f68ce7e3eb94783bdd5ee7ce15ae5930fde7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1988690
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Mark Orchard <morchard@google.com>
5 years ago
Quinten Yearsley 3841eaa164 Remove unused imports in depot_tools/*.py
I know that sometimes imports can have side-effects,
so unused imports shouldn't always be removed, but these
ones look like they could be.

Change-Id: Iea9f82afa99b0ea35f29a28f20ce0493b579cfee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1819860
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
6 years ago
Takuto Ikuta 5c00a22f22 [ninjalog_uploader] add path for httplib2
This is to let httplib2 import its sock.py in __init__.py correctly.
This is pointed out in
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/8BF_cywS9JY/8g-HHmuqEQAJ

Also removed an unnecessary httplib2 import.

Change-Id: Iad0377ad282acd9e1e222890f522e4e62086dcaf
Reviewed-on: https://chromium-review.googlesource.com/c/1475255
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
6 years ago
Takuto Ikuta 36248fcd63 [ninjalog] don't upload ninja log of no-op build
Check timestamp of .ninja_log before upload and don't upload if mtime is very old.

Bug: 900161
Change-Id: I0cf00ae29e23a9f609564e4c12b4b518320ca23a
Reviewed-on: https://chromium-review.googlesource.com/c/1404611
Commit-Queue: Shinya Kawanaka <shinyak@chromium.org>
Reviewed-by: Shinya Kawanaka <shinyak@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
6 years ago
Takuto Ikuta c8069af594 [ninjalog] fully anonymize build stats before sending
We cannot send PII data.

This CL tried to remove following data,
* build config that can contain build directory path
* build directory path
* hostname
* cwd

I use per build uuid instead of per user uuid.


Bug: 900161
Change-Id: Id533762749806ad8616b7dc07f21b27dfe632c9a
Reviewed-on: https://chromium-review.googlesource.com/c/1369473
Reviewed-by: Shinya Kawanaka <shinyak@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
6 years ago
Takuto Ikuta cf56a4bfb0 [ninjalog_uploader] Add BuildTargetFromCommandLine function
This function extracts build target from command line.

Bug: 900161
Change-Id: I38d37689a42437de76933ea3c9afb9def5a1253c
Reviewed-on: https://chromium-review.googlesource.com/c/1381911
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Shinya Kawanaka <shinyak@chromium.org>
6 years ago
Takuto Ikuta 61cb9d6ba7 [ninjalog_uploader] add tests
Use unittest module instead of doctest.

Bug: 900161
Change-Id: I2e8265afb66345814c4c4b8e94618171b7aaaaf3
Reviewed-on: https://chromium-review.googlesource.com/c/1379441
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Shinya Kawanaka <shinyak@chromium.org>
6 years ago
Takuto Ikuta 96fdf7cbe6 [ninja] collect build configs
This is to know what build configs are popular among chromium developer.

Bug: 900161
Change-Id: Id07722e70fc407b3f8668080d49033da6e1a7f34
Reviewed-on: https://chromium-review.googlesource.com/c/1358034
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Shinya Kawanaka <shinyak@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@chromium.org>
6 years ago
Takuto Ikuta 9af233a508 introduce ninjalog_uploader to autoninja
This CL introduces ninjalog_uploader to autoninja for posix environment.
This is to collect build statistics from googler to find user side build performance bottleneck.

ninjalog_uploader_wrapper is used to notify user and manage small config of upload script.

Bug: 900161
Change-Id: I48ac8cd1d52f64e8fdafaec43636d2d79ef9040d
Reviewed-on: https://chromium-review.googlesource.com/c/1345255
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Shinya Kawanaka <shinyak@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
6 years ago