Commit Graph

11948 Commits

Author SHA1 Message Date
recipe-roller
445836babf 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/8697568568282164849

recipe_engine:
66daa98581
  66daa98 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 51748c9373bd to 7defb40e58ef

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: I937b5cd93d8445bbc0b1b15214fb3793da34304f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7187024
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>
2025-11-21 10:30:06 -08:00
Adam Norberg
3ec220caca Rename caffeinate.run to .call and match the subprocess.call API.
I'm looking at caffeinating more long-running depot_tools commands on
Mac, which use a variety of `subprocess` APIs; one implementation
strategy I'm considering is to wrap more of them, including
`subprocess.run`, but the most obvious name to wrap `subprocess.run`
into is already taken! I think it makes the most sense to name the
`caffeinate` function(s) after the `subprocess` call it wraps.

The callers to other parts of `subprocess` use more of the features
exposed by those APIs. For consistency, I am plumbing through more of
`subprocess.call`'s identifiable behaviors here, too:

* command-to-invoke parameter is named "args"
* as explicitly checked in cpython's subprocess.py's `_posix_spawn`:
  77cb39e0c7/Lib/subprocess.py (L1816)
  also allow `str`, `bytes`, and `os.PathLike` for the type of `args`,
  converting the non-list-like types into a single-element list
* use kwargs packing and unpacking to forward other parameters into
  `subprocess.call`

kwargs packing does not provide perfect emulation as implemented:
77cb39e0c7/Lib/subprocess.py (L386)
`timeout` could be provided as a positional parameter. However, Python
documents all subprocess.call parameters as keyword only:
https://docs.python.org/3.12/library/subprocess.html#older-high-level-api
...specifically because they don't want to bother distinguishing
between parameters "local" to a higher-level `subprocess` helper and
those that get forwarded (via `**kwargs`) to the underlying `Popen`,
so I think it is reasonable to follow their lead on that.

Bug: 462507017
Change-Id: Ia520ced7f8188c23c38826d22ccf20a3c52ddfc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7181621
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Adam Norberg <norberg@google.com>
2025-11-20 21:03:12 -08:00
Allen Li
375fb27dca git_auth: Organize helpers
Group URL returning helpers together

Bug: 419182970
Change-Id: Icec51bec8b0ce808d70c1eff7131933d1419719e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7173363
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-11-19 16:13:46 -08:00
Garrett Beaty
573d5924ac Update bot_update.ensure_checkout to write TurboCI checks.
This adds an optional turboci_check_id parameter to
bot_update.ensure_checkout. If set, it will cause a SOURCE check to be
emitted based on the gclient config being used and any gitiles commit or
gerrit change that is used.

Bug: b:443496677
Change-Id: Ic7fc55511b9b698cffb85fe872221e534fee742d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7147310
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Robbie Iannucci <iannucci@google.com>
2025-11-19 15:09:08 -08:00
Allen Li
a158a297ce git_auth: Add _set_url_rewrites helper
Add an intermediate helper on the path to supporting -review URLs.

Bug: 419182970
Change-Id: I792ccc0c4dca3be5db625aca4a48e7edad1e9ba0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7164719
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-11-19 14:50:03 -08:00
Will Yeager
778af1e3b8 Update default mac_toolchain and Xcode versions in osx_sdk recipe module
Bug: 461757070
Change-Id: I1fdec68d3e80e3fad065a3c67f2f6776568e05c6
Recipe-Nontrivial-Roll: build_internal
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7171485
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Will Yeager <wyeager@google.com>
2025-11-19 12:16:13 -08:00
Will Yeager
14f053740d Add current bling-engprod team members to OWNERS for osx_sdk
Change-Id: I7e75667fd1c7c5ce6c08744f201201200d960e25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7170014
Commit-Queue: Will Yeager <wyeager@google.com>
Reviewed-by: Garrett Beaty <gbeaty@google.com>
2025-11-19 11:55:07 -08:00
Victor Hugo Vianna Silva
b5427d5ad8 Add fetch config for ipcz
Bug: None
Change-Id: I47be4d5d4ca7a5850c6fec0aa6e1ce10f5d307c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7171198
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Victor Vianna <victorvianna@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2025-11-19 09:43:15 -08:00
Fumitoshi Ukai
a40c63a40b siso: fix GOOGLE_API_USE_CLIENT_CERTIFICATE
GOOGLE_API_USE_CLIENT_CERTIFICATE=false was not passed
to siso process.

