Commit Graph

10685 Commits (8ac3425344e1e0713daafde92fdf15b7ad5ee390)
 

Author SHA1 Message Date
recipe-roller 927e02b156 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/8745503171172475121

recipe_engine:
ea27cb4d3b
  ea27cb4 (olivernewman@google.com)
      [test] Surface summary_markdown in case of status mismatch

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: I9a8df99a2fafbcca23a6483e32cd5613fbeb6406
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5615930
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>
12 months ago
Yiwei Zhang 954a8d7713 error if roll-dep command is called in Cog environment
Bug: 345486495
Change-Id: Ib48a1e8cbe51eccdd0a56e3105ce2f7b8d0c3dd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608832
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
12 months ago
Yiwei Zhang 4a8524d1e9 error if repo command is called in Cog environment
Bug: 345486495
Change-Id: I0a03d210b5662828f65dc45bd0121c33bd6480f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608833
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
12 months ago
Joanna Wang 705b8d2d85 Fix google-java-format/cipd exists check.
Bug: b/345761161
Change-Id: I3e3e7d84d962530b02a345d14ad8c15f57a49838
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5606286
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
12 months ago
Yiwei Zhang dd8b5ea401 fail gracefully if gclient-new-workdir.py is called in non-git env
Bug: 345486495
Change-Id: Ide3f8e6a649694a5e1f730ee0e159f928e287c4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608427
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
12 months ago
Yiwei Zhang aa89e07e15 fail if fetch command is called in Cog
Bug: 345486495
Change-Id: I858a4041b54049cc52cf1a15f0aed461f3ddf985
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5606279
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
12 months ago
Joanna Wang b7b7718b47 Support new third_party/google-java-format/cipd/ path.
Bug: 345761161
Change-Id: I23d0c4eceb76706eb286fe87baaf6f93f93747eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608492
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
12 months ago
recipe-roller 56ce75edd1 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/8745779995658400241

recipe_engine:
f698b0fe97
  f698b0f (mohrr@google.com)
      [properties] Remove deprecated legacy() method

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: I244dbc46d76f22b3e755584e21c3b542b4b9f8d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5608081
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>
12 months ago
Fumitoshi Ukai e6d8f67fae autoninja: set PYTHONDONTWRITEBYTECODE=1 if not set
during build, lots of python scripts run and generates
lots of pycache *pyc in workspace.
To keep workspace clean, set PYTHONDONTWRITEBYTECODE=1
in autoninja.py

Change-Id: I5ce4c904aa11dd8172672ff9a8e9a06ebf69c9fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5599922
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gary Tong <gatong@chromium.org>
Reviewed-by: Gregory Guterman <guterman@google.com>
1 year ago
Fumitoshi Ukai 951578030e siso: set PYTHONDONTWRITEBYTECODE=1 if not set
during build, lots of python scripts run and generates
lots of pycache *.pyc in workspace.
To keep workspace clean, set PYTHONDONTWRITEBYTECODE=1
in siso.py

Change-Id: I725c6745c44410eef4a780b8ffc30fdafd899334
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5606824
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
1 year ago
recipe-roller 089b4f38ae 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/8745851087830519569

recipe_engine:
de58e85243
  de58e85 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 56b720dea312 to 6fb4d5d26773

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: I0822c72f13dd2ed9ba12482b0270611400261cad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5605691
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>
1 year ago
Josip Sokcevic 25b23eb1fd Remove profile.xml.
This file is no longer used by Visual Studio.

Change-Id: I4344ac8ac351eab847555a836c9e363690f137be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5553923
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Yiwei Zhang a4f8f3559a stop vending crosjobs from depot_tools
The command was deprecated in https://crrev.com/i/7202749

Bug: 345486495
Change-Id: I28e1dd286ec4f2dee58144e224783fc586405698
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5605682
Reviewed-by: George Engelbrecht <engeg@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Joanna Wang 1545a081d8 Only sync non_git_sources for IsEnvCog().
Bug: 345321320
Change-Id: I8aca8dca298dd147fa6b88b43632a51852669ea5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5598577
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Robert Iannucci ad3ad021d9 [gerrit_util] Invert Authenticator model.
Instead of having CreateHttpConn manipulate the request, with the
Authenticator only able to provide the Authorization header value,
the Authenticator now gets the ability to manipulate the entire
HttpConn object.

This will be used for a new Authenticator method which needs to
include a proxy, cookies, and also manipulate the target request
URI, in addition to providing an Authorization header value.

