Commit Graph

9075 Commits (07d6e6985b4b6c544c0e46bf4290dc41d51a4225)
 

Author SHA1 Message Date
Joanna Wang 07d6e6985b Use shutil when moving gsutil.
Bug:b/242209562
Change-Id: Icdb145c15fe6f4fc2a61fe3342e0dd495b972b14
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3879825
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
recipe-roller e3d0dd30d3 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/8803636854183742289

recipe_engine:
85a3b044c6
  85a3b04 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 9bca2440ad93 to c93fd3c5ebdc

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: I364bb64e4d6f8050474182c6eb2c12668700d7e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3881051
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
Vadim Shtayura 360ece5d10 [cipd] Update luci-auth tool.
To pick up
https://chromium.googlesource.com/infra/luci/luci-go/+/df89453c17a

R=aknobloch@google.com

Change-Id: I18d274d6b5939c38aaa358a20496e23931ea5658
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3880626
Reviewed-by: Aaron Knobloch <aknobloch@google.com>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
3 years ago
Josip Sokcevic 95c7da10c5 Only run selected tests on py2
depot_tools codebase uses py3 and there's limited py2 usage, namely for
presubmits. This CL drops running most of py2 unit tests since there are
no longer useful.

Bug: 1357152
Change-Id: I49a3df503026bc6918362a9b5600f5714eb5c87a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3872425
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
3 years ago
Avi Drissman 863438746a Adjust copyright regex
As per the lawyers, the preferred style has no period after "Authors"
when the "all rights" sentence is dropped. Adjust the regex to not
match a period when there is no "all rights" sentence.

Bug: 1098010
Change-Id: Ib4103c09f9d02d58b9294643bbedd72fc895bbe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3876526
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Avi Drissman <avi@chromium.org>
3 years ago
recipe-roller 600fdf58c9 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/8803720526474657345

recipe_engine:
3b0a664ee4
  3b0a664 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from e9947d6af61b to f529671465f2

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: Ibf54dbcab93a5364f8b1c792943e70162add9990
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3877649
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 6efb3ed962 Reland "Use io.open for opening files"
This is a reland of commit eb16430cf9

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: I58881c040ca7333f0247875a0c4abe31cf793b08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3877645
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 years ago
Marc-Antoine Ruel 0959bb1c2a Fix git-retry on errors
On macOS, it failed with:
  Exception in thread git-retry.tee.stderr:
  Traceback (most recent call last):
    File "/path/to/cipd's/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
      self.run()
    File "$HOME/depot_tools/git_retry.py", line 36, in run
      self.out_fd.write(line)

  TypeError: write() argument must be str, not bytes
Change-Id: Ib2a77731dee10b6bb2a2ea2a7ffeaf1165e15df6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3873929
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
recipe-roller 2d4b9c8737 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/8803747582707170881

recipe_engine:
176e032023
  176e032 (zhaoyangli@chromium.org)
      Add LUCI analysis protos to recipes-py recipe_proto

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: I20879fb3a28697d74f2b68e2d8bdd10d11147f4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3877642
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
Philipp Wollermann 665eb5c25d Update Goma client
Release notes: https://g3doc.corp.google.com/devtools/goma/g3doc/client-release-notes/2022/2022-09-06-version-252.md?cl=head

Bug: b/244272972
Change-Id: Ie65af836b9b1ba9cbcd954dbd3e9c3827cf833d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3873376
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Philipp Wollermann <philwo@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
3 years ago
Thiago Perrotta a089281a82 roll_dep: support multiple -r/--reviewer arguments
Currently multiple reviewers can only be provided with a comma-separated
list, for example: -r foo,bar,baz

This CL adds support for multiple -r arguments such as:

-r foo -r bar -r baz

Or even:

-r foo,bar -r baz

This makes it consistent (and thus less confusing) with `git cl upload` which does accept multiple -r arguments.

Bug: none
Change-Id: I27d03601b488c0c5b27568d86dcb4ed66df6b76f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3863675
Commit-Queue: Thiago Perrotta <tperrotta@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Thiago Perrotta <tperrotta@chromium.org>
3 years ago
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