Change-Id: I44e1d63c7fbf8184822d9d888495b4818b511eac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7171141
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Alex Ovsienko <ovsienko@google.com>
2025-11-18 23:49:18 -08:00
Garrett Beaty
5ba2fb94f5 Remove documentation for removed fields.
The presentation and json attributes were removed in
crrev.com/c/5534148.

Bug: 339472834
Change-Id: I8c935fa3ff478a239c0b861578539c221224a6cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7170879
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-11-18 16:40:54 -08:00
Garrett Beaty
d2d239377a Report the target ref in fixed revisions test data
The json output for bot_update reports the value that are passed as
--revision flags to bot_update.py in the fixed_revisions field in the
json output. In the case of a revision of 'HEAD' for a project that has
a CL, the 'HEAD' gets resolved to the target ref of the CL. In
simulation tests, the --revision flag in the command correctly shows the
target ref, but the fixed_revisions in the json output shows 'HEAD'.
This updates the code so that the target ref resolution happens before
setting the value in the dict that is used as the fixed_revisions field
in the output json. This results in a change to the revision since the
input to produce the hash will incorporate the ref.

Change-Id: I4fc0594039faf0725ef9c293b00f31bc7b2692a2
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_internal
Recipe-Nontrivial-Roll: infra
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7148746
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-11-18 16:12:32 -08:00
Allen Li
02f950a7cd git_auth: Add test for url rewrite override case
To prevent possible future regressios

Change-Id: I873be512b621f57f1dd9f54a68d093cd65228bf0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7164718
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-11-18 15:43:06 -08:00
Brian Sheedy
8e49ae5de8 Update submodules exception
Makes the following changes related to the exception made for fake
Chromium checkouts when checking git submodules:

1. Adds an instance of this being used in Dawn to the comment
2. Adds third_party/placeholder_chromium as an allowed dependency name
   since the "dummy" from third_party/dummy_chromium runs into the
   inclusive language checks.

Bug: 452840620
Change-Id: I65099d150cf9c4971e3183f1cb208df668582e4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7170740
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
2025-11-18 14:47:31 -08:00
recipe-roller
56afa6dda8 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/8697825888804574321

recipe_engine:
757398cf67
  757398c (gbeaty@chromium.org)
      [TurboCI] Import latest protos.

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: I989ef2f4901d887e7bb3243a4cda09ffc461f2aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7170738
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>
2025-11-18 14:25:29 -08:00
Allen Li
b8f203014f git_auth: Add some docstrings
Change-Id: I6bb0299cadfd92304a112e2d90a926c6006d1a46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7164717
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Allen Li <ayatane@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2025-11-18 11:41:59 -08:00
Alex Ovsienko
565cc4ee35 siso: for post_build_ninja_summary.py convert every long flag to be double dashed.
Bug: b/461656982
Change-Id: I0180194a037204c2eb3a23286ada0f956a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7166367
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-17 22:36:57 -08:00
Allen Li
dac161882f git_auth: Simplify global flag handling
The "We will pretend to be running outside of a Gerrit repository" is
confusing since --global is generally the recommended mode now.  Also
simplifies the code.

Change-Id: Ia698f5ba4cbfce50c7754a4c7d86ca791e89d183
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7153131
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-11-17 13:01:21 -08:00
Garrett Beaty
a98a592d70 Grant better control over bot_update test data revisions
Currently, in order to specify a revision for a project in the
bot_update output, one has to either set the fixed_revisions or the
revision_mapping values. Both of these have additional effects on the
output json (fixed_revisions or properties) and setting them requires
fully overriding the json output. This can easily lead to output data
that doesn't match the gclient config being used.

This change overhauls the output_json test API function by adding a
revisions parameter that can be used to override the revisions used for
a project without affecting other portions of the json output. A
mod_test_data-decorated revisions method was added that enables
overriding the revisions without having to specify the full output json,
so fixed_revisions and properties will be set automatically according to
the gclient config being used. The revision_mapping parameter was
renamed to revision_properties to better distinguish it from revisions
and more accurately indicate its contents.