R=ayatane@chromium.org, yiwzhang@google.com

Bug: 336351842
Change-Id: Ia7d0bbfbb907d8ab6c6d12d000f514fa7afc7245
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5585665
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Allen Li <ayatane@chromium.org>
1 year ago
recipe-roller c069eff3f4 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/8746003970993941121

recipe_engine:
c5e2f2ce07
  c5e2f2c (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 93a586d53955 to 0e7802b85394

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: I7d42daab18e1b2f65b491393e1c9743c1a74372b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5599919
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>
1 year ago
recipe-roller ada9211999 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/8746024731971644961

recipe_engine:
d307486ec0~..14d21dc9acafdff1a69bc240a0f993801e1d8c57
  d307486 (mohrr@google.com)
      [recipe.warnings] Move back api.json.read() deadline
  14d21dc (mohrr@google.com)
      OWNERS: Let anyone approve expectation-only changes

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: I9b3c789c48764feb93b62a41e975cf2e76470eb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5598400
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>
1 year ago
recipe-roller 2a18f6d324 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/8746133573528535521

recipe_engine:
d35238406e
  d352384 (mohrr@google.com)
      [buildbucket] Remove deprecated APIs

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: I7356b568bfaa1ad46ce23f2dc09ba8c81f208f29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5593951
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>
1 year ago
Robert Iannucci 840e538154 [gerrit_util] Add stronger type annotations around CreateHttpConn.
This also fixes a potential bug where ReadHttpJsonResponse could
improperly return None if the server had a completely empty reply.
ReadHttpJsonResponse will now return an empty dictionary in this
case (which is the assumption that most of the callsites are
making).

R=yiwzhang@google.com

Bug: 336351842
Change-Id: I0aa88e233563a0685b6c0f32ea77ad3e094b9cbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5585184
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
1 year ago
Gregory NISBET 3963cc6399 [gerrit_util.py] Remove unnecessary imports from gerrit_util.py
Remove the libraries that have no uses according to gd in vim.

BUG=None
TEST=upload this CL

Change-Id: I7fe6bbd54c1a4f00a3d0e3f04be0f02609734e46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5578897
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gregory Nisbet <gregorynisbet@google.com>
1 year ago
Josip Sokcevic 9428cf648b [clang_format] Update clang path
Bug: 336843583
Change-Id: I1ace05b40420894797e68f6beaaea2360a297ba6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5586436
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Robert Iannucci 6427b94bc2 [git_cl] Refactor EnsureAuthenticated.
This will allow us to invert the main Authenticator API.

R=yiwzhang@google.com

Bug: 336351842
Change-Id: Iebe06f68373b99685809849bcd96371e7634d6ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5582406
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
1 year ago
Scott Lee 8ff5d0caee [depot_tools] auto correct url always
[1] was originally added by an [ancient CL] in 2013.
It runs `git config ...` and checks if if the output is not "False".

It has two problems.
1) `git config` returns False only if the value was set as a text value,
   AND the value is read as a text value. If "False" is set with --bool,
   the value is "false", even if it's read as a text value.

   from https://git-scm.com/docs/git-config
   bool: canonicalize values as either "true" or "false".

   In other words, the existing check would work only if someone sets
   it as a text value with "False".

2) the inline comment, describing the intention, is confusing.
   "Skip url auto-correction if gclient-auto-fix-url is set"

   It's not clear whether it's set to any value? false? true?
   Nevertheless, what the code actually does is to auto-correct the URL,
   unless the config is set to False, which would unlikely be true, due
   to (1). To make it work, someone needs to set it with "False" as
   a text value, but "False" is not even a valid string value for
   the corresponding legit boolean value that git config --bool defines.

Therefore, depot_tools had auto-corrected the URL, if the config is
- set to "False" as a boolean value
- set to true, false, bla, foo, bar, or any value
  other than "False" as a text value.
OR
- unset

That's how the code had behaved from 2013 to 2024.

In Feb 2024, https://crrev.com/c/5280779 changed the behaviour.
It replaces the dubious check with GetConfigBool(), which may sound
correct by itself.
i.e., auto-correct if "remote.origin.gclient-auto-fix-url" is set to
"true".

However, it doesn't match the existing behaviour, which
auto-correct the URL regardless of the config. Depot tools had the
behaviour for 11 years. Fixing it is probably not the best decision.

This CL doesn't exactly recover the existing behaviour. Instead,
it removes the check. As a result, even if someone sets the config
with "False" as a text value, depot_tools will auto-correct the URL.

