Commit Graph

11376 Commits (cb5069bb8e7f9f98e50cd71184fabcd7ccd5c57a)
 

Author SHA1 Message Date
Dan Le Febvre cb5069bb8e [auth-unify] deprecate no_auth options in download_for_google_storage
This will reduce confusion with the tools, gsutil.py will now take into
account supplied boto config outside of authentication (such as proxy
settings).

If the user is not logged in with luci-auth, the users configured .boto
config (including auth if configured) will still be taken into account
by the regular gsutil (not gsutil.py!) command.

Bug:b/342261857
Change-Id: I369489db60c46c13cbe9fd93d15c9597a525feb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6414748
Commit-Queue: Dan Le Febvre <dlf@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
2 months ago
Android Open Source Project 41b8b54089 repo: Update from upstream
- dc8185f2a9af53fd91fef160313564ad1abf827f launcher: change RunError to subprocess.CalledProcessError by Mike Frysinger <vapier@google.com>

GitOrigin-RevId: dc8185f2a9af53fd91fef160313564ad1abf827f
Change-Id: Iaa8211ab5363622629372996ff5c487c5d5b0fc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6422195
Auto-Submit: Copybara Service <copybara-worker-blackhole@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 months ago
Fumitoshi Ukai c6684fda98 win_toolchain: setup junction for toolchain dir
Some builders use env:DEPOT_TOOLS_WIN_TOOLCHAIN_ROOT to
specify shared builder cache on bot, which is out side
of builder's workspace, so we needed to set RBE_exec_root
to common ancestor dir above for reclient.

This CL sets up a directory junction in win_toolchain
(default location) to toolchain dir if specified by
`--toolchain-dir` or env:DEPOT_TOOLS_WIN_TOOLCHAIN_ROOT,
download win toolchain in the toolchain dir,
and use default location path for win toolchain,
so win toolchain can be available under normal exec root.

Bug: 397786479, 313567009
Change-Id: Ia39ce9e40f477f71e70036ed47c4b61c29626718
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6288233
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Andy Perelson <ajp@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
2 months ago
Allen Li e32bcc7be0 [git_auth] Print empty line after all read input
Small UX improvement

Bug: 404613530
Change-Id: Ie1cb79279a41cd80f1992e2e18107d4a15e16edb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6418884
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
Allen Li 5dcf92389b Fix git_map_test.py
I think the latest Git version changed this behavior.

Change-Id: Id10c3ec41daf4e6700fc8168373cae9482502231
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6422996
Commit-Queue: Allen Li <ayatane@chromium.org>
Feels: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
2 months ago
recipe-roller a7e3ac3034 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/8718865775815289777

recipe_engine:
d5aff4618a
  d5aff46 (olivernewman@google.com)
      [change_verifier] Roll luci-cv CLI

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: If20d7d20c793de89d876d97efa7a23dabff892ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6417042
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>
2 months ago
Andy Perelson a983b67726 Update root OWNERS
Change-Id: Ic4c7a23a82f06c8e4917b66d0848fd2ffa89e83c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6410152
Auto-Submit: Andy Perelson <ajp@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
2 months ago
Dan Le Febvre 3ce438f7f0 [auth-unify] prefer luci-auth over .boto config auth in gsutil.py.
Try LUCI Auth before using an existing BOTO config. If a
.BOTO config is used, warn on it and ask the user to try luci-auth
method next time.

http://crrev/c/6397035 also includes the GSUtil section in case anyone
is using it.

Bug:b/342261857
Change-Id: I79669926e956112faff45068b3cd822cf28a2385
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6396595
Reviewed-by: Scott Lee <ddoman@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Dan Le Febvre <dlf@google.com>
2 months ago
Android Open Source Project 416b5b3d73 repo: Update from upstream
- 59b81c84ded4e2312b2b554d22a51dca89825bc3 launcher: change collections.namedtuple to typing.NamedTu... by Mike Frysinger <vapier@google.com>