The following changes in behavior occur for the default test data:
* The got_revision property will only be added if the gclient config being used doesn't specify a got_revision_reverse_mapping
* If a got_revision property is added because the gclient config doesn't specify a got_revision_reverse_mapping and commit_positions is True, a got_revision_cp property will also be added

Additionally a post_check_output_json method was added that simplifies
the process of making post checks on the contents of the bot_update json
output.

Change-Id: I012b440107fa3323564fa3e1e3024c038e9944a2
Recipe-Manual-Change: build
Recipe-Manual-Change: infra
Recipe-Nontrivial-Roll: build_internal
Recipe-Nontrivial-Roll: chromiumos
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7152830
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
2025-11-17 12:11:54 -08:00
Scott Lee
039035332b bug fix for diff hunk parsing
The diff hunk can omit the number of lines after the line position.
For example, the following hunks are all valid
- @@ -1,2 +1,3 @@
- @@ -1 +1,3 @@
- @@ -1,2 +1 @@
- @@ -1 +1 @@

However, the existing regex assumes that the number of lines is always
given. It wasn't a problem before crrev.com/c/6952890, because -U3 was
applied always. However, since it changed the context lines to -U0,
git diff started generating hunks without the number of lines, if
a given changed section contains only a single line.

This CL fixes the regex.

Bug: 453641840
Change-Id: I67f680bc1d8fa046e373b065e8ccbb6ce652eb3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7158599
Auto-Submit: Scott Lee <ddoman@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-11-17 09:06:06 -08:00
Alex Ovsienko
926832f6db siso: extract command line args handling into _process_args.
Add tests for _process_args to make sure all flags operate as expected.

Bug: b/459690822
Change-Id: I98086cb0a274420f440b2ac3490473566a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7161336
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
2025-11-16 23:38:15 -08:00
Alex Ovsienko
ca5576a48f siso: cover apply_metrics_labels and apply_telemetry_flags functions with tests.
Bug: b/459690822

Change-Id: Iccb5b83e8572afa8d6a66252fc69cf766a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7141140
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
2025-11-16 21:57:17 -08:00
Philipp Wollermann
3d559609b4 siso: Handle empty args and startup flags
Using `args[1]` to get the subcommand name doesn't work when the user
calls siso without any arguments, or when they specify global flags such
as `siso -logtostderr ninja ...`.

We can use the existing `subcmd` variable instead.

This fixes the following traceback:

```
$ siso
Traceback (most recent call last):
File "/home/philwo/depot_tools/siso.py", line 313, in <module>
sys.exit(main(sys.argv))
^^^^^^^^^^^^^^
File "/home/philwo/depot_tools/siso.py", line 292, in main
if args[1] == "ninja":
~~~~^^^

IndexError: list index out of range
```
Change-Id: Id319bdf099a2e87e049aee474734495424617a5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7155649
Auto-Submit: Philipp Wollermann <philwo@google.com>
Commit-Queue: Philipp Wollermann <philwo@google.com>
Reviewed-by: Alex Ovsienko <ovsienko@google.com>
2025-11-16 19:37:24 -08:00
Alex Ovsienko
c527a62fe0 siso: create simple function to check if subcommand is present is siso using help.
That will help with starting collector from subcommand when clients may have older siso versions installed.

Bug: b/455433899

Change-Id: I5949b46017619a1717ef87781d8430b56a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7155815
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
2025-11-16 19:03:44 -08:00
recipe-roller
23ad8839bf 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/8698195196450513969

recipe_engine:
83bcf84535
  83bcf84 (mohrr@google.com)
      [runtime] Add some post-process checks

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: I1ecef0a5923b959be4fa2f11792c38d5df53ed54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7157718
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>
2025-11-14 12:32:15 -08:00
Marc Jin
ccd4d2f345 Add an optional no-auto-gc flag for the git fetch.
Bug: b/458222057
Recipe-Nontrivial-Roll: chromiumos
Change-Id: If00eb0639871b060bc5efc507e79620382c0dfe5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7153382
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Marc Jin <jmarc@google.com>
2025-11-13 20:36:03 -08:00
Rachael Newitt
11b0e6b805 Update the insuffient vuln scanning warning.
The previous CL changed the validation criteria, but did not update
the error message we're posting on the bugs we file, which is very
confusing. In the future we should try to write some tests to catch
things like this.