[1]: 3b9212b7ee:gclient_scm.py;l=764-768
[ancient CL]: https://chromiumcodereview.appspot.com/15325003

Bug: 342445995
Change-Id: Idc62f803f2ef1beb11a93a58432867ce16226da7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5572721
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
1 year ago
Josip Sokcevic 0a4852e19d Add clank/orderfile to deletion blocklist
Bug: 343721296
Change-Id: If4907b284246c2952f8da23a47ef5674e50c7ada
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5584808
Reviewed-by: Sky Malice <skym@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Fumitoshi Ukai da5e2f948a autoninja: fix for no args
need to split input_args[1] even if it doesn't contains " ",
e.g. when input_args[1] == ""

Bug: b/343172216
Change-Id: I32d9346063534ea2b4f891fd596c7ec02ab10dbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5583415
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Richard Wang <richardwa@google.com>
Reviewed-by: Richard Wang <richardwa@google.com>
1 year ago
Josip Sokcevic e99a4f1cf1 Add instrumented libraries to denylist
R=yiwzhang@google.com

Bug: 343199633
Change-Id: Ifbda6faf4bce589f47fb694cbd1e8190ac7046ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5583409
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 year ago
Robert Iannucci c57b7ed364 [gerrit_util] Change Authenticator API to return proxy info.
This will be used with an upcoming SSOAuthenticator implementation
which will need to proxy all http requests for Googlers.

R=ayatane, gavinmak@google.com

Bug: 336351842
Change-Id: If8cbb8db51fce198e704f109232868421130b40c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5582100
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Josip Sokcevic 11ed5e0222 Reland "[gclient] Delete GCS output_dir on download"
This is a reland of commit 7d95eb2eb0

Additional changes:
* introduce deletion blocklist

Original change's description:
> [gclient] Delete GCS output_dir on download
>
> GCS output_directory needs to be cleaned up prior to extracting new
> content. At the same time, it can't be cleaned up by individual GCS
> fetcher as there can be multiple objects in the same output_dir.
>
> This change adds a top level support to delete old GCS output_dir. If
> any of objects need to be downloaded, the output_dir will be completely
> deleted and all objects will be redownloaded.
>
> R=jojwang@google.com
>
> Bug: 342522902, 338612245
> Change-Id: Icbe4f1238cac54d7390bbb9b6fc5f17c538cca62
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5570466
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

R=jojwang@google.com

Bug: 342522902, 338612245
Change-Id: Ib5335cddfd60fb4d7da54e16aacb71b11413108e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5581228
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Rob Mohr 2377dbfdbc [recipes] Migrate away from deprecated post_process checks
Migrate away from ResultReason/ResultReasonRE. Also, do some minor
reformatting.

Bug: 339834630
Change-Id: Ibad136c4389955476af87bcc148581bea408415c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5565454
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Rob Mohr <mohrr@google.com>
1 year ago
Josip Sokcevic 499342211b [GCS] Add prefix option to upload_to_gs_f_c
R=jojwang@google.com

Change-Id: I23e903d3e1baca854ad44fd3c96b9d0591bf2fe4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5582089
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
1 year ago
Junji Watanabe 58c6521691 Add per-file autoninja_test.py=file://BUILD_OWNERS to tests/OWNERS
Change-Id: I0f2edc79ba52296d21a8303608c3231cb87bae4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5568703
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
1 year ago
Peter McNeeley dd0dd62997 Provide documentation for title option
Perhaps this is a linux convention but it was not obvious to me that
'y' would use the default.

Change-Id: I5aedcb365828015effa64d41153f6cb9c9318dfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5580992
Commit-Queue: Peter McNeeley <petermcneeley@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
1 year ago
recipe-roller 84ef52b4df 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/8746624937679717185

recipe_engine:
8324480341
  8324480 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 2bb12046ab13 to 3c691526411b

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: Idcd3049e6b75a3c8531d7975dec10ec99bf6495d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5576771
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>
1 year ago
recipe-roller 67896a0860 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/8746638150019679505

recipe_engine:
1a909a429e
  1a909a4 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 92ccbacc35ac to 7dc2571edcbd

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: Ia802ec9f1fca334aac161ae3e82592c0d4d4ad18
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5576770
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>
1 year ago
recipe-roller 73a5b5cf7b 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/8746657020235499825