GitOrigin-RevId: 59b81c84ded4e2312b2b554d22a51dca89825bc3
Change-Id: Iadd0af8c670917eb4cd418b7f7184ee819ea9d2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6410153
Auto-Submit: Copybara Service <copybara-worker-blackhole@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2 months ago
Sky Malice c214cd9faf Add android resource files to DEFAULT_FILES_TO_CHECK.
The existing licence regex assumed each line would start with an unknown
and optional comment delimiter, followed by a required space. However
the standard way to write the licence in XML files uses a multi-line
comment, each individual line simply starts with the licence text, no
delimiter or space. The license check thus needed to be updated to make
the space optional as well.

Bug: 407060754
Change-Id: I4a83dd9408de890593952e441ba6b650f726907c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6409392
Commit-Queue: Sky Malice <skym@chromium.org>
Reviewed-by: Andy Perelson <ajp@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
2 months ago
recipe-roller c75e6df261 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/8719130646245608273

recipe_engine:
b44da3c0f8
  b44da3c (gbeaty@chromium.org)
      Remove config_vars from config_item_context.

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: I733d2bde57b5d4203db2c0a106ed980897d0baa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6408007
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>
2 months ago
Android Open Source Project 7e4f6d1841 repo: Update from upstream
- 243df2042ed756e7829cd39d3ebe3d1919444d5d launcher: change RunResult to subprocess.CompletedProcess by Mike Frysinger <vapier@google.com>

GitOrigin-RevId: 243df2042ed756e7829cd39d3ebe3d1919444d5d
Change-Id: I2c607922216ee35f8555c023b25e6e9e37a6d9c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6405593
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 months ago
Dan Le Febvre 2e17cd1d70 [auth-unify] update luci-auth pin
This adds .BOTO config (non auth) support to the gsutil shim.

http://crrev/c/6397035
http://crrev/c/6332773

Bug: b/342261857
Change-Id: I18c1cce7cba1926daa4678310e62cf26aaf48123
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6399833
Auto-Submit: Dan Le Febvre <dlf@google.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
2 months ago
Junji Watanabe 6058be3e48 siso: Use bundled python to run siso
Similar to https://crrev.com/c/6395717, but for siso wrapper.
This allows the build steps to use the bundled Python.

Change-Id: I57d56622f204cb26e025f164f90c079089314180
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6395718
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
2 months ago
Junji Watanabe e636a67972 autoninja: Use bundled Python to invoke autoninja.py
`python-bin/python3` sets the depot_tool's Python binary dir to PATH.
This allows build steps to use the bundled Python, so that the Python version can be aligned with what the infra uses.
Note that autoninja.bat already uses the bundled Python.

Change-Id: I9350859bcc5bd0ed59f2f00be8e5615d89281daa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6395717
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Junji Watanabe <jwata@google.com>
2 months ago
recipe-roller 22e5a04e59 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/8719503725944566033

recipe_engine:
7f9ca93a5c
  7f9ca93 (olivernewman@google.com)
      [time] Make `timeout()` not extend the deadline

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: I256cee90c27f331df588938f536f2d892751f404
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6387975
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>
2 months ago
Sam Clegg 097e207237 [git-map-branches] Fix coloring of root branch
I use `upstream/main` as my default upstream and not `origin/main`.

Change-Id: I614b88b2991a915c4477302e5064eaefd3a04ef0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6372748
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Sam Clegg <sbc@chromium.org>
2 months ago
Allen Li e73ad0d422 [newauth] Remove SkipSSO support
This was only for testing.

Bug: b/404613530
Change-Id: I8e79f14036f027aed91933158805b6ec4c03b266
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6373672
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Allen Li 2bfa28f442 [newauth] Print warning for .gitcookies file
This will print a warning and disable new auth if .gitcookies file
exists.

This ensures we don't break bots once we default new auth on while
pushing human users away from .gitcookies.

Bug: b/404613530
Change-Id: Ia2d05bb7e5d2bf11e5605a26ef492954acbd9833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367723
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
Allen Li 4b4ec94b3e Update Gerrit auth manpage
Just rewords things better.