Bug: 452151523
Change-Id: I08272353a3cfada8f242355b48c4f003eec4abf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7153383
Auto-Submit: Rachael Newitt <renewitt@google.com>
Commit-Queue: Rachael Newitt <renewitt@google.com>
Reviewed-by: Jordan Brown <rop@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
2025-11-13 18:15:02 -08:00
recipe-roller
257c4d187d 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/8698282013592269793

recipe_engine:
e365d6b307
  e365d6b (mohrr@google.com)
      Reland "[engine] Don't catch cancellations in except"

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: I6bd0736ee819895ca424540a20c0d843d3803953
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7153122
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>
2025-11-13 13:34:14 -08:00
Garrett Beaty
4b0c520d0f Revert "Add an optional no-auto-gc flag for the git fetch."
This reverts commit 5163c5dcbe.

Reason for revert: git fetch doesn't have a --no-guto flag

Original change's description:
> Add an optional no-auto-gc flag for the git fetch.
>
> Bug: b/458222057
> Change-Id: Ibcd3128cc1968bc20bcb7d7f07c21ea0f690fafb
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7143819
> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> Commit-Queue: Marc Jin <jmarc@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>

Bug: b/458222057
No-Tree-Checks: true
No-Try: true
Change-Id: Ie97b7028f3489a1b0e90e50a6314d03e602bcc5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7152220
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-11-13 12:03:00 -08:00
Garrett Beaty
8257337edc Update the freeze checks to support multiple freeze periods.
This updates the CheckInfraFreeze/CheckChromiumInfraFreeze functions to
operate on the _CHROMIUM_FREEZES list of tuples with start, end and
details that define freeze periods rather than a single freeze period
defined by the _CHROMIUM_FREEZE_START, _CHROMIUM_FREEZE_END and
_CHROMIUM_FREEZE_DETAILS values. This will enable defining the freeze
periods for end-of-year all at once rather than requiring an update
between the November and December/January periods.

The periods have been set to match the announced end-of-year freeze
dates.

Change-Id: I7ea9d19fad71d086cef3de0e02ea40fda35460ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7090808
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
2025-11-13 10:57:54 -08:00
Ramin Halavati
9c69e0d573 Update licenses allowlist for the latest build of ChromeScreenAI.
Added licenses are needed by the latest build of the ChromeScreenAI
library. The license list is updated in: http://crrev.com/c/7079126

The list is generated using the following tools:
.../opensource/tools/collect_licenses/collect_licenses
.../opensource/thirdparty/licenseclassifier/identify_license

Bug: 378472917
Change-Id: I83f07d0774ace7a9984087d7c8ac1acd604e82e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7088131
Reviewed-by: Anne Redulla <aredulla@google.com>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
2025-11-12 23:21:39 -08:00
Jordan
0a519cc269 Export license helpers
This allows client code to check if a license is in a given allowlist
e.g. 'WITH_PERMISSION_ONLY' without exporting the lists. This is done
because we now process licenses (e.g. .lower()) when checking against
the lists.

Also fix a type annotation.

Change-Id: I7c52dd19493f72ba3fb927f1654ee1affde320dd
Bug: 452151523, 460076179
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7149079
Reviewed-by: Anne Redulla <aredulla@google.com>
Auto-Submit: Jordan Brown <rop@google.com>
Commit-Queue: Anne Redulla <aredulla@google.com>
2025-11-12 19:17:09 -08:00
Marc Jin
5163c5dcbe Add an optional no-auto-gc flag for the git fetch.
Bug: b/458222057
Change-Id: Ibcd3128cc1968bc20bcb7d7f07c21ea0f690fafb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7143819
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Marc Jin <jmarc@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-11-12 17:09:54 -08:00
Jiewei Qian
cdddcc5974 metadata/license_allowlist: export consts depended on by downstream
This CL re-epxorts normalized license list consts temporarily so we
unbreak downstream clients relying on their import names.

Future CL will migrate downstream clients to use the exported functions
(which handles normalization correctly), then remove this temporary
export.