recipe_engine:
045c03f589
  045c03f (mohrr@google.com)
      [post_process] Add deprecation warnings

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: I107cf50d0cfcda2746b22ea88b334a75afbed7dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5578675
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>
1 year ago
Josip Sokcevic f318db0055 [GCS] Allow upload of the entire directory to GS
Allow users to upload the entire directory by providing . or ./ as the
path.

R=jojwang@google.com

Bug: 343199633
Change-Id: Idf2a6b27577bb9ef153e096f00367084daab9239
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5578674
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Robert Iannucci a85dcffff4 [git_cl] Refactor away a use of isinstance.
Previously when composing a debugging trace, it would use an
isinstance check to special-case inclusion of a gitcookies file.

This CL refactors this to be part of the Authenticator API, instead,
which means that we will always get some sort of authenticator log
file in a trace, even if it's empty.

This also provides an affordance to add debugging information for
the other authenticator types later.

R=ddoman@chromium.org, gavinmak@google.com

Bug: 336351842
Change-Id: Idd6f45ea60b089f9b2391b5527c5281f67421043
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5571497
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 year ago
danakj 97246c4f73 Revert "[gclient] Delete GCS output_dir on download"
This reverts commit 7d95eb2eb0.

Reason for revert: Causing bot_update failures: https://issues.chromium.org/issues/342945505



Original change's description:
> [gclient] Delete GCS output_dir on download
>
> GCS output_directory needs to be cleaned up prior to extracting new
> content. At the same time, it can't be cleaned up by individual GCS
> fetcher as there can be multiple objects in the same output_dir.
>
> This change adds a top level support to delete old GCS output_dir. If
> any of objects need to be downloaded, the output_dir will be completely
> deleted and all objects will be redownloaded.
>
> R=jojwang@google.com
>
> Bug: 342522902, 338612245
> Change-Id: Icbe4f1238cac54d7390bbb9b6fc5f17c538cca62
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5570466
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

Bug: 342522902, 338612245, 342945505
Change-Id: I93ed99d7311f15a7a24a03ccba8c310cc7e4c4d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5570280
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: danakj <danakj@chromium.org>
Reviewed-by: Yann Dago <ydago@google.com>
Reviewed-by: Friedrich Horschig <fhorschig@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Owners-Override: danakj <danakj@chromium.org>
1 year ago
Junji Watanabe 8a11c2d152 autoninja: Support Siso builtin RBE client mode
This CL allows autoninja to use Siso's builtin RBE client instead of using Reclient.
Developers have to specify `use_remoteexec=true use_reclient=false` GN arg to use this mode.

This should be no-op for all developers unless `use_reclient=false` is set.

Bug: 342038479
Change-Id: I8a67f114c056be6ddb0cd26cccf0157e0b184c5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5567811
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
1 year ago
Junji Watanabe 450c36420d autoninja: Remove autosiso
autosiso has been deprecated. Nobody should be using it now.

Bug: 342038479
Change-Id: I3b22b9fc6db5b4693e954818c5aed58a3e4b4a0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5567813
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
1 year ago
Josip Sokcevic 7d95eb2eb0 [gclient] Delete GCS output_dir on download
GCS output_directory needs to be cleaned up prior to extracting new
content. At the same time, it can't be cleaned up by individual GCS
fetcher as there can be multiple objects in the same output_dir.

This change adds a top level support to delete old GCS output_dir. If
any of objects need to be downloaded, the output_dir will be completely
deleted and all objects will be redownloaded.

R=jojwang@google.com

Bug: 342522902, 338612245
Change-Id: Icbe4f1238cac54d7390bbb9b6fc5f17c538cca62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5570466
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Bruce Dawson 09c232e7c0 Resolve git.bat to git.exe without using shell=True
In order for git to be run on Windows and ultimately run git.exe it is
normally necessary to pass shell=True to Popen or else invoke git.bat,
or both. However this means invoking cmd.exe every time we want to
invoke git.exe, which can end up being over 1,500 invocations of cmd.exe
when running the "update" stage of gclient sync. This makes the "update"
stage take about 1.45x as long to run - it's a significant overhead.
Even with optimizations to the update stage of gclient sync in the NOP
case this repeated invocation of cmd.exe still costs about 0.8 s of a
4.9 s "update" stage.

This change teaches git_common how to find git.exe instead of just
git.bat by parsing the .exe name out of the .bat file.

Bug: 332982922
Change-Id: I4e052444276d55c0496144b9816fe365a95a56d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5462405
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
1 year ago
Robert Iannucci 3ea849f363 [git_cl.py] Remove all usage and messages around netrc.
netrc was already legacy in 2017:
fe30f18fc5