Bug: b/404613530
Change-Id: I6bd339fa4bce4fc83e5f18a5bc6e9f9a3d52dd3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6374090
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Allen Li a2c6f107c3 [git_auth] Move config wizard to creds-check
Bug: b/404613530
Change-Id: Ie0b8fd675b66739a129d5eeeda895473a8a49eeb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6368999
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Allen Li 817ddf8d4f [gclient_scm] Disable gclient auto config on Windows
Bug: b/328682976
Change-Id: Ic096807302d8d345435c8913d84913aafba3d4d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367721
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
Allen Li 0f344dbf8a [auth] Delete unused _run_luci_auth_login method
No hits in git grep

Change-Id: If3f6a8c44f576413e5db129059c3d6fd8c713809
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367724
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
Allen Li 428ceb6428 [git_auth] Add extra info about OAuth setup
Change-Id: I145d18dbddee27b8655005c789191b3c524f0710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6367722
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Allen Li a0d13c9549 [git_auth] Use pathless URL for cred helper
The credential helper rules should not have a path, while the URL
rewrite rules should.

Reland of I79b52ab4af62367363617b2a9afa03a67f5ea0b9

Bug: b/401338175
Bug: b/403635929
Change-Id: Ib89d9e855ca5eba29cc67f8846bb7ca0cb3622ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6363080
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
Mohamed Heikal f41ea50890 Add emoji to build server related output
Bug: 404503040
Change-Id: Ife7d3d336bfbfb6513a2bb805f4b23d48e1c61d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6368643
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
2 months ago
Allen Li 8fecc592a2 Add auth config wizard
Make this available for testing first.

This should be functionally roughly analogous with the current auto
configuration logic, and it prints all actions it performs so it
should be pretty safe to play with, even if it hypothetically
misbehaves.

Bug: b/401338175
Change-Id: I803c7e167e355ec8cca1f5959099138c2fee305e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6334614
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
Josip Sokcevic 948edc4382 Revert "[git_auth] Use pathless URL for cred helper"
This reverts commit ce47e785fa.

Reason for revert: fatal: --local can only be used inside a git
repository.

Original change's description:
> [git_auth] Use pathless URL for cred helper
>
> The credential helper rules should not have a path, while the URL
> rewrite rules should.
>
> Bug: b/401338175
> Change-Id: I79b52ab4af62367363617b2a9afa03a67f5ea0b9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345631
> Commit-Queue: Allen Li <ayatane@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>

Bug: b/401338175
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ifa887eeb7a7049665570e865431b41ac18649b90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6357165
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2 months ago
Allen Li ce47e785fa [git_auth] Use pathless URL for cred helper
The credential helper rules should not have a path, while the URL
rewrite rules should.

Bug: b/401338175
Change-Id: I79b52ab4af62367363617b2a9afa03a67f5ea0b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345631
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Josip Sokcevic 04d6a4baa4 gerrit_util: Correctly handle abandon OK response
Recipe-Manual-Change: chrome_release
Bug: 403543870
Change-Id: I5137aa51fa43e696475a654811785c28d0283a08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6357156
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Fumitoshi Ukai 5e89ddacb7 autoninja: add comment on use_siso_default
Change-Id: Ia22ae12f15b845664e3e88f27731506f24c9b5e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6356123
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
2 months ago
Fumitoshi Ukai eae464cbfe autoninja: don't keep use_reclient=true with .reproxy_tmp
//build/toolchain/rbe.gni side fix: https://chromium-review.googlesource.com/c/chromium/src/+/6355944

Bug: 379584977
Change-Id: I2c0947ed3a7355ce3fe332e3e8a56655c0cf8ff8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6355865
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
2 months ago
Scott Lee 330c155fd0 Revert "pass -sort-includes to clang-format-diff.py by default"
This reverts commit 764c8c0616.

Reason for revert: Please find https://g-issues.chromium.org/issues/402201301#comment10

