Commit Graph

11339 Commits (0445e00a089e163c4dcf1659b9fe38edec2d5adc)
 

Author SHA1 Message Date
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
Josip Sokcevic 7d6d4424b5 Revert "[presubmit_support] Reland: Fix CheckForRecursedeps to work for submodule based gclient DEPS."
This reverts commit 4bef3f145a.

Reason for revert: https://crbug.com/401429917

Original change's description:
> [presubmit_support] Reland: Fix CheckForRecursedeps to work for submodule based gclient DEPS.
>
> R=sokcevic
>
> Bug: 401077549
> Change-Id: I68a2d153ce21e576ddc8b0449894e419097afba0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6334747
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Auto-Submit: Robbie Iannucci <iannucci@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

Bug: 401077549
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I38f20ca8915530f7f30e300f6f5d7590832c4ef7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6336255
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Yiwei Zhang cbf61c7044 CheckNewDEPSHooksHasRequiredReviewers checks approval from required
reviewers

The check mandates approval from required reviewers during submission.
Without it, the CL author could land the CL without explicitly
approval from required reviewers.

Bug: 396736534
Change-Id: I4671f123419b8f94a969b6caccf13a2064511a0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6313625
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Robert Iannucci 4bef3f145a [presubmit_support] Reland: Fix CheckForRecursedeps to work for submodule based gclient DEPS.
R=sokcevic

Bug: 401077549
Change-Id: I68a2d153ce21e576ddc8b0449894e419097afba0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6334747
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Robbie Iannucci <iannucci@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Yiwei Zhang cbd6ff76ec presubmit_support: write to stdout if --json_output - is specified
As part of new findings cider extension work, we need to show
presubmit result as findings in the new panel. The extension only
has access to stdout/stderr of the process executing presubmit
checks. Therefore, we need a way to write structured data
(i.e. json) to the stdout.

Bug: 397700948
Change-Id: Ie9e51d39389613c5f93ca054102b169a99e356b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6330090
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
2 months ago
Robbie Iannucci 01fcf2b8c5 Revert "[presubmit_support] Fix CheckForRecursedeps to work for submodule based gclient DEPS."
This reverts commit bb2a896987.

Reason for revert: Looks like this was insufficient - https://ci.chromium.org/ui/p/chromium/builders/ci/linux-presubmit/25451/overview

Will investigate more tomorrow.

Original change's description:
> [presubmit_support] Fix CheckForRecursedeps to work for submodule based gclient DEPS.
>
> R=sokcevic
>
> Bug: 401077549
> Change-Id: I51fcabad5e563a65614d4b35e6600e7e511f7ba4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6330092
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Auto-Submit: Robbie Iannucci <iannucci@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

Bug: 401077549
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I0730ea3f119b0acea7ed7a219cf723fc8116cd07
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6334078
Owners-Override: Dan Le Febvre <dlf@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Robbie Iannucci <iannucci@google.com>
Reviewed-by: Dan Le Febvre <dlf@google.com>
2 months ago
Robert Iannucci bb2a896987 [presubmit_support] Fix CheckForRecursedeps to work for submodule based gclient DEPS.
R=sokcevic

Bug: 401077549
Change-Id: I51fcabad5e563a65614d4b35e6600e7e511f7ba4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6330092
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Robbie Iannucci <iannucci@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 months ago
Garrett Beaty f40ddcd8d5 Update lucicfg to v1.44.1.
This enables support for the disable_reuse_footers argument to
luci.cq_tryjob_verifier.

Bug: 40785878
Change-Id: Ibf0183a0c9ca50ec1d8d8badbb556a97adfe875c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6330083
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
3 months ago
recipe-roller 6d817fd7f4 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/8721272885615833537