Bug: 452151523
Change-Id: I05a96fb35c3decda77890808d8f78ae867f47b09
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7148918
Reviewed-by: Rachael Newitt <renewitt@google.com>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Jordan Brown <rop@google.com>
2025-11-12 16:08:26 -08:00
Jordan
8acc772e9a Removing git tag as acceptable for vuln sufficiency
Change-Id: Ie611f0fe87dc0b518104588c153b7d857a696237
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7144858
Auto-Submit: Jordan Brown <rop@google.com>
Commit-Queue: Rachael Newitt <renewitt@google.com>
Reviewed-by: Rachael Newitt <renewitt@google.com>
2025-11-12 14:51:31 -08:00
Alex Ovsienko
2bc167bbca siso: add default metrics project in telemetry flags if none is specified.
Bug: b/348530235
Change-Id: Iba012ffa79c4d13033234c3afc4f18b36a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7141142
Reviewed-by: Junji Watanabe <jwata@google.com>
Auto-Submit: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-12 00:02:23 -08:00
Alex Ovsienko
f107245af8 siso: set GOOGLE_API_USE_CLIENT_CERTIFICATE for googlers that run siso.py without running autoninja.py
apply_telemetry_flags runs only for googlers, so we don't check if it's the googler running the code again.

Additionally amend the comment.

Bug: b/348530235
Change-Id: I3b1ef1edc8c03a4aba11bdc474560de66a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7143899
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-11 22:33:43 -08:00
Alex Ovsienko
345a14adf0 siso: enable system limits fix when we run only siso.py.
Change-Id: I355e2d12833fefdc0e9d53b53a5583fc6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7144919
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-11 21:34:48 -08:00
Alex Ovsienko
c70073ccc7 Make system limits check run before Siso.
If this is not done, the offline mode of Siso will fail on mac when soft limit is insufficient.

Change-Id: I0f6ff27917a508aefdd13c43c74fece26a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7140025
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-11 21:22:57 -08:00
Garrett Beaty
372c58b852 Update typing/documentation for bot_update's test API output_json method
This change adds some additional type annotations to remove typing
errors surfaced in the output_json method of the bot_update test API and
adds documentation for the parameters.

Change-Id: I4aa3edae665016cd1d1394e9294f20a15b8f7e1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7142477
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
2025-11-11 21:20:43 -08:00
Jordan
4f279935d6 Make license check case insensitive
I've been careful to make sure that the values in the warnings will
still have their original case so that we don't end up with all of the
licenses being in lowercase.

Bug: 452151523
Change-Id: Ifcc5e2ec38486a8e4f68fb7b066b00b8732cbc1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7060630
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Auto-Submit: Jordan Brown <rop@google.com>
2025-11-11 21:11:41 -08:00
Henrique Ferreiro
c4109803d7 Reland "[gclient] Enable parallel sync on ARM Mac by default"
This reverts commit 8f4d3df0bc.

Reason for revert: no longer an issue on current git.

Original change's description:
> Revert "[gclient] Enable parallel sync on ARM Mac by default"
>
> This reverts commit 92b780b0bd.
>
> Reason for revert: mac arm experiencing hang
>
> Original change's description:
> > [gclient] Enable parallel sync on ARM Mac by default
> >
> > I realized that gclient sync doesn't use all the cores on ARM Mac.
> > This CL changes the default for ARM Mac to use all the available cores.
> >
> > Change-Id: Id0316e48d2b16a05a397a69bad53172b3d742f4a
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5256559
> > Commit-Queue: Junji Watanabe <jwata@google.com>
> > Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> > Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
> > Auto-Submit: Junji Watanabe <jwata@google.com>
>
> Bug: 1427050
> Change-Id: I512d1d1ef0034f12fc9054c5234ae688ec281857
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5259766
> 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>

Bug: 40261607
Change-Id: If46b9d98ec65e3e8424ec0b4637834772a372c0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7137402
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
2025-11-11 18:09:06 -08:00
Alex Ovsienko
32a8dcc842 siso: Make it so that we check the second parameter of siso whether it is ninja or not.
The first one is always `siso`.

