Commit Graph

9115 Commits (38d1673525c0259abaf8d991e472040404dde70c)
 

Author SHA1 Message Date
Aravind Vasudevan 41c57603f9 Reland "Break make_encoded_file into two functions"
This is a reland of commit 5e49eda5c4

Original change's description:
> Break make_encoded_file into two functions
>
> The python3 fallback for `make_encoded_file()` produces different results on py2 and py3 when bytes are passed. This CL makes it clear breaking it into two methods, one for text and another for bytes. This CL also adds a fallback in `download_file` for py3 to return bytes when it cannot decode the downloaded file into utf-8.
>
> Recipe-Manual-Change: chromiumos
> Change-Id: I3d313e430c852e179825bc24bf4a58ce84440b2a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3595026
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Reviewed-by: Greg Edelston <gredelston@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>

Recipe-Manual-Change: chromiumos
Change-Id: I2de85eca71cc45f503c25888297ba881a5c662a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3610973
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Greg Edelston <gredelston@google.com>
3 years ago
Junji Watanabe ff14b61068 Drop ninja-linux32
linux32 is not supported now.

Bug: 931218
Change-Id: I753c8e1b0de5126e944d71cd7725e0ed8a4df5d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3609948
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
3 years ago
Takuto Ikuta 564f1eee96 Revert "autoninja: increase parallelism for non-HT cpu"
This reverts commit 06b18e4b69.

Reason for revert:
platform is not imported

Original change's description:
> autoninja: increase parallelism for non-HT cpu
>
> M1 mac seems to have capacity to build with higher parallelism.
> This also remove limit in macOS.
>
> Bug: 1317620
> Change-Id: I4460915c405cbb27ed977dcee631adb8753f2335
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3596361
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Junji Watanabe <jwata@google.com>
> Reviewed-by: Fumitoshi Ukai <ukai@google.com>
> Reviewed-by: Philipp Wollermann <philwo@google.com>
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>

Bug: 1317620
Change-Id: I325d0be8feca28e2f89a9191cfdb01de1f367d86
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3607513
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Owners-Override: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Bruce Dawson 9b9f451add Let git cl presubmit work with no network
Bug: 1309977
Change-Id: Ifca6e60c1fb2ff76f6a8dee9129d4d661ba196a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3606733
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Takuto Ikuta 06b18e4b69 autoninja: increase parallelism for non-HT cpu
M1 mac seems to have capacity to build with higher parallelism.
This also remove limit in macOS.

Bug: 1317620
Change-Id: I4460915c405cbb27ed977dcee631adb8753f2335
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3596361
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Takuto Ikuta 87172073a6 ninjalog_uploader_wrapper.py: handle broken config file
This is to make the script work even when config file is broken.

Change-Id: I6c2a090b01026b5747137bcc9fdec0bd5c03f75e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3607373
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
3 years ago
recipe-roller 2065eee6bc 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/8815794460453950289

recipe_engine:
e174a863c1
  e174a86 (martiniss@google.com)
      Add exponential_backoff to the time module.

More info is at https://goo.gl/zkKdpD. 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: Ibf9037526aba87200f64f6ee3229a8c658bdcc87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3608835
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 d04ac04db6 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/8815795716575896193

recipe_engine:
357b1cd333
  357b1cd (martiniss@google.com)
      Add timing information option to the test command

More info is at https://goo.gl/zkKdpD. 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: If433fa0a8a8fab3a20b355c8c8e8c67b3683fee3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3608833
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 7feb245cf5 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/8815872476725262353

recipe_engine:
36be9467fd
  36be946 (iannucci@chromium.org)
      [python] Deprecate api.python.__call__

More info is at https://goo.gl/zkKdpD. 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: I5832314968fba170d20fe9219e8eaf354968c070
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3606940
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 9b36c61227 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/8815879397770455089

recipe_engine:
6345fb20c9
  6345fb2 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 4f40f26f3102 to 2aa3d7e5e866

More info is at https://goo.gl/zkKdpD. 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: Ib13f2ec77c610ddbce3fa240012afcf1bb307087
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3605846
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
Ravi Mistry f7e510b2f7 Add download-topics support to bot_update
Tested by:
* `python recipes.py test run`
* Tested end-to-end by patching in this unsubmitted change in Skia's recipes with https://skia-review.googlesource.com/c/skia/+/532768

Bug: chromium:1319415
Change-Id: Ia1c9c495ef6482b3fdb494e1c1c9320541bcd0c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3602901
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Ravi Mistry <rmistry@chromium.org>
3 years ago
recipe-roller dc8ca44a3b 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/8816140493369992641

