This will make it possible for developers to execute depot_tools
scripts using Python 3 in a known environment.
Bug: 1002153
Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
This is used to help people figure out where to file bugs against
code in the repo.
Change-Id: I0253359f703c67116785995b84ed5ff0bbcae28c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1796610
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Strings need to be passed to WriteConsoleW, otherwise an exception will be thrown:
<Unicode console <stdout>>.write: ArgumentError("argument 2: <class 'TypeError'>: wrong type")
Traceback (most recent call last):
File "C:\Google\depot_tools\metrics.py", line 267, in print_notice_and_exit
yield
File "C:\Google\depot_tools\gclient.py", line 3156, in <module>
sys.exit(main(sys.argv[1:]))
File "C:\Google\depot_tools\gclient.py", line 3142, in main
return dispatcher.execute(OptionParser(), argv)
File "C:\Google\depot_tools\subcommand.py", line 252, in execute
return command(parser, args[1:])
File "C:\Google\depot_tools\gclient.py", line 2699, in CMDsync
ret = client.RunOnDeps('update', args)
File "C:\Google\depot_tools\gclient.py", line 1771, in RunOnDeps
self.RunHooksRecursively(self._options, pm)
File "C:\Google\depot_tools\gclient.py", line 1064, in RunHooksRecursively
hook.run()
File "C:\Google\depot_tools\gclient.py", line 255, in run
gclient_utils.CheckCallAndFilter(
File "C:\Google\depot_tools\gclient_utils.py", line 592, in CheckCallAndFilter
stdout_write(in_byte)
File "C:\Google\depot_tools\gclient_utils.py", line 375, in write
return self._wrapped.write(out)
File "C:\Google\depot_tools\gclient_utils.py", line 343, in write
self._wrapped.write(out, *args, **kwargs)
File "C:\Google\depot_tools\fix_encoding.py", line 224, in write
retval = self._WriteConsoleW(
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type
Bug: 984182
Change-Id: Icffe0e0ea1fe2be5bc7607e32f58605d02f1f870
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1778746
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
auth_config is a Rietveld thing, so it's not necessary
in most of the code, except for triggering try bots.
Bug: 1001756
Change-Id: I0f243a297b05a43a61b052ba75c5886556e81b4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1793018
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This updates the comments and code regarding GOMA_DISABLED to more
precisely match its behavior and therefore avoid confusion.
Bug: b/140312943
Change-Id: I6208de282bd5ebf1d88f98c1f905cfc626de792e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1786676
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Header was printed using sys.stdout, but the rest of the output was
printed using sys.stdout.buffer, causing the output to be written
before the header.
Bug: 984182
Change-Id: If6aaa05a579c3b0c73ce8ffe48f3a4e777fa16fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1790254
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
While fetching monorail issues, @chromium.org is appended to the --user
option even if the original --user option is already a email address
(e.g. user@google.com).
Change-Id: I2442f4ea977b2681a72271f7c20fabb1ceaa351c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1790222
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Peter Lee <pkl@chromium.org>
The NINJA_SUMMARIZE_BUILD already triggers two types of build
performance data - setting NINJA_STATUS to give more details during the
build and running post_build_ninja_summary.py after the build.
One of the most common causes of slow builds is when CreateProcess
becomes slow, usually due to anti-virus overhead. Neither of these
reports make this problem easily visible, but ninja -d stats does. In
particular the StartEdge data is an excellent summary of CreateProcess
timing. If the StartEdge average (avg) is more than about 6,000 us
(6.0 ms) it might be worth investigating why.
Therefore this change makes it so that autoninja.py adds -d stats to the
command line when NINJA_SUMMARIZE_BUILD is set to 1.
Change-Id: I1b6b990708c784a2cd71d153713b422f090775e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1788399
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
423aa5860 [led] Set logdog prefix as led_run_id property
40c1ac5b5 [led] Set recipe input property for recipes source
d9cf01212 [led] When consolidating isolateds, skip empty isolate hashes.
838b3cb14 [led] Pull isolate consolidation out of GetSwarmingTask.
7a6c68c7a [led] Make edit-isolated orthogonal to edit-recipe-bundle.
8e8edcb4f Have led launch set OutputResultJSONPath kitchen argument
93e7d934e [led] Add the ability for led edit-isolated to take a transform program.
f5808de3a Fix many shadowed symbols
371e55885 Fix many misspellings
1cc5f65cf [led edit-isolated] Fix bug when inputsref is missing.
R=tandrii@chromium.org
Change-Id: I8bef431fe57f7331a8f5fc85e898916ee93fa9f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1788412
Commit-Queue: Andrii Shyshkalov <tandrii@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
This version can load external proto descriptors. No other significant changes.
TBR=tandrii@chromium.org, iannucci@chromium.org
BUG=986972
Change-Id: I26317512ffcee0a50e051032d30ec79bbd805644
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1778707
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Auto-Submit: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
This method allows retrieving the owners listed in a file, as well as those
transitively listed in files included by it. This change also adds a new test to
cover this method, which is just a wrapper for the existing
_read_just_the_owners() internal method.
Bug: None
Change-Id: Iee956f115d3846acf0ee0806451807b0aa96d2f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1773904
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Pylint-1.7+ include a score report by default at the end of every
module lint. We disable reports in general, so silence this too.
Bug: 866772
Change-Id: Ie3df44c80b90daa59e46c8fd37a949176c9b09a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1770420
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Has different protobuf guts. The only observable side effect is different
formatting of generated files. But 'lucicfg validate' now compares files
semantically, so different formatting shouldn't matter.
There's a bunch of other internal changes, but clients that rely on them are
already aware and updated.
R=iannucci@chromium.org
BUG=986972
Change-Id: Ifd13c453736e438f28c2cf938003dce00f2cb199
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1769607
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
The parsing logic for OWNERS files included via "file:" lines currently
rejects inline comments (e.g. "foo@example.com # for foo.cc"), while
the normal OWNERS parsing logic correctly ignores such inline comments.
This CL makes the inline case ignore inline comments too.
Bug: 995474
Change-Id: I6f30554daf0a5f63b81719dced44f59187707eaa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1769603
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Don't overwrite passed kwargs. Make a copy instead.
Otherwise, subsequent calls with the same kwargs will have
stdin set to subprocess.PIPE.
Bug: 984182
Change-Id: I358ffa1951e8b42486e0ac3a0d3d587a93c6dc4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1769405
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Add run_on_python2 and run_on_python3 to allow to be tests on
either only python2, only python3 or both.
Bug: 984182
Change-Id: I87d3b67412129cf3a8e627cd6bc97daa81147657
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1758849
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: smut <smut@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
On the wasm team we build several CMake-based projects with ninja
(LLVM, binaryen, etc), and its useful for us (me at least) to be able
to use autoninja with these project too.
Change-Id: I7e213448dbbe95ffe3d249c9c6a3d4baa41f50d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1682742
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Sam Clegg <sbc@chromium.org>
Changes like crrev.com/c/1752507, where a file that was previously in
.gitignore becomes part of the repo, makes update_depot_tools fail
to rebase.
Use git checkout origin/master instead.
Bug: 996359
Change-Id: Ib1a43b8842cebce96ab1fabaedc8e5653b9a708e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1764708
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
A new-line token is being added on Python 3, so add it explicitly
so that it also appears on Python 2.
Bug: 984182
Change-Id: I3bfb6ca83d94b6a3452b938f35f5a3174fe85903
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1764465
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>