Bug: b/348530235
Change-Id: I2135d87cb676156b4e14ace31928e9de6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7140206
Reviewed-by: Junji Watanabe <jwata@google.com>
Auto-Submit: Alex Ovsienko <ovsienko@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-11 00:08:06 -08:00
Terrence Reilly
ee1cf58691 Revert "cipd: ignore .cipd_client_root"
This reverts commit 55f06f3e06.

Reason for revert: https://b.corp.google.com/issues/458283880#comment6.  Once and a while we discover a tool which uses the vendored depot tools. In this case, we weren't passing the user's depot tools path for debugging.  When that happens, the workspace will break, with no visible files in the change.  Instead, we'll reintroduce this, and add have the cipd root live in the out directory.  That will prevent the issue from the second bullet point.

Original change's description:
> cipd: ignore .cipd_client_root
>
> It was introduced to override the cipd bin path so that the downloaded
> files wouldn't be listed in the CiderG workspace file tree when
> the bundled depot_tools is used.
>
> However,
> - chromium no longer uses the bundled depot_tools
> - the cipd_client_root, pointing to a folder in /tmp, causes issues
> when a temp cleanup cron removes files based on the last access ts.
>
> We no longer need .cipd_client_root.
>
> Bug: 415080055
> Change-Id: Ic966699cce3173a8ce4033752edec5e53aded870
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6614519
> Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
> Commit-Queue: Scott Lee <ddoman@chromium.org>

Bug: 415080055
Change-Id: If3610a3660386f50a1567c2b7bae8437eb4860f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7138561
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Terrence Reilly <treilly@google.com>
2025-11-10 15:42:22 -08:00
Scott Lee
67741248cf skip printing a warning message for missing .gclient_entries on cog
The function prints a warning message when it finds that
a given directory contains .gclient only without .gclient_entries.

It can possibly happen if gclient sync execution is halted
in the middle, and it causes format function commands to mess up
the format output with the warning message.

This CL is to bypass the warning in Cog env. Find more context
visit the linked bug.

Bug: 450901048
Change-Id: I87e376e9a64c8e2ce2231dc9549e0683a9f393ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7133882
Commit-Queue: Scott Lee <ddoman@chromium.org>
Auto-Submit: Scott Lee <ddoman@chromium.org>
Reviewed-by: Terrence Reilly <treilly@google.com>
2025-11-10 13:01:27 -08:00
Garrett Beaty
af2fd53bed Update lucicfg to 1.46.1.
1.46.1 adds the lucicfg.main_package() function, which enables custom
generators to know the path to the main package being executed without
having to explicitly duplicate the location within custom starlark code.

Bug: 458607662
Change-Id: Id2c173f9d7ab3162a864311e6fe86768de2dfd57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7137242
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
2025-11-10 08:59:10 -08:00
Alex Ovsienko
b26ab6e9d5 Have ninja flags be applied in more obvious manner.
Bug: b/348530235
Change-Id: Idfac0789c4881a376678f749d0d20b3309fd240c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7136527
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-09 21:37:15 -08:00
Alex Ovsienko
2b4898e327 Reland "Enable telemetry flags for Google corp machines only."
This reverts commit 6f83fce865.

Reason for revert: Make sure that the flags are applied only for ninja runs.