recipe_engine:
dc013a866f
  dc013a8 (iannucci@chromium.org)
      [python] Mark python.inline with a warning

More info is at https://goo.gl/zkKdpD. 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: I432e2d1c10b2a6cabeebe9873e8a09caa9548fe0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3603076
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 b0a190348a 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/8816144897986979425

recipe_engine:
efaa1e2e3e
  efaa1e2 (iannucci@chromium.org)
      [json] Stop using python.inline.

More info is at https://goo.gl/zkKdpD. 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: I3ec21b65013fc137e124da47961b976941833dd6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3603074
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
Aravind Vasudevan ada0ebd47d Revert "Break make_encoded_file into two functions"
This reverts commit 5e49eda5c4.

Reason for revert: chromiumos rollout fails

Original change's description:
> Break make_encoded_file into two functions
>
> The python3 fallback for `make_encoded_file()` produces different results on py2 and py3 when bytes are passed. This CL makes it clear breaking it into two methods, one for text and another for bytes. This CL also adds a fallback in `download_file` for py3 to return bytes when it cannot decode the downloaded file into utf-8.
>
> Recipe-Manual-Change: chromiumos
> Change-Id: I3d313e430c852e179825bc24bf4a58ce84440b2a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3595026
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Reviewed-by: Greg Edelston <gredelston@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>

Change-Id: Ibfb51614f9e19b575b99704aa4ca33c5525ab294
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3602168
Auto-Submit: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Aravind Vasudevan 5e49eda5c4 Break make_encoded_file into two functions
The python3 fallback for `make_encoded_file()` produces different results on py2 and py3 when bytes are passed. This CL makes it clear breaking it into two methods, one for text and another for bytes. This CL also adds a fallback in `download_file` for py3 to return bytes when it cannot decode the downloaded file into utf-8.

Recipe-Manual-Change: chromiumos
Change-Id: I3d313e430c852e179825bc24bf4a58ce84440b2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3595026
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Greg Edelston <gredelston@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Bruce Dawson 89ccf4a805 Don't check header guards in cpplint.py
Header guards are checked by CheckForIncludeGuards which has broader
coverage than cpplint.py and should therefore be preferred.

Having two include-guard checkers that cover different sets of files and
use different tags to silence warnings is just confusing.

Bug: 1309977
Change-Id: Ic0d1ad610cf9c34d6777d852da2e2e22b8686552
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3587725
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Bruce Dawson 00790d319f Fix \r\r\n line endings in presubmit output
When running "git cl presubmit --all" some of the presubmit messages
were ending up double-spaced if the output is sent to a file and then
loaded into notepad or Visual Studio. Visual Studio would complain
about inconsistent line endings, and it turns out that this was all
caused by some lines having \r\r\n line endings - notepad and Visual
Studio interpret that as two line endings.

The problem is that the stream that WinUnicodeOutput writes to does \n
to \r\n translation. If the text being printed already has \r\n line
endings then we get doubled-up \r characters. The fix is to replace all
\r\n sequences with \n before calling write.

This reduces the line count of the output by almost 2300 lines (more
than 25% of the total) and makes it much more readable.

Bug: 1309977
Change-Id: Ie5475087badc3d3146e4f2ba41d30c9817dd375a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3589498
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Ryan Heise 2c7ed7f59c Update Pinpoint CLI - support attempts arg
Bug:1067587
Change-Id: I3f79af6a83a8c3622a450e4526438777223a64e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3594241
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Ryan Heise <heiserya@google.com>
3 years ago
Bruce Dawson 4d8d7ff049 Add brucedawson@ as presubmit*.py OWNER
I feel like a PRESUBMIT owner now and this makes it official.

Bug: 1309977
Change-Id: I38356bc52c8d03d93c4ec42e4952b5872b31a79a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3589901
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Bruce Dawson 5f63d3c467 Increase presubmit --all speed (no diffs) by 100x
presubmit --all tells the presubmit system that all files are 'modified'
but ChangedContents still goes off to see what changes are present. If
most files were unchanged this was all handled perfectly, but if _all_
files were unchanged then _GitDiffCache would interpret the empty
dictionary of changes as a reason to ask git for diffs, millions of
times. This made some checks take more than 100x as long. The overall
effect on presubmit --all time is not known because I was never willing
to wait the multiple days for them to terminate.

That is, this would take many days to run:
  git checkout -b empty -t origin/main
  git cl presubmit --all

whereas a single-character change to any file would let this run in
about two hours.

After three weeks of working on presubmits I only hit this twice which
is why it took me so long to realize what the problem was.