The removed gerrit-init.sh script was written in 2013 and no longer
works.

R=yiwzhang@google.com

Bug: 336351842
Change-Id: Ia8e845899973eb5ead66aee2f54078c09d80ef28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5564197
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
1 year ago
Robert Iannucci 2f779d3061 [git_cl] Minor type annotation and initialization cleanup.
Noticed that the comments around lazily initialization on settings
mentioned that it does logging or something like this, but in fact
the __init__ method is purely vanilla.

R=gavinmak@google.com

Bug: 336351842
Change-Id: I9d8120001690b2bbd52ac2172d346ce95e2dddd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5565083
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
1 year ago
recipe-roller cd6d85be9c 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/8747123848594790817

recipe_engine:
ece005ce6b
  ece005c (gbeaty@chromium.org)
      Support Paths as arguments to Path.joinpath.

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: I48acc5f87627f37bb9bee0fec87d4512459613b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5564878
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>
1 year ago
Bruce Dawson 062ecac69f Use git_common to call git
In preparation for some Windows optimizations to how git_common calls
git it is important to use git_common more widely, specifically from
scm.py and gclient_scm.py. This change updates scm.py and gclient_scm.py
and updates the associated tests:

Test command lines used when updating the tests include:
vpython3 tests/gclient_scm_test.py ManagedGitWrapperTestCaseMock.testUpdateConflict

vpython3 tests/gclient_scm_test.py GerritChangesTest.testRecoversAfterPatchFailure

vpython3 tests/gerrit_util_test.py CookiesAuthenticatorTest.testGetGitcookiesPath

Bug: 332982922
Change-Id: I7aacb110b2888c164259815385cd77e26942adc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5478509
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 year ago
Chenlin Fan 4071d0d728 New vpython3 to depot_tools.
b8fc6011e50cc017b6773ec4be99f7de6b468b0f cipkg: fix race condition when two packages waiting the execlusive lock simultaneously
89692b880afac19a3cd83922500bd3f474e9cb79 Add --no-periodic-update flag for virtualenv.
e986e645f627a0e9044002f81d1307c66084d8cf [packages] build for GOOS=openbsd GOARCH=ppc64,riscv64
3e19cd7bb78031ef91dc239ca5e570a32305d103 vpython: use realpath when invoking virtualenv
7f1070fd28b718864a306e95cad0b7a757eb0eca Revert "vpython: use realpath when invoking virtualenv"
988aaae74e27c6f8d191b31fcfa77340bfc64d0b vpython: use realpath when invoking virtualenv
f03b35a50ae5912b9031e4ac0dbd3924f92b5bff cipkg: rename root_step_name to step_name
097ceb2f05696dd96f465fa4df800ce008954765 cipkg: better handle execution error
47b5ad06e33f96931416639890ec16fe6db2e045 cipkg: add RootStepName and PackageExecutor
8c0507b3a1d4e4604d1e48d0adb3ace4ac18caf9 cipkg: fix mode override for embed fs
67ea392d049d6e4c238019a4fd8835a66253068f Include relevant build/packages/ changes in the vpython changelog.
a3fa998caff7d6e235febb4e262edfce9b5861e1 [vpython] Update version of virtualenv for python3.11
5055ac4c2310863a7f05584e971ec1abaec8b126 [vpython] Factor out pins for virtualenv package.

Bug: 335552303
Change-Id: I673665e0ef235af2687f1d9727bd337956e336e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5556721
Auto-Submit: Chenlin Fan <fancl@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Chenlin Fan <fancl@chromium.org>
1 year ago
recipe-roller 3699e0df54 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/8747201864459170225

recipe_engine:
c7dbdce807
  c7dbdce (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 5d0d03b48537 to 4967d21f2b92

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: I04686fef2be385b77ce10de88d94d8ad2fcf438a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5560182
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>
1 year ago
Josip Sokcevic 525b18d46b [gclient] Use lowercase and when merging conditions
python doesn't understand AND.

R=jojwang@google.com

Change-Id: Icd0a8a4440bea2e272b2e9760bcd88a65d559848
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5555884
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
1 year ago
recipe-roller 6b4aef5d85 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/8747216962194218561

recipe_engine:
500f30575f
  500f305 (mohrr@google.com)
      OWNERS: Remove yuanjunh@

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: I0ab2dafbf8e7b7bfc570acfed2428a92e4c50d21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5559225
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>
1 year ago