Original change's description:
> pass -sort-includes to clang-format-diff.py by default
>
> clang-format-diff takes a diff output as input, and formats
> the input file, but the changed lines only.
>
> In crbug.com/402201301, it was found that it sometimes breaks
> includes grouping because it tries to format the changed include
> lines only.
>
> This CL is to pass "-sort-includes" to clang-format-diff.py so that
> it always formats the include blocks, even if they are not part of
> the changes included.
> https://source.chromium.org/chromium/chromium/src/+/main:third_party/clang-format/script/clang-format-diff.py;l=70-75;drc=d2bee6477349e500ed274b15a9da8e062a0fcf27
>
> Bug: 402201301
> Change-Id: I214ae15202469dd5c7d55c2eb43c4cce39ad731b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6343956
> Commit-Queue: Scott Lee <ddoman@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>

Bug: 402201301
Change-Id: Ibfc70b68a9153d242bc011dfe17a73d671760842
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6355303
Commit-Queue: Scott Lee <ddoman@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Anton Bershanskyi ab918ca0bc Reland "Add AffectedFile.Extension() in presubmit_support"
This is a reland of commit d447f41294

This reland excludes the change to PRESUBMIT.py which originally
caused regression and because of which the original commit was
reverted.

Original change's description:
> Add AffectedFile.Extension() in presubmit_support
>
> Add convenience method AffectedFile.Extension() for extracting file
> extension in a standard way. Add a test for this new functionality.
> Add a similar test for AffectedFile.UnixLocalPath().
>
> Bug: None
> Change-Id: If591e751fb2e4fb5355ad0b6f93f310667849d68
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6273341
> Commit-Queue: Anton Bershanskyi <bershanskyi@gmail.com>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>

Bug: None
Change-Id: Ie5fc551b9c0818dfd9a1c571cc247cc157dbc8b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6335512
Commit-Queue: Anton Bershanskyi <bershanskyi@gmail.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
2 months ago
Keybo Qian c3129d4f4f Handle corner case where no commit logs are fetched.
This could happen if user specifies "accepted_statuses=['404']", and the current behaviour raises a KeyError exception from "last_result['log']".

Change-Id: Icebb8ac3b656548892bbf729e5df0cd5e5223ada
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6352740
Auto-Submit: Keybo Qian <keybo@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Keybo Qian <keybo@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
2 months ago
Josip Sokcevic 454f6ce8e2 gerrit_util: Handle already abandoned change
R=keybo@google.com

Bug: 402023825
Change-Id: I104b0868152714384642ff0ea41bb9844e8d54db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6352741
Reviewed-by: Keybo Qian <keybo@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Keybo Qian <keybo@google.com>
2 months ago
Alex Kravchuk 9211ea4acd Add verbose parameter to Gerrit recipe API.
Verbose logging is disabled by default in all functions except get_changes and the caller functions, since get_changes is already using verbose logging.

Bug: 402142151
Change-Id: Ifb4d62b215ded8f7be21217f2579574ea4d211f6
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_internal
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Recipe-Manual-Change: chrome_release
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6341791
Commit-Queue: Keybo Qian <keybo@google.com>
Reviewed-by: Adarsh Murthy <adarshmurthy@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
2 months ago
Allen Li 0445e00a08 [git_auth] Add _url_shortname helper
Breaking out independent chunks from a larger CL

Bug: b/401338175
Change-Id: I0b439596fb613355cb33b4b1d2a0481489d7c0c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345630
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
recipe-roller 23ce12ecdc 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/8720643109279477905

recipe_engine:
b4d20c176b
  b4d20c1 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from cdd565e14197 to 37cf62e10033

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: Iedcba939035720b1255d4e7c67de03654c3e116d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345854
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>
2 months ago
Allen Li 99d3aec6a5 Document Gerrit auth setup
Will link to this for people who want to do manual setup (and for
general info).

Change-Id: If5b84b27b0c3b029bcb70090ac9a5821e4fbdfe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6343955
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
recipe-roller 89e6caa83b 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/8720652549240082321