Bug: 1309977
Change-Id: Ib280ea386107843b9174d835b0895316a5ed240c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3589900
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
David Dorwin 7d2693ad8d Remove scottmg from OWNERS
depot_tools version of https://crrev.com/c/3526975.

Change-Id: I9c46525322ebfa36ebde67bb5fe00249cdf51fca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3591072
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Bruce Dawson ab2e7f8f2e Improve canned checks output
When CheckLongLines finds problems it prints the first five, but this
gives no indication as to whether there are just five, or hundreds.
This change prints the number of long lines found.

The snapshot function in PanProjectChecks prints the elapsed time for
long checks, however it has two issues that make it inconvenient. One is
that it prints the time in ms which sounds great until you get a warning
that one of the checks is taking 2041373 ms (not kidding, although now
fixed) which is tricky to read. The other problem is that it was
actually measuring CPU time, not wall-clock time. This changes it to
print the time in seconds (to 0.1 seconds) and to measure elapsed
time.

Bug: 1309977
Change-Id: I7564a8cdf7bb3349b10ebbddbfe179188d4bf309
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3587726
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
recipe-roller 4b2e0bd8a4 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/8816874699072805217

recipe_engine:
22391916f2
  2239191 (gbeaty@chromium.org)
      Prevent spurious GitFetchErrors in CommitList.from_backend.

More info is at https://goo.gl/zkKdpD. 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: I1f252e93fa21eff467a07dea0a74ed20458a41ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3587404
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 01d1f603bf 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/8816875963485349249

recipe_engine:
e783f88f68
  e783f88 (chanli@chromium.org)
      [recipe-py] (2 attempt) buildbucket: set `luci.buildbucket.pare...

More info is at https://goo.gl/zkKdpD. 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: I277b6a32a528dc3d1fd8fe8237f6ada9c61c8f52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3587403
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 932a621ece 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/8816888547939077841

recipe_engine:
d63eb67ccf
  d63eb67 (chanli@chromium.org)
      Revert "[recipe-py] buildbucket: set `luci.buildbucket.parent_t...

More info is at https://goo.gl/zkKdpD. 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: If35beef29b7264610b3414c8c3af7afc77b5ba62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3587286
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
Fumitoshi Ukai 6ebf7b5b6b Roll out goma client VERSION=245
Bug: b/227978974
Change-Id: Ic339add74c112798322e0b9682c19aa2fa91e938
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3581947
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
3 years ago
recipe-roller 3c6f0eb95f 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/8816954607693384897

recipe_engine:
048f6f2fbb
  048f6f2 (chanli@chromium.org)
      [recipe-py] buildbucket: set `luci.buildbucket.parent_tracking`...

More info is at https://goo.gl/zkKdpD. 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: I8cdd9dda8c4160dfb399b59b3d41b12d216bc8be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3581205
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 07bfa0dd65 Make CheckLicense ~60x faster
After optimizing CheckForIncludeGuards the CheckLicense presubmit was
the second slowest presubmit, taking about 35 minutes when run as part
of "git cl presubmit --all". The cause of its slowness was initially
non-obvious because it runs quite quickly on most files, however
analysis showed that it could take 50+ seconds on some files. The files
that it is slow on are those that lack a good license header, meaning
that the regex match has to painstakingly scan the entire file.

The optimization in this change is to recognize that there is a simple
non-regex line that appears in all valid license headers, regardless of
variants. If that line is absent then there is, necessarily, no valid
license header, and searching for a line of text is something that
Python can do extremely quickly.

This change drops the CheckLicense time from about 35 minutes to about
32 seconds.

Trivia: _CommonChecks in third_party/blink/PRESUBMIT.py passes .* as the
license, so I added an early-out for that to avoid pointlessly scanning
those files.

Bug: 1309977
Change-Id: Ic2e56079675c2c5a2643d20dd492b1cc52e4ead2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3584882
Reviewed-by: Erik Staab <estaab@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Garrett Beaty 3b97fa826e Reland "Set a default got_revision property in the bot_update json output."
This is a reland of commit 053817260a

The change was not related to the errors that it was reverted for, so no
changes are necessary.

Original change's description:
> Set a default got_revision property in the bot_update json output.
>
> The bot_update.py script sets a got_revision property by default even if
> it is not present in the reverse revision mapping. This results in an
> uncaught exception when set_output_commit is set to True if got_revision
> isn't present in the reverse revision mapping, but it isn't caught until
> production because the test API doesn't match that behavior. This change
> updates the test API method to match the behavior of the script.
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Change-Id: Ideefa9d77d2a816ae66a2bb52737264ed3f5bcee
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575361
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Garrett Beaty <gbeaty@google.com>
> Auto-Submit: Garrett Beaty <gbeaty@google.com>

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: I80efeee8a2b951df43b00d89bb596dc2cf2fcec7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3582182
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
3 years ago
Eduardo Yap 9abe2d39b5 Update pinpoint CLI to latest version.
Bug: chromium:1314669
Change-Id: Id411b66bf3f1a8d3c23cb2827525dd1f21aa296a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3582180
Auto-Submit: Eduardo Yap <eduardoyap@google.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
3 years ago
recipe-roller e222245128 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/8817421433491348977

