Commit Graph

9064 Commits (a3a95d439bafcdb4c46da65d9be8e8fd5358c41a)
 

Author SHA1 Message Date
Gavin Mak a3a95d439b Revert "Use io.open for opening files"
This reverts commit eb16430cf9.

Reason for revert: blocking upload of CLs, https://crbug.com/1357152#c8

Original change's description:
> Use io.open for opening files
>
> Use io.open which is consistent in py2 and py3.
>
> Bug: 1357152
> Change-Id: I49a3df503026bc6918362a9b5600f57111111111
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3872429
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Bug: 1357152
Change-Id: Iec18fe8fd37f28887507d47d7b35b93ccee72375
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3872487
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Gavin Mak <gavinmak@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Josip Sokcevic eb16430cf9 Use io.open for opening files
Use io.open which is consistent in py2 and py3.

Bug: 1357152
Change-Id: I49a3df503026bc6918362a9b5600f57111111111
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3872429
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic 38d669fe6f Reduce retries in gclient_utils
There are other retries (e.g. in git wrapper, gclient_scm) so we
shouldn't be retrying that much in gclient_utils.

In ideal case, we have a dedicated place where retries are determined,
and we make a retry decision based on stderr / exit code.

R=jojwang@google.com

Bug: 1359109
Change-Id: I97daa0d991a7294635e54b7a3d85a349c03c04c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3871979
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
3 years ago
recipe-roller 8cdc635be8 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8804176031314957329