recipe_engine:
a96d19ea86
  a96d19e (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from a941d3568bdd to 7a44078a668b

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: I5d961b171940d6f4dfbbc5ef98482348394ecd20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6345628
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>
2 months ago
Scott Lee 764c8c0616 pass -sort-includes to clang-format-diff.py by default
clang-format-diff takes a diff output as input, and formats
the input file, but the changed lines only.

In crbug.com/402201301, it was found that it sometimes breaks
includes grouping because it tries to format the changed include
lines only.

This CL is to pass "-sort-includes" to clang-format-diff.py so that
it always formats the include blocks, even if they are not part of
the changes included.
https://source.chromium.org/chromium/chromium/src/+/main:third_party/clang-format/script/clang-format-diff.py;l=70-75;drc=d2bee6477349e500ed274b15a9da8e062a0fcf27

Bug: 402201301
Change-Id: I214ae15202469dd5c7d55c2eb43c4cce39ad731b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6343956
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Josip Sokcevic c253820d11 [presubmit_canned_checks] Read DEPS file of modified repository
Read the DEPS file of a modified repository since submodules are coming
from it.

R=yiwzhang@google.com

Fixed: 402396938
Change-Id: I05c91c60b2b1ea58637242fb9970c3fabd58560e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6344911
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Josip Sokcevic f61e11c19f roll_dep_test: fix tests
This partially reverts commit 1221440015.

Change-Id: Ib2e9d41b3871004376a952e643e13a7e67eb750e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6340427
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Allen Li <ayatane@chromium.org>
2 months ago
Allen Li b0d4f7c473 [gerrit_util] Add CheckShouldUseSSO function
This exposes the reason for the SSO detection, to be used in the auth
config wizard.

There are some minor changes to fix pyright (type checking) errors on
these lines.

Bug: b/401338175
Change-Id: Ibf63a1a078a9ae82598796e329d075f19de58ea7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6334613
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
2 months ago
Peter Wen 5d5ea66f01 git_cl: Add flag for owners override
This allows setting OO+1 with `git cl upload --enable-owners-override`.

R=sokcevic@chromium.org

Bug: None
Change-Id: Iddac69653a539a15beee38ea4957be1a9b19b57a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6340467
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Devon Loehr 9dc0551d52 [git cl split] Add new cluster-based splitting algorithm
This CL adds a new way of generating splittings, which clusters files
based on their directory structure (while respecting `set noparent` in
OWNERS files). The user provides a minimum and maximum acceptable
number of files per CL, and the algorithm attempts to create CLs in
that range with a single unique reviewer for each. I've tested it on
some example CLs, and it seems to work well -- certainly better than
the existing algorithm.

Usage of the new algorithm is triggered by passing the
`--target-range` option to `git cl split`. A second new argument,
`--expect-owners-override`, may also be used to ignore OWNERS during
the clustering algorithm.

Bug: 389069356
Change-Id: I321e6424b2bdb7624b370af23b73759fda261161
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6324373
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
2 months ago
Dan Le Febvre b123624ac6 Document the current state of LUCI GCS integration
Change-Id: I39c01200208de15e5ce2101ecc273f823875bc0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6326717
Auto-Submit: Dan Le Febvre <dlf@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
2 months ago
Josip Sokcevic f8e16bdbd6 Reland^2: Fix CheckForRecursedeps to work for submodule based gclient DEPS
This reverts commit 7d6d4424b5.

Change-Id: Ibb05a6b6db2babef525a4230c01785570e074161
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6336451
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@google.com>
Commit-Queue: Robbie Iannucci <iannucci@google.com>
2 months ago
Josip Sokcevic dbfdedfa08 Fix root path on Windows
User may use lowercase drive letter when entering gclient workspace.
In such case, path should be corrected to real path value.

R=wfh@chromium.org

Fixed: 401141847
Change-Id: I0b08985ec5c911a315922858d248ff53a10ed682
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6336450
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
2 months ago