recipe_engine:
0f5f374af0
  0f5f374 (alexschulze@chromium.org)
      [cipd] Fix `instances` command with limit = 0

More info is at https://goo.gl/zkKdpD. 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: I091805fddb573d78b830f1e33c31e344e5225863
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3579841
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 a0382d39be Revert "Set a default got_revision property in the bot_update json output."
This reverts commit 053817260a.

Reason for revert: we reverted got_revision change, and this change
itself may be causing some other failues.

Original change's description:
> Set a default got_revision property in the bot_update json output.
>
> The bot_update.py script sets a got_revision property by default even if
> it is not present in the reverse revision mapping. This results in an
> uncaught exception when set_output_commit is set to True if got_revision
> isn't present in the reverse revision mapping, but it isn't caught until
> production because the test API doesn't match that behavior. This change
> updates the test API method to match the behavior of the script.
>
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited
> Recipe-Nontrivial-Roll: chromiumos
> Recipe-Nontrivial-Roll: infra
> Change-Id: Ideefa9d77d2a816ae66a2bb52737264ed3f5bcee
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575361
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Garrett Beaty <gbeaty@google.com>
> Auto-Submit: Garrett Beaty <gbeaty@google.com>

Change-Id: Ie975dfe39e7b8997336761e12f53f3046359d825
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3578820
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Josip Sokcevic e121d14b12 [cipd] Detect Mac ARM running under Rosetta
If a user has git for x64, `git cl` results in downloading x64 cipd
packages. Other operations, such as gclient or git-cl will result in
downloading arm64. This flip-flopping between architectures causes
unexpected behavior:
(1) slows down commands since packages are wiped and new ones are
downloaded.
(2) long running processes, such as goma may crash.

This change adds additional check for all macs running on x86 to check
if is running under Rosetta and sets ARCH=arm64 if true.

R=bryner@google.com, masonf@chromium.org

Bug: 1311733
Change-Id: I65b127467d5c47d5bf07952d2ecdcb93630c7c87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3573068
Reviewed-by: Brian Ryner <bryner@google.com>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Garrett Beaty 053817260a Set a default got_revision property in the bot_update json output.
The bot_update.py script sets a got_revision property by default even if
it is not present in the reverse revision mapping. This results in an
uncaught exception when set_output_commit is set to True if got_revision
isn't present in the reverse revision mapping, but it isn't caught until
production because the test API doesn't match that behavior. This change
updates the test API method to match the behavior of the script.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Change-Id: Ideefa9d77d2a816ae66a2bb52737264ed3f5bcee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575361
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
3 years ago
Jack Neus 5c2d472e0c Revert "bot_update: change set_output_commit to True by default"
This reverts commit ffeef9001e.

Reason for revert: Breaks ChromeOS builders, e.g. go/bbid/8817528282713702353

Original change's description:
> bot_update: change set_output_commit to True by default
>
> This is for https://crbug.com/1310066#c7
>
> Bug: 1310066

> Change-Id: I874e1a4c2ca53a7da04d6c24533429d7508088a8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3565259
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org>

Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build
Bug: 1310066
Change-Id: Id6b32f71ba8824ad3e748d0b52603ea1548096e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575359
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Owners-Override: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
3 years ago
Yannic Bonenberger 8798f68bab [autoninja] Respect user-provided AUTONINJA_BUILD_ID on Windows
Follow-up on https://crrev.com/c/3569027

Change-Id: I4b7830c83939d8a75cde7cae9001e89cf68f0d79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3575946
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Yannic Bonenberger <yannic.bonenberger@gmail.com>
3 years ago
Olivier Robin 0a6b544e20 Support git cl formatting for swift files
swift format is only available on mac hosts.
Swift formatting is disabled by default. It will be
enabled by default on mac host in another CL.

Change-Id: Id603be203edd44b6419d545027c249111abe1baf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3550197
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
3 years ago
Josip Sokcevic ba94bbeaa8 Use python3 for gsutil bootstrapping
R=gavinmak@google.com

Change-Id: I6aaac69c9712e4d639e8804ab603bc18190d88be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3570169
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
recipe-roller 52d64c5ec3 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/8817601997489655649