recipe_engine:
d6c8a7cd71
  d6c8a7c (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from git_revision:f9c708a28b4630d62f33f325d71a2...

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I8e3be60d3057f2d9f8df79cfdd4c499cbc457a17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3869616
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 years ago
Joanna Wang b415544db4 Add cog/ cwd for fetch.
Bug: 1354709, b/242209562

Change-Id: I48b5575c7a4b8855a8b1f95ced24acadaea39a59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3865737
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
recipe-roller bcb046f583 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8804247752404062257

recipe_engine:
4e6762a8d3
  4e6762a (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 28997a29e35b to f9c708a28b46

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: If2d9b08b17c9c43fcc9740c829803d8d3413110b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3868609
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 years ago
Josip Sokcevic 5084800dc3 Fix flaky testPreDepsHooks test
Our Windows CI machine may take longer than 10s to process hooks
resulting in an extra block of information being printed. This change
updates the affected test to handle both fast and slow cases.

R=gavinmak@google.com

Fixed: 1352364
Change-Id: I62edbe49c0efc16cfed2bc218220840120c81c0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3867544
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
3 years ago
Josip Sokcevic 228fedfaad Update diff_deps receipe to py3
This is a reland on 988c0af5be

R=aravindvasudev@google.com

Bug: 1357152
Recipe-Nontrivial-Roll: build
Change-Id: I93f8056908b50a7f41df488cfae200408d91e11b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3858159
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Thiago Perrotta b0fb8d570d Introduce --send-email flag as an alias to --send-mail for `git cl upload`
Vanilla git has a git-send-email(1) subcommand. `git cl upload` should
follow suit by using the same flag name to be consistent and avoid
confusion.

[1]: https://git-scm.com/docs/git-send-email

Bug: none
Change-Id: I47ff8e03bd11915e99804fe1695046d874efc4e0
Tested: `git cl upload --send-email` to upload this very own CL
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3854330
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Thiago Perrotta <tperrotta@chromium.org>
3 years ago
Josip Sokcevic 8d2f774038 Use py3 in documentation generation
This change also updates version of git documentation to match one used in
depot_tools, asciidoc, and ansi2html. It also fixes reset signal.

R=gavinmak@google.com

Bug: 1357152
Change-Id: I998e7434dde8d82b491376b47a5993c6d91d64a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3856830
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Junji Watanabe 3528d4d3c5 Update goma client
Release note: https://g3doc.corp.google.com/devtools/goma/g3doc/client-release-notes/2022/2022-08-30-version-251.md?cl=head

Bug: b/238955348
Change-Id: I2a13a6982867919e60258c5dd4595a0abd63c436
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3864539
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Garrett Beaty f41670fdad Add a presubmit check to enforce that code is formatted.
Change-Id: I75be1231fd695459abfdc88af3ccc0ec5cdfde1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3862407
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
Joanna Wang bbb66d7980 Add cog/ cwd.
Bug: 1354709, b/242209562
Change-Id: I4a53efa0e633979f5a38a5618553e0b8fc243cca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3863963
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
recipe-roller b7ec673ccc Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8804766169701242529

recipe_engine:
a6f21e9dfe
  a6f21e9 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from b85c4e34cc95 to 3226112a79a7

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ifd987c01d823061f9313b1e3c9b050367f250681
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3858138
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 years ago
recipe-roller 95f870fb5d Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8804790076741010753

recipe_engine:
d9f13ea569
  d9f13ea (tikuta@chromium.org)
      internal: show more information in exception steps

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I8a8377edf09ae0749e7e29fe6799e272146a2f24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3858132
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 years ago
Mike Frysinger 19b3eb5adb repo: update to 2.29 launcher
Change-Id: I22ea0516ce3e37d70802d4ba41fe586611360de6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3849004
Reviewed-by: Sergey Frolov <sfrolov@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
3 years ago
Mike Frysinger de38174544 CROS_OWNERS: switch to our common shared lists
Change-Id: I7c05247729f4b569c9d6a95813d8849972c9b985
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3849003
Reviewed-by: Cindy Lin <xcl@google.com>
Commit-Queue: Cindy Lin <xcl@google.com>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
3 years ago
Takuto Ikuta baa7be052e presubmit_support: remove backslash from log
This removes backslash from log like
```
Python 2 scripts were run during Python 2 presubmits. Please see https://bugs.chromium.org/p/chromium/issues/detail?id=1313804#c61 for tips on resolving this.
  scripts/common/env.py print from /usr/local/google/home/tikuta/chrome_infra/build \
  /usr/local/google/home/tikuta/chrome_infra/build/recipes/unittests/recipe_test.py from /usr/local/google/home/tikuta/chrome_infra/build \
  -u /usr/local/google/home/tikuta/chrome_infra/build/recipes/.recipe_deps/recipe_engine/recipe_engine/main.py --package /usr/local/google/home/tikuta/chrome_infra/build/infra/config/recipes.cfg test run from /usr/local/google/home/tikuta/chrome_infra/build \
  -u /usr/local/google/home/tikuta/chrome_infra/build/recipes/.recipe_deps/recipe_engine/recipe_engine/main.py --package /usr/local/google/home/tikuta/chrome_infra/build/infra/config/recipes.cfg --proto-override /usr/local/google/home/tikuta/chrome_infra/build/recipes/.recipe_deps/_pb --log-level ERROR -O depot_too
ls=/usr/local/google/home/tikuta/chrome_infra/build/recipes/.recipe_deps/depot_tools -O chromiumos_proto=/usr/local/google/home/tikuta/chrome_infra/build/recipes/.recipe_deps/chromiumos_proto -O infra=/usr/local/google/home/tikuta/chrome_infra/build/recipes/.recipe_deps/infra -O recipe_engine=/usr/local/google/home
/tikuta/chrome_infra/build/recipes/.recipe_deps/recipe_engine -O chromeos=/usr/local/google/home/tikuta/chrome_infra/build/recipes/.recipe_deps/chromeos -O chromiumos_config=/usr/local/google/home/tikuta/chrome_infra/build/recipes/.recipe_deps/chromiumos_config test _runner --cov-file /tmp/tmpqNhYvj.recipe_test_cov
erage/thread-0.coverage --cover-module-imports from /usr/local/google/home/tikuta/chrome_infra/build \
```

I think this backslash is bit confusing there.

Change-Id: If5911e27808cfcde029d5ea2b34dda06847085ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3827922
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Takuto Ikuta 92c463cd65 autoninja.bat: have space suffix in ninja status
This improves output from ninja a bit on Windows when
NINJA_SUMMARIZE_BUILD is set.

The trailing space was removed in https://crrev.com/c/3400399.

Change-Id: Ifb14129a436a2673969f529d0c9143118dd87d6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3833272
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Josip Sokcevic e19b7624ef Keep old git alternatives when changing mirrors
It's possible to change DEPS git repository while keeping the same
source. This is useful feature, for example if upstream repository moves
from github to gitlab. The repositories can be out of sync, or even
diverge.

We use git alternatives to save disk space. If a builder flip-flops
between mirror repositories (e.g. case with different release branches),
it's possible that new mirror doesn't contain all necessary objects that
are present in the old repositories. That will result in invalid git
pointer entries and fetch operations will fail.

Instead of replacing git alternatives, we append new git alternatives to
avoid such problem.

R=bpastene@google.com, jojwang@google.com

Bug: b/241802975
Change-Id: I3ef025603af58a84692a68bf3b780c47b6d3ae46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3843133
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Samuel Attard 44b73307ee ensure depot_tools and cipd can bootstrap on all windows paths
On windows paths with spaces some cipd and depot_tools bootstrap commands were failing due to misquoting or syntax that didn't support such paths.  This ensures that a clean bootstrap on a path such as "C:/Foo Bar/depot_tools" works as expected.

Change-Id: Ib516d16ed7809635369399f3df0eff2269ff6e2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3834965
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Michael Savigny 1cf1fb5d21 Add reclient error messaging for developer builds.
At the moment reclient isn't supported for developer builds.  Add
messaging to autoninja to indicate this if a developer attempts a build
with use_remoteexec set.

Bug:b/199192766
Change-Id: I9e016a09c98b756018505f661afdb6eaf3db3243
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3839070
Commit-Queue: Michael Savigny <msavigny@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
Takuto Ikuta d14f65eba9 add reclient for ChromeOS
This will be used in ChromeOS build_packages.

Bug: b/242680623, b/203606263
Change-Id: I3eedec7b245405c24091db43a450181a270d1305
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3833266
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Josip Sokcevic 940cd8e20f Use empty argument list in cmdhelp
If a wrong command name is used (e.g. typo), cmdhelp is triggered.
However, if user specifies any additional arguments (other than -h),
then user is presented with not so useful message.

This CL calls cmdhelp with no arguments.

Fixed: 1352093
Change-Id: I30c0b5f580f18b4fa2cb59d3195b67bb083f3442
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3828794
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Zhaoyang Li f9fede5f84 [mac_toolchain] Roll mac_toolchain in depot_tools to latest version
The roll in depot_tools enables uploading Xcode in legacy format and
not excluding some folders at upload.

Bug: 1348212
Change-Id: I2a6b635a6c236bf2eedbbf7855da3c0d58b4abaa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3834034
Reviewed-by: Chan Li <chanli@chromium.org>
Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org>
3 years ago
Yuanjun Huang 268d645853 [depot_tools] roll bb
To release https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/3825181

Bug:1347622
Change-Id: Ib5daf9fa35b764b6a3b37e36c7daa8fd94625817
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3825397
Reviewed-by: Chan Li <chanli@chromium.org>
Commit-Queue: Yuanjun Huang <yuanjunh@google.com>
3 years ago
Bruce Dawson 8d78bd1fc1 Print which PRESUBMIT.py scripts run on Python 2
When running presubmits you can tell if Python 2 presubmits are running,
but it's subtle, and it isn't obvious which presubmits are running under
Python 2.

This makes it obvious by always printing the path to PRESUBMIT.py
scripts that are run under Python 2. This change also fixes a bug in the
--verbose logic - it would print that a script was running before
evaluating _ShouldRunPresubmit.

Bug: 1352347
Change-Id: I45213acdb3b37f7be0713e5caba775841704817c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3826917
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Bruce Dawson a358defc3f Revert "Update autoninja.bat to work with other shells."
This reverts commit ba352e00ba.

Reason for revert: Unfortunately this breaks this command when run
from a normal cmd.exe prompt:
  autoninja ..\..\base\win\access_token.cc^^
The escaping of ^^ as it passes through batch files is very finicky, but important.

Original change's description:
> Update autoninja.bat to work with other shells.
>
> Other shells, such as TCC, have subtle differences in how batch files are processed. This will not break cmd.exe compatibility.
>
> Without the "call" command, running a nested batch file should, according to CMD.exe "rules", cancel the current batch file and run the new one. However, the 'FOR /f "usebackq"' command will call the batch file and return. One could argue for both approaches, however, adding the "call" command doesn't seem to affect cmd.exe and fixes the other shell.
>
> There is a similar issue with the "do" (in the FOR command) block and the use of the '&' separator. The '%a' variable isn't expanded, but adding the '()' block works in both instances.
>
> Bug: 1351817
> Change-Id: Idd685a64404ea950b71e1f3cc0f5d1e3bf13b8b6
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3824199
> Commit-Queue: Allen Bauer <kylixrd@chromium.org>
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>

Bug: 1351817
Change-Id: I9d204a3369c468664c0cff247ed1a53065dfebfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3829729
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Chan Li 73cc22d4e6 [depot_tools] roll dirmd
To release https://chromium-review.googlesource.com/c/infra/infra/+/3827304

Bug: 1349169
Change-Id: If1ac56926bf97c1ce3b373d67e077d120d78fbbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3828041
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Chan Li <chanli@chromium.org>
3 years ago
Gavin Mak e0fee9fa4b Add BatchListBestOwners and ListBestOwners to GerritClient
ListOwners returns all OWNERS for a file, which is undesirable in cases
when only direct OWNERS are needed.

Bug: 1351212, 1351519
Change-Id: I693b6645c780aa589e8ab24d0b58691f4aeb30f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3823299
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
Vadim Shtayura f53bb836de [cipd] Update CIPD client v2.6.7 => v2.6.8.
This adds new optional fields to -json-output:
{
  ...
  "error_code": see cipderr.go for possible values.
  "error_details": {
      "package": "package/path/or/prefix",
      "version": "instance version",
      "subdir": "installation subdir"
  }
}

R=iannucci@chromium.org, ddoman@chromium.org
BUG=1348065

Change-Id: I2a2bf01c180330f83fcf6813150ea1d4faef79c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3824200
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
3 years ago
Allen Bauer ba352e00ba Update autoninja.bat to work with other shells.
Other shells, such as TCC, have subtle differences in how batch files are processed. This will not break cmd.exe compatibility.

Without the "call" command, running a nested batch file should, according to CMD.exe "rules", cancel the current batch file and run the new one. However, the 'FOR /f "usebackq"' command will call the batch file and return. One could argue for both approaches, however, adding the "call" command doesn't seem to affect cmd.exe and fixes the other shell.

There is a similar issue with the "do" (in the FOR command) block and the use of the '&' separator. The '%a' variable isn't expanded, but adding the '()' block works in both instances.

Bug: 1351817
Change-Id: Idd685a64404ea950b71e1f3cc0f5d1e3bf13b8b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3824199
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Bruce Dawson 0af709772e Don't do double-serial Pylint checks
Pylint uses parallelism to improve performance, but high startup costs
means that this only makes sense if there are lots of files to be
processed. So, a while ago a change was made such that if there are
fewer than ten files to be analyzed then no parallelism is used.

Our Pylint wrapper also has a hack where it does one type of check in
serial mode, because that is the only time it is reliable. This
requires running Pylint twice, which is expensive.

If there are a small enough number of files to analyze then we will be
doing serial analysis anyway, so there is no need to do two separate
runs. In this test case:

  git cl presubmit -v --files tools\code_coverage\create_js_source_maps\test\create_js_source_maps_test.py

the cost of Pylint is dropped roughly in half, from six seconds to
three seconds, by eliminating one of the three-second runs.

Bug: 1309977
Change-Id: I2e5e96a86d1d76b127f481af7478d807c042b609
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3812436
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Thiago Perrotta 164e33529e Add a fetch config for GN.
Bug: None
Tested: `fetch gn`
Change-Id: Icaa673d3932c220da111166af91d3d30b4b721af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3818401
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Thiago Perrotta <tperrotta@chromium.org>
Commit-Queue: Thiago Perrotta <tperrotta@chromium.org>
3 years ago
Robert Liao 8121d634fb Make "All rights reserved" Optional in the License
This update is per http://crrev.com/1031130 where OSS licensing
requested removal of "All rights reserved" from new files.

Change-Id: I52a9deab99539ea90403798606c7bbeb261df994
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3811744
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Robert Liao <robliao@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
3 years ago
recipe-roller 5da65ec20d Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8806288072918160561

recipe_engine:
18a8990ccd
  18a8990 (gredelston@google.com)
      Recipes user guide: document `./recipes.py debug`

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I27dc8aa30530540e468c4c12a6d9a07af552349a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3821401
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 years ago
Gavin Mak a9677a5e9b Revert "Remove old DepotToolsOwners implementation"
This reverts commit 10dbd7babd.

Reason for revert: removal broke builders

Original change's description:
> Remove old DepotToolsOwners implementation
>
> code-owners should have been enabled for most hosts that depot_tools
> supports by now. Remove our own implementation and rely on code-owners.
>
> Change-Id: Iaf0d3db65b2e5063b67d42b92188c4ec51d2cd9a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3783475
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Change-Id: I781648f470e8f2c9d408ae7112cfc41060f5385d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3818251
Auto-Submit: Gavin Mak <gavinmak@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Gavin Mak 10dbd7babd Remove old DepotToolsOwners implementation
code-owners should have been enabled for most hosts that depot_tools
supports by now. Remove our own implementation and rely on code-owners.

Change-Id: Iaf0d3db65b2e5063b67d42b92188c4ec51d2cd9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3783475
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
recipe-roller 169a83527f Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8806434034565787329

recipe_engine:
6bc92831b8
  6bc9283 (justinluong@google.com)
      [luci-recipes] Add CLIENT_ERROR task state to Swarming module

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I1cdcbf0bb1733754c01a134b33f6d42d71f454a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3815380
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 years ago
recipe-roller 1b72044e33 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.

The build that created this CL was
https://ci.chromium.org/b/8806603273859599617

recipe_engine:
d70dec9441
  d70dec9 (akashmukherjee@google.com)
      [snoopy] Uprev provenance broker tool.

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I8ac25711d86e9ae0b86de45960df276e7bbcd231
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3814637
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 years ago
Bruce Dawson eb8426e2ac Improve presubmit no-network handling
Recent gerrit issues made it obvious that "git cl presubmit" relies on
gerrit much more than most people would expect (the expectation is zero
for many people). This makes presubmits flaky or much slower under poor
network conditions, and it means that the presubmit step may drastically
underestimate how long it takes to run because of a
cl.FetchDescription() that may occur outside of the timed portion of the
presubmits.

This change wraps more network-touching steps in try/except blocks, to
make them robust. It also gets them to check for the existence of a
PRESUBMIT_SKIP_NETWORK environment variable. And, it prints the elapsed
time to get the CL description if this is inordinately long.

Bug: 1350227
Change-Id: I7954fd50e928fd24975a4f61a316cb280542ebbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3813095
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Chan Li 079e79600c [led] roll led
To release change https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/3814095

Change-Id: I3bd89d41517012d99db9b523eae1c63b5149cf60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3812233
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Chan Li <chanli@chromium.org>
3 years ago
Chan Li e29fdd4c39 [depot_tools] roll led
To release https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/3812292

Bug: 1350060
Change-Id: I45f5a9329e5fd70d8ad3abaf4e32b0ed029444d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3812224
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Chan Li <chanli@chromium.org>
3 years ago
Joanna Wang 47fd56744c Add debug logs during Clone process.
The try/except was added for one specific situation but the 'except' portion accepts a wide range of errors. This results in confusing logs and nothing clearly states what actually caused the error.

Bug: 1349905, 1350210
Change-Id: Ia86c71b0b77658992fca5d3de215e659ccd90d96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3810798
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 years ago
Junji Watanabe 437ec683ab Revert "Update led to the current version."
This reverts commit a2267932e6.

Reason for revert: this version has an issue with led edit-recipe-bundle https://crbug.com/1350060

Original change's description:
> Update led to the current version.
>
> This will pull in the change that allows for "led edit-cr-crl" to accept
> URLs in the form output by "git cl issue": URLs that do not contain the
> gerrit project.
>
> Bug: 1348269
> Change-Id: Icb360686c9ca1548636e755bc9a611351d78d2f7
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3807651
> Commit-Queue: Garrett Beaty <gbeaty@google.com>
> Reviewed-by: Chan Li <chanli@chromium.org>

Bug: 1348269
Change-Id: Idad964cf47b0cbc7174201add38ab8799c1ae9b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3812817
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
3 years ago
Junji Watanabe 5f6861db09 Revert "[depot_tools] roll led"
This reverts commit 466ab5c2d9.

Reason for revert: This seems still broken. https://crbug.com/1350060#c17

Original change's description:
> [depot_tools] roll led
>
> To include change https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/3811860
>
> Bug: 1350060
> Change-Id: I35081e93fd966a6b3da02f7fa4fbb6f458be83eb
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3812434
> Commit-Queue: Chan Li <chanli@chromium.org>
> Reviewed-by: Yuanjun Huang <yuanjunh@google.com>

Bug: 1350060
Change-Id: I99375da748612706a74e195067cf4f8a3748338e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3812814
Commit-Queue: Junji Watanabe <jwata@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Brian Ryner 811ea056ed vpython(3) no longer needs to bootstrap python.
The bundled python interpreter is used instead.

Bug: 1318617
Change-Id: I86c359ad765ecf494a11d199f2e01a711c86d4c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3807202
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
3 years ago
Chan Li 466ab5c2d9 [depot_tools] roll led
To include change https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/3811860

Bug: 1350060
Change-Id: I35081e93fd966a6b3da02f7fa4fbb6f458be83eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3812434
Commit-Queue: Chan Li <chanli@chromium.org>
Reviewed-by: Yuanjun Huang <yuanjunh@google.com>
3 years ago
Yuki Shiino a042264949 Allow 'noparent' in DEPS
In case of PartitionAlloc project in Chromium, there is a case that
it's useful to declare 'noparent' in the DEPS due to the situation
that a sub directory is exported to a standalone git project.

//base/allocator/partition_allocator/ (sub directory) is exported to
https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git

Change-Id: Ic51b6cd3928002962f25620b4d8797bed7802d1e
Bug: chromium:1151236
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3802719
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
3 years ago
Garrett Beaty a2267932e6 Update led to the current version.
This will pull in the change that allows for "led edit-cr-crl" to accept
URLs in the form output by "git cl issue": URLs that do not contain the
gerrit project.

Bug: 1348269
Change-Id: Icb360686c9ca1548636e755bc9a611351d78d2f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3807651
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Chan Li <chanli@chromium.org>
3 years ago