Original change's description:
> Revert "Enable telemetry flags for Google corp machines only."
>
> This reverts commit 4e2be179a1.
>
> Reason for revert: 
> This caused exception
>
> ```
> + autoninja -strict_remote -d keepdepfile -d keeprsp -C out/Default chrome
> siso ninja -strict_remote -d keepdepfile -d keeprsp -C out/Default chrome
> ninja: Entering directory `out/Default'
>  4.51s init credentials by "credhelper"
> https://console.cloud.google.com/logs/viewer?project=rbe-chrome-untrusted&resource=generic_task/task_id/25d8cbb8-4fa1-486d-ba78-7865d0eea5ac
> use RBE instance "projects/rbe-chrome-untrusted/instances/default_instance"
>  2.27s loading/recompacting deps log
>  3.47s Regenerating ninja files
>  1.17s load siso config
> build finished
> local:3636 remote:33214 cache:3317 cache-write:0(err:0) fallback:0 retry:0 skip:40752
> reapi: ops: 102977(err:33221) / r:46503(err:8) 3.13GiB / w:72424(err:0) 152.35MiB
> fs: ops: 2790971(err:182693) / r:227138(err:0) 6.68GiB / w:13508(err:4) 1.87GiB
>     resource/capa used(err)  wait-avg |   s m |  serv-avg |   s m |
>   pool=action/128   2372(0)     0.00s |█      |     0.30s | █▅▂▂▂ |
>         rbe:sched  33214(0)     0.01s |▃█▂▂   |     6.43s |  ▂█▃▂ |
>        rbe:worker  33214(0)     0.87s |    █  |     5.56s |  ▂█▃▂ |
>  remoteexec/10240  33214(0)     0.10s |█▂▂▂   |    15.37s |   ██▂ |
>  1.00s shutdown cloud logging/monitoring
> 4m08.96s Build Succeeded: 40167 steps - 161.34/s
> flag provided but not defined: -enable_cloud_monitoring
> summarize siso_metrics.json
>
>  $ siso metrics summary -C <dir> \
>     [--step_types <types>] \
>     [--elapsed_time_sorting] \
>     [--elapsed_time=run|step] \
>     [--input siso_metrics.json]
>
> summarize <dir>/.siso_metrics.json (--input)
> as depot_tools/post_ninja_build_summary.py does.
>   -C string
>         ninja running directory, where siso_metrics.json exists (default ".")
>   -elapsed_time string
>         metrics to use for elapsed time. "run" or "step". "run": time to run local command or call remote execution.  "step": full duration for the step, including preproc, waiting resource to run command etc. (default "run")
>   -elapsed_time_sorting
>         Sort output by elapsed time instead of weighted time
>   -input string
>         filename of siso_metrics.json to summarize (default "siso_metrics.json")
>   -step_types string
>         semicolon separated glob patterns (go filepath.Match) for build-step grouping
> Traceback (most recent call last):
>   File "/usr/local/google/home/tikuta/depot_tools/post_build_ninja_summary.py", line 390, in <module>
>     sys.exit(main())
>              ^^^^^^
>   File "/usr/local/google/home/tikuta/depot_tools/post_build_ninja_summary.py", line 375, in main
>     subprocess.run(cmd, check=True)
>   File "/usr/local/google/home/tikuta/depot_tools/bootstrap-2@3.11.8.chromium.35_bin/python3/lib/python3.11/subprocess.py", line 571, in run
>     raise CalledProcessError(retcode, process.args,
> subprocess.CalledProcessError: Command '['/usr/local/google/home/tikuta/depot_tools/bootstrap-2@3.11.8.chromium.35_bin/python3/bin/python3', '/usr/local/google/home/tikuta/depot_tools/siso.py', 'metrics', 'summary', '-C', 'out/Default', '--step_types', 'trict_remote']' returned non-zero exit status 2.
> ```
>
> Original change's description:
> > Enable telemetry flags for Google corp machines only.
> >
> > Bug: b/348530235
> > Change-Id: I4ac32c60b806f44920bd06e31ec6c3b86a6a6964
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7104218
> > Commit-Queue: Alex Ovsienko <ovsienko@google.com>
> > Reviewed-by: Junji Watanabe <jwata@google.com>
>
> Bug: b/348530235
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: Iff13fa73745e09d2dab4278e9571f7ed77bf3d0c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7136522
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Alex Ovsienko <ovsienko@google.com>
> Commit-Queue: Alex Ovsienko <ovsienko@google.com>

Bug: b/348530235
Change-Id: I6307ea67de0045c705e087e1711b295c8cce4703
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7136644
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-09 20:17:56 -08:00
Takuto Ikuta
6f83fce865 Revert "Enable telemetry flags for Google corp machines only."
This reverts commit 4e2be179a1.

Reason for revert: 
This caused exception

```
+ autoninja -strict_remote -d keepdepfile -d keeprsp -C out/Default chrome
siso ninja -strict_remote -d keepdepfile -d keeprsp -C out/Default chrome
ninja: Entering directory `out/Default'
 4.51s init credentials by "credhelper"
https://console.cloud.google.com/logs/viewer?project=rbe-chrome-untrusted&resource=generic_task/task_id/25d8cbb8-4fa1-486d-ba78-7865d0eea5ac
use RBE instance "projects/rbe-chrome-untrusted/instances/default_instance"
 2.27s loading/recompacting deps log
 3.47s Regenerating ninja files
 1.17s load siso config
build finished
local:3636 remote:33214 cache:3317 cache-write:0(err:0) fallback:0 retry:0 skip:40752
reapi: ops: 102977(err:33221) / r:46503(err:8) 3.13GiB / w:72424(err:0) 152.35MiB
fs: ops: 2790971(err:182693) / r:227138(err:0) 6.68GiB / w:13508(err:4) 1.87GiB
    resource/capa used(err)  wait-avg |   s m |  serv-avg |   s m |
  pool=action/128   2372(0)     0.00s |█      |     0.30s | █▅▂▂▂ |
        rbe:sched  33214(0)     0.01s |▃█▂▂   |     6.43s |  ▂█▃▂ |
       rbe:worker  33214(0)     0.87s |    █  |     5.56s |  ▂█▃▂ |
 remoteexec/10240  33214(0)     0.10s |█▂▂▂   |    15.37s |   ██▂ |
 1.00s shutdown cloud logging/monitoring
4m08.96s Build Succeeded: 40167 steps - 161.34/s
flag provided but not defined: -enable_cloud_monitoring
summarize siso_metrics.json

 $ siso metrics summary -C <dir> \
    [--step_types <types>] \
    [--elapsed_time_sorting] \
    [--elapsed_time=run|step] \
    [--input siso_metrics.json]

summarize <dir>/.siso_metrics.json (--input)
as depot_tools/post_ninja_build_summary.py does.
  -C string
        ninja running directory, where siso_metrics.json exists (default ".")
  -elapsed_time string
        metrics to use for elapsed time. "run" or "step". "run": time to run local command or call remote execution.  "step": full duration for the step, including preproc, waiting resource to run command etc. (default "run")
  -elapsed_time_sorting
        Sort output by elapsed time instead of weighted time
  -input string
        filename of siso_metrics.json to summarize (default "siso_metrics.json")
  -step_types string
        semicolon separated glob patterns (go filepath.Match) for build-step grouping
Traceback (most recent call last):
  File "/usr/local/google/home/tikuta/depot_tools/post_build_ninja_summary.py", line 390, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/google/home/tikuta/depot_tools/post_build_ninja_summary.py", line 375, in main
    subprocess.run(cmd, check=True)
  File "/usr/local/google/home/tikuta/depot_tools/bootstrap-2@3.11.8.chromium.35_bin/python3/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/local/google/home/tikuta/depot_tools/bootstrap-2@3.11.8.chromium.35_bin/python3/bin/python3', '/usr/local/google/home/tikuta/depot_tools/siso.py', 'metrics', 'summary', '-C', 'out/Default', '--step_types', 'trict_remote']' returned non-zero exit status 2.
```

Original change's description:
> Enable telemetry flags for Google corp machines only.
>
> Bug: b/348530235
> Change-Id: I4ac32c60b806f44920bd06e31ec6c3b86a6a6964
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7104218
> Commit-Queue: Alex Ovsienko <ovsienko@google.com>
> Reviewed-by: Junji Watanabe <jwata@google.com>

Bug: b/348530235
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iff13fa73745e09d2dab4278e9571f7ed77bf3d0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7136522
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Alex Ovsienko <ovsienko@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-11-09 18:39:02 -08:00
Alex Ovsienko
4e2be179a1 Enable telemetry flags for Google corp machines only.
Bug: b/348530235
Change-Id: I4ac32c60b806f44920bd06e31ec6c3b86a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7104218
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
2025-11-09 17:13:31 -08:00
Vadim Shtayura
a8d3023ff0 Update led, bb and luci-auth.
To pick up
https://chromium.googlesource.com/infra/luci/luci-go/+/5b5ce41fe
https://chromium.googlesource.com/infra/luci/luci-go/+/b57ee531e

R=iannucci@chromium.org
BUG=b/458128780

Change-Id: I90b3bdbb7c9d6f8606f4bb699fd871724523ea0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7132481
Reviewed-by: Robbie Iannucci <iannucci@google.com>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
2025-11-07 15:18:13 -08:00