recipe_engine:
a6fd0d2d3c
  a6fd0d2 (chanli@chromium.org)
      [time] set the step to canceled if GLOBAL_SHUTDOWN is triggered

More info is at https://goo.gl/zkKdpD. 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: I1a2adbaa82f833cb68fd730c213070c6c41adda2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3574982
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 228634647e 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/8817656104304350081

recipe_engine:
1d661d383e
  1d661d3 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from b927ccff49e4 to b2aa2d72c22b

More info is at https://goo.gl/zkKdpD. 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: I920282b36284e0cbb2cf5c738d7919c7d4f8ae0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3574164
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
Takuto Ikuta ffeef9001e bot_update: change set_output_commit to True by default
This is for https://crbug.com/1310066#c7

Bug: 1310066
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: build
Change-Id: I874e1a4c2ca53a7da04d6c24533429d7508088a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3565259
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
3 years ago
Brian Ryner b8a4c0ba65 The python3 bin directory no longer needs to be added to PATH.
Bug: 1003139
Change-Id: Iaa288b8b4b2090ac055f53b6b0e116a7874e8bee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3570881
Reviewed-by: Chenlin Fan <fancl@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
3 years ago
recipe-roller 2ca0f52443 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/8817693841019893569

recipe_engine:
b4882c1f08
  b4882c1 (chanli@chromium.org)
      [time] make sleep a timed wait on global_shutdown

More info is at https://goo.gl/zkKdpD. 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: Ib394d2eaa1e1971bb605fa662270c46df7e01dae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3573167
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
Chloe Pelling e515e5d22e Make the "mark branch dormant" instructions simpler to copy+paste.
I regularly run into this error for local branches corresponding to
merged CLs. Before, I had to manually type `git rebase --abort`
before copy-pasting the `git config branch.[...].dormant true` line
into my terminal. With this change, I can just copy-paste once to
execute both steps, then press up+up+enter to retry.

As a side benefit, Git newcomers won't have to look up how to abort
a rebase.

Anyone preferring the previous workflow can still elect to copy
just the `git config` line.

Bug: none
Change-Id: I516d4ed12c5111936cc65460ce119a43e5f86a8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3570882
Auto-Submit: Chloe Pelling <cpelling@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
recipe-roller b785ebb82f 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/8817710211334862417

recipe_engine:
2522322621
  2522322 (gbeaty@chromium.org)
      Rewrite candidate_algorithm.

More info is at https://goo.gl/zkKdpD. 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: Ie4dd2d0489a727019f87534b88547472999a160c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3569809
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
Yannic Bonenberger 10898d51d1 [autoninja] Respect user-provided AUTONINJA_BUILD_ID
Change-Id: I2e1b14827e7ff4c1e88a211f5ae0d7a3322b6f39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3569027
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Yannic Bonenberger <yannic.bonenberger@gmail.com>
3 years ago
recipe-roller ceefb8e588 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/8817758027096105281

recipe_engine:
9e3ca47425
  9e3ca47 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from a0672c27eaaa to 5fa853f88d79

More info is at https://goo.gl/zkKdpD. 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: I78dca1cc94bf4703e2d6538e5ee10d69c8a0dadf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3571024
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 4dfba2e9e3 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/8817768722746959889

recipe_engine:
d3504b5106
  d3504b5 (mohrr@google.com)
      [path] Add __lt__ to Path

More info is at https://goo.gl/zkKdpD. 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: I050abe5bb1c648767aa8376a24f25921d4624ee6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3569593
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 c4b1b772bc Prevent path-pollution from vpython3.bat
vpython3.bat adds an entry to the path. Unfortunately that modification
persists after the batch file returns. Repeated running of vpython3.bat
will eventually grow the path so long that the command to update the
path exceeds the 8191 character cmd.exe command-length limit. This can
most easily be seen by repeatedly running this command:

    vpython3 -c "print('Hello world!')" && set path | wc

After about 35 invocations (dependent on exact system setup) this
happens:

    >vpython3 -c "print('Hello world!')" && set path | wc
    The input line is too long.
    The syntax of the command is incorrect.

This batch also (but less critically) leaks the PYTHON3_BIN_RELDIR
environment variable.

The fix is to add a setlocal command to keep environment changes local.

Bug: 1003139
Change-Id: I11a31e1013017da702299bfe8eb4888985c228f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3566378
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Fumitoshi Ukai a9c548efd6 Roll out goma client VERSION=244
Bug: b/223292635
Change-Id: I7347c16be3dd70ef0c4fcc22334b4e1b1b3f7e7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3566337
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
3 years ago