recipe_engine:
b67985a8c7
  b67985a (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 41a8a384b392 to b7196a984610

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: Ia2915d471faa88ad7830704c39c1bdd48974f29b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6326131
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 months ago
Devon Loehr 5825f91d8c [git cl split] Add trie structure for clustering
This CL defines a trie-based datastructure for representing files based
on their path. It directly mirrors the structure of a file system,
keeping track of directories and the files inside them. It also stores
some information about OWNERS files, for use during clustering (we
won't cluster files together if there's a "break" in ownership due to
`set noparent). Optionally, the ownership information can be overridden;
this will be done via a command-line flag when the algorithm is fully
implemented.

Bug: 335797528
Change-Id: I5dcdf36695a1da5714ec021e5e18b6c36855a4f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6321290
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
3 months ago
Devon Loehr c48f866fcf Select a minimal number of owners for a set of files
This CL adds a function which takes a set of files, and attempts to
select a single owner for all of them. If it cannot, it falls back to
the standard owner selection algorithm, which may result in more owners
being chosen than necessary, but guarantees that a valid set of owners
is always returned.

Bug: 389069356
Change-Id: I985804040f149a02bfb5b3c6b946602a81334e7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6321289
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
3 months ago
Devon Loehr 20193073f8 [git cl split] Make Emit and EmitWarning variadic
This better matches the print function which they replace, and prevents
errors from passing the wrong number of arguments. We also change
printing in one function to be more user-friendly.

Bug: 389069356
Change-Id: Ia41d256b441bffa063f5d0b5ab4eb20725aaeaf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6322690
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
3 months ago
recipe-roller 5c4253d15d 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/8721332655569278769

recipe_engine:
7efdb2adb7
  7efdb2a (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 953c4ca09288 to ab99f409094b

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: I33ac23ab5e83e11ec02a1872e518af04ba9f3510
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6321726
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 months ago
recipe-roller f53d073a6d 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/8721375437512917649

recipe_engine:
046d33fe16
  046d33f (yoshiki@google.com)
      Add support of hardlinking to api.file.copytree()

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: Ie27f17b5ad415ef11b5d32f24872da25d7ca3cc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6317718
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 months ago
Yiwei Zhang 191c73e7a2 CheckNewDEPSHooksHasRequiredReviewers computes reviewers from OWNERS
Instead of taking reviewers as input args, it computes the reviewers
from the top-level OWNERS file because otherwise, all callers will
basically do the same thing at the callsite.

Bug: 396736534
Change-Id: I3ea83b8285fab8b75cb77b40b10414c6a3dea6b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6313624
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
3 months ago
recipe-roller 85ec2718b5 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/8721445271873104529

recipe_engine:
ecfa431bdf
  ecfa431 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 21c0149742a3 to ca20346b3e3d

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: Ie97ed928ae144718cd021c4e56e0037a8c2ca4b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6315000
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 months ago
recipe-roller 50eedb1b5a 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/8721652257632529921

recipe_engine:
74d6343aef
  74d6343 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 657d7bc2c9d8 to 5d4ee097b7e4

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: Idae30f30eb46066d1987b04d27d71d2f96b06f6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6313662
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
3 months ago
Yiwei Zhang 1221440015 roll_dep_test: remove file:// scheme in the git url
roll_dep_test is currently using file:///path/to/repo as git url.
Interestingly, the test is not failing in presubmit bot but
failing locally because it is trying to clone using sso protocol
(see: b/391455129#comment11). I think the presubmit bot is not
equipped with git-remote-sso so the tests are able to pass. However,
on a local workstation, git-remote-sso is available but it should
not be used as the file:// scheme should indicate using local
transport protocol. Quoted from
https://git-scm.com/docs/git-clone#_git_urls
> When Git doesn’t know how to handle a certain transport
protocol, it attempts to use the remote-<transport> remote helper,
if one exists.

Removing the file:// scheme appears to fix the issue even though
the only difference is the usage of --local flag according to the
doc.

fwiw, I did try to inject `--local` flag but it gives me a warning
`--local is ignored`. I haven't dig deep enough to figure out why
the flag is ignored.

Bug: 391455129
Change-Id: I8fab9aee5198b2eedfacdb60161197b58f7533ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6313297
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
3 months ago
Allen Li c4e7c8717c gerrit_util: Delete temporary text about auth testing setup
Change-Id: I6c61998c1fca2681f6dc0f33468a8ae5b378f12e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6306289
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
3 months ago
Allen Li 4ac4d26e80 gerrit_util: Always use SSO in Cog
Bug: 396027841
Change-Id: I0e4f8442b0b630afaf1b716115007af3cbf6ee38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6306288
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
3 months ago
Peter Wen 3a5e3144af split_cl: Fix Emit-related warnings
Encountered while using `git cl split`.

Bug: None
Change-Id: I8ecaf44a64a5917f50176b8d88e367731a6dee35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6309324
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Devon Loehr <dloehr@google.com>
Auto-Submit: Peter Wen <wnwen@chromium.org>
3 months ago
Fumitoshi Ukai f638e8a918 autoninja: use build/toolchain/remoteexec_defaults.gni for use_reclient
Instead of using build/toolchain/use_reclient_value.py in
both autoninja and gn, use build/toolchain/remoteexec_defaults.gni
to set default value for use_reclient (on siso or on ninja).

Bug: 397994249
Change-Id: Ia4302fe8794218d485e52ca38f8523453814a6b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6301378
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
3 months ago
Yiwei Zhang e5159abea6 Add CheckNewDEPSHooksHasRequiredReviewers canned check
This will later be used in chromium PRESUBMIT to ensure newly added DEPS
hook MUST be reviewed by a dedicated reviewer.

Bug: 396736534
Change-Id: I3859814c6316d4e576d12114277671ed5db80e33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6284565
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
3 months ago
Yiwei Zhang 53f5a2d969 stop running test in python 3.8
chromium[1] and cros[2] have both moved to 3.11 which is the version
depot_tools use by default right now. Therefore, we should stop running
tests using python 3.8 to ensure compatibility and start using features
introduced after python 3.8

[1]: https://issues.chromium.org/40942322
[2]: http://b/318531403

Change-Id: I2bac00421a46793717387cec1898035b10b13b9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6306285
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
3 months ago
Mohamed Heikal 678f73bd0e [autoninja] Pass the output directory to the build server
When registering the build with the build server, pass in the output
directory.

Change-Id: Ie6ed0bf5d73926fb163085067aafcd350063ee5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6249305
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
3 months ago
Fumitoshi Ukai deb5575fbd autoninja: move use_siso default logic in autoninja.py
chromium now doesn't use `use_siso` value for build graph,
so no need to use use_siso_default.py in gn context.
use_siso value is only used to determine autoninja use
siso or ninja, so put use_siso default logic in autoninja.py.

Will remove build/toolchain/use_siso_default.py in chromium

Bug: 397994249
Change-Id: Idb31c4e75f0a1c3bc4a97089494ec16be9879a49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6301272
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
3 months ago
Tomasz Śniatowski 823adab6bd gn_helper: add missing sys import
A recent change added sys usage without the corresponding import. Add it.
See https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6217699

Bug: 393209409
Change-Id: Ib30dc8938ec6e3b56ab35a7b5e2b2071cb9e84ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6300492
Auto-Submit: Tomasz Śniatowski <tomasz.sniatowski@xperi.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
3 months ago
Jordan Brown a60883e901 metadata: Fix metadata validator error reporting
Validate errors should be returned as errors (as warnings are ignored), not warnings

Once the following CL's have been submitted there will be 0 presubmit errors or warnings.
* https://crrev.com/c/6284506
* https://crrev.com/c/6296486
* https://crrev.com/c/6290266
* https://crrev.com/c/6296606
* https://crrev.com/c/6297263
* https://crrev.com/c/6296425
* https://crrev.com/c/6290667
* https://crrev.com/c/6287813
* https://crrev.com/c/6289887
* https://crrev.com/c/6290124



Bug: 285453019
Change-Id: I3448435dcb0505722a2c68476ef9d752a6614533
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6296579
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
Commit-Queue: Rachael Newitt <renewitt@google.com>
Auto-Submit: Jordan Brown <rop@google.com>
3 months ago
Devon Loehr f0b8c3b16c [git cl split]: Allow users to override reviewer assignment
This CL adds a --reviewers flag, which allows users to specify that CLs
should all be sent to the same (possibly empty) set of reviewers. This
can be useful for LSCs where OO+1 is available.

Bug: 389069356, 40269201
Change-Id: Ic6202b280bb676f75a71c4ccf0c41b32483d5c6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6298664
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
3 months ago
Jordan Brown feeac124f2 Make custom.license_file validation error a warning, not a hard error.
This is because the linux-presubmit ci job does not run with all
dependencies checked out. See bug for details.

Bug: 398970704
Change-Id: Ia562cc6de7e586f947ccc9d351e9fc5feafa9f22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6300962
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
3 months ago
Devon Loehr 4629c3474e [git cl split]: Deprecate $directory in favor of $description
`git cl split` allows users to parameterize their CL descriptions
by including the string $directory, which is replaced by the list of
directories covered by each generated CL. However, as we add more ways
of generating splittings, a list of directories may not always be the
most appropriate description. For example, the --from-file option lets
users write arbitrary description strings.

This CL renames the $directory string to $description, to reflect this
new generality, and refactors all places in the code that expected a
directory list instead of a string. Since users may beused to the
current version, it does not remove $directory, but instead notes that
it is deprecated and emits a warning when it is used. After some time,
we can remove it entirely.

Bug: 389069356
Change-Id: If8c947fdcbbb4897675b015a377cf21123e51467
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6299688
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
3 months ago
Devon Loehr 158b6837dc [git cl split] Add summarize option during dry runs
Currently, the dry run setting causes the script to print out extremely
detailed information about the splitting it generated. While this is
sometimes useful, often users only care about the overall shape of the
splitting. This CL adds a flag which lets them see the same brief
summary that's printed during full runs.

Bug: 389069356
Change-Id: I473740e50f382e63b1289101f3253ff8ae9e6bbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6298096
Commit-Queue: Devon Loehr <dloehr@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
3 months ago
Devon Loehr 33522b8bbe Fix Python SyntaxError
Python has started warning about invalid escape sequences in strings.
This fixes the warning by escaping the backslash in question. It seems
Python was already (correctly) printing the literal backslash despite
the warning, so no behavioral change.

Bug: None
Change-Id: I2d5d8d56b989d9a1bb87aba69af0ebac0209a7a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6299490
Commit-Queue: Devon Loehr <dloehr@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
3 months ago
Devon Loehr 6e0fc6aaa1 [git cl split]: Refactor print function
This CL replaces the builtin print function with an alias `Emit`.
This is symmetric with `EmitWarning`, and primarily serves to allow
easier mocking during tests and debugging. No functional change.

Bug: 389069356
Change-Id: Ib2f5a7648458b6b1181606a3dccd9829542c5521
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6299489
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Devon Loehr <dloehr@google.com>
3 months ago
Scott Lee f945c74073 git_cl: sets opts.full if format-full-by-default is set
settings.GetFormatFullByDefault() looks up a git config to find if
format-full-by-default is set.

RunClangFormatDiff() and RunGoogleJavaFormat() uses the function to
determine whether it should format a given document full or not, and
it makes it difficult to make the wrapper functions git-op free.

To remove git dependencies from the Run functions, this CL simply sets
opts.full if the default is set.

Note that this CL makes a behaviour change to the Python Runner.

RunYapf() doesn't honor settings.GetFormatFullByDefault().
It just looks at opts.full only to determine how to format the file.
If this CL is landed, RunYapf() will take account of the git config to
determine whether it should format the full document or a part.

Bug: 386840832
Change-Id: Ibd7210e20897d354bd3eddf84927cf22105b7255
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6256552
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
3 months ago
Jordan e803e2cb4b Adding 'Patent' to WITH_PERMISSION_ONLY
Ideally we would track these separately but practically they fall into
the same category as the restricted license. It is on the OWNERS and the
reviewers to make sure that they comply with the terms of a Patent file
or any license. Currently we are just generating presubmit warnings that
are being ignored.

This will also enable future tooling that utilises this list for
auditing restricted licenses to surface Patent files.

Bug: 381146326
Change-Id: I0f091bef9649d3a9f7b03940c8634e56bee9541f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6290872
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
3 months ago
Jordan Brown ec894dd8c0 Support 'Refer to additional_readme_paths.json'
This is used by some README.chromium to reference transitive
dependencies, and is supported by licenses.py[0]

[0]
https://source.corp.google.com/h/chrome-internal/codesearch/chrome/src/+/main:tools/licenses/licenses.py;l=131-134

Bug: 398668341
Change-Id: Iac15b001614e7afa6eab981deaaf3d4aa5020d66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6296123
Auto-Submit: Jordan Brown <rop@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Rachael Newitt <renewitt@google.com>
3 months ago
Devon Loehr c994f00dee [git cl split] Codify and enforce auto-resumption
`git cl split` claims to have built-in auto-resume capabilities, but
the nondeterminism in its splitting algorithm means they don't work
in practice. Now that we have the ability to load splittings from
files, we can ensure the user is using the same splitting as before,
and resume safely.

This CL does two things:
- It checks that any existing split branches match the splitting we're
  about to upload, and complains if they don't match. This relies on
  the fact that our branch names are unique and deterministic.
- It changes the auto-resume message to mention that --from-file is
  required, and includes the relevant filename. This requires tracking
  that filename from earlier in the program.

Bug: 389069356
Change-Id: Ic1d8964e96193ca93e05a9a39e286b84ffb61b06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6280953
Commit-Queue: Devon Loehr <dloehr@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
3 months ago