Commit Graph

11931 Commits

Author SHA1 Message Date
jj
80d6ca1b1a Replace deprecated ast types with ast.Constant
ast.Str et al. have been deprecated since Py3.8 and have been
completely removed in 3.14. Replace their usage with ast.Constant.

This change should not have any functional impact, since
according to [1]:
> Changed in version 3.8: Class ast.Constant is now used for
> all constants.
> Deprecated since version 3.8: Old classes ast.Num, ast.Str,
> [...]  instantiating them will return an instance of a
> different class.

[1] https://docs.python.org/3/library/ast.html

Bug: 40283283
Change-Id: I0ed8ef3910f921483bff118976f516c5a935e0fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7228507
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: jj <jj@chromium.org>
2025-12-05 11:47:42 -08:00
Yiwei Zhang
e0a877ed8f Revert "git_auth: Handle conflicting stale local config"
This reverts commit e96cff71c9.

Reason for revert: causing https://issues.chromium.org/466343784

Original change's description:
> git_auth: Handle conflicting stale local config
>
> As we prefer configuring the global config, it's possible to leave
> stale local config behind if the user is swapping between emails.
>
> Change-Id: I86e2cda33a90b603e52d525fcb564fb0a5a68eab
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7213753
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Allen Li <ayatane@chromium.org>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iec8ce86a6d17b26e5cc3940a38c6510ad3f855be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7231141
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2025-12-05 09:56:59 -08:00
recipe-roller
f0d44b0b80 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/8696346766417701489

recipe_engine:
96cffe4dce
  96cffe4 (dlf@google.com)
      [bcid] update broker version to include client info

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: Idd315b43039b1eda52222cb7059bb63a60371d95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7231126
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-12-04 22:11:19 -08:00
Alex Ovsienko
f2ac99f082 siso: make sure we don't try to kill process 0 if it gets returned.
Bug: b/455433899
Change-Id: I8d4e6df5a374e97c0d790fe608964c6f6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7220270
Auto-Submit: Alex Ovsienko <ovsienko@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
2025-12-04 21:36:50 -08:00
Allen Li
e96cff71c9 git_auth: Handle conflicting stale local config
As we prefer configuring the global config, it's possible to leave
stale local config behind if the user is swapping between emails.

Change-Id: I86e2cda33a90b603e52d525fcb564fb0a5a68eab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7213753
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-12-04 15:15:29 -08:00
Josiah Kiehl
4b799c1e8d Fix presubmit feedback message unit test for cog environments.
Add a test case to verify the presubmit feedback message when running in
a cog environment.

Change-Id: I82baf94f53a53108abb32069d3dcf714222a3353
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7229612
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josiah Kiehl <kiehl@google.com>
2025-12-04 14:39:20 -08:00
Garrett Beaty
f525e4eb3c Update bot_update to provide manifest information for source check
This updates _EnabledTurboCiCheckHandler.set_result so that it adds a
BotUpdateResults when finalizing the associated source check. This
result provides information about all of the unpatched revisions that
were checked out.

Bug: b:443496677
Change-Id: I5ea0f798ef720e02fa130ec108a44d273187d964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7227736
Reviewed-by: Robbie Iannucci <iannucci@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
2025-12-04 12:11:32 -08:00
recipe-roller
8239385e8c 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/8696387031203521041

recipe_engine:
be2fd9467e
  be2fd94 (mohrr@google.com)
      [proto_support] Regen proto files if code changes

Please check the following references for more information:
- autoroller, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#autoroller
- rollback, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/workflow.md#rollback
- cross-repo dependencies, https://chromium.googlesource.com/infra/luci/recipes-py/+/main/doc/cross_repo.md

Use https://goo.gl/noib3a to file a bug.

R=iannucci@chromium.org

Recipe-Tryjob-Bypass-Reason: Autoroller
Ignore-Freeze: Autoroller
Bugdroid-Send-Email: False
Change-Id: I3b43e0e1d5b0d15e2958df94778a18e79644b384
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7229615
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-12-04 11:33:19 -08:00
Garrett Beaty
d247f48cf9 Import depot_tools protos for TurboCI checks
This adds a script for updating the depot_tools protos and imports the
initial version. This provides the BotUpdateResults type for reporting
the revisions that were checked out by bot_update in its associated
source check.

Bug: b:443496677
Change-Id: I8b67dcf1419c48f2a684c59c265fbe1caa9f0d43
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7227735
Reviewed-by: Robbie Iannucci <iannucci@google.com>
Commit-Queue: Robbie Iannucci <iannucci@google.com>
Auto-Submit: Garrett Beaty <gbeaty@google.com>
2025-12-04 11:21:22 -08:00
recipe-roller
ca8016344f 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/8696393324135706785

recipe_engine:
bac57021e7
  bac5702 (gbeaty@chromium.org)
      Update turboci proto update script to exclude depot_tools 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: I2de278203612ae69b1938701c8cda38a066f2f16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7229290
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-12-04 09:53:13 -08:00
Will Yeager
413ad24ec4 [mac_toolchain] roll mac_toolchain version on osx_sdk recipe module
This includes:
- https://crrev.com/c/7224890 Retry adding runtimes after duplicate
- https://crrev.com/c/7225999 Get rid of log spam from running gktool

Bug:462643928
Change-Id: Id9e1d8f41843b9a67fe8004070c31eff263efefb
Recipe-Nontrivial-Roll: infra
Recipe-Nontrivial-Roll: build_internal
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7226355
Reviewed-by: Yue She <yueshe@google.com>
Commit-Queue: Will Yeager <wyeager@google.com>
2025-12-04 09:15:11 -08:00
Allen Li
85116f1710 git_auth: Add messaging about setting global config
Change-Id: I4b95e88f1d7a1e20c9e44258a4276b07fc0769fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7213752
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-12-03 18:26:42 -08:00
Gavin Mak
315ff3b4ec Ensure bot_update env has CHROME_HEADLESS=1
This setting ensures that bot_update/gclient will delete conflicting
directories instead of moving them to _bad_scm, which avoids wasting
disk space on bots.

Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_internal
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: 462013257
Change-Id: I247427179205bf22bd24d142fa851d6628846a48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7208105
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2025-12-03 13:09:02 -08:00
recipe-roller
de2b9aa7a6 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/8696473225333453457

recipe_engine:
5048d96a8f
  5048d96 (mohrr@google.com)
      [proto_support] Allow including file stem in ns

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: Iaaf9f85560904d4443ac837def70b93a7e73a5ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7224046
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-12-03 12:45:47 -08:00
Garrett Beaty
10902bc85f Fix repo urls and ref:revision syntax handling for bot_update test data
crrev.com/c/7152830 overhauled how the bot_update output json was
generated but neglected to handle the ref:revision syntax and
crrev.com/c/7147310 added a test data method to enable overriding the
URLs returned for the repos but neglected to actually pass it to the
output_json method. This change rectifies both issues.

Change-Id: I604b0d7ff3f7e68e4829624e5de66efa2f5a61b0
Recipe-Nontrivial-Roll: build
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7219689
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
2025-12-03 11:21:36 -08:00
recipe-roller
78d752fc04 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/8696485174757873889

recipe_engine:
e3eb8b49a6
  e3eb8b4 (mohrr@google.com)
      Revert "[proto_support] Add support for inline proto defs"

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: Ia6df40e2724cee5b5248f3ab6b7ede0374b7ae9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7224039
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-12-03 09:30:02 -08:00
Garrett Beaty
f82399f263 Cleanup bot_update TurboCI code.
This adds and fixes documentation for the TurboCI check handler types
and the turboci_check_id parameter to bot_update.ensure_checkout.
Additionally, the gclient_config to _TurboCICheckHandler.create and
_EnabledTurboCiCheckHandler.__init__ was removed because the gclient
config wasn't being used.

Bug: b:443496677
Change-Id: I4acc3170522735e63062bed47f555aabcd2a4304
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7172970
Auto-Submit: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Garrett Beaty <gbeaty@google.com>
Reviewed-by: Robbie Iannucci <iannucci@google.com>
2025-12-03 09:24:23 -08:00
Peter Wen
04f3706a63 git_cl.py: Process comments as threads
Refactor GetCommentsSummary to group individual comments into threads. A
thread is considered unresolved if and only if its last comment is
unresolved.

This fixes a bug where a resolved thread (one that had been replied to
and the resolved box checked in the reply) would still appear with the
--unresolved flag, because the initial comment in the thread is
permanently marked as unresolved.

This change also introduces a CommentInfo dataclass to improve
ergonomics for handling comment data from the Gerrit API.

The display of comments have not been made thread-aware to reduce the
scope of this change.

R=agrieve@chromium.org

Bug: 463411949
Fixed: 463411949
Change-Id: I966f011140ee3874b54d8afbbe00caed7bbe14eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7200823
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
2025-12-03 06:16:04 -08:00
Peter Wen
f3aeb370c2 gitignore: Ignore gemini-cli configs
This prevents local configuration files for gemini-cli from being
tracked.

R=yiwzhang@google.com

Bug: None
Change-Id: I53563f5cfcfebec4758dc40c1edf747cd89fc6c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7217429
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
2025-12-03 06:12:54 -08:00
Allen Li
9238ab49b6 git_auth: Inline single use helpers
Change-Id: I5ca184b59a3d592bb4121e8f4a9ec2e54665ef57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7173366
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-12-02 17:12:59 -08:00
Allen Li
1acf6d271e git_auth: Configure both variations of Gerrit hosts
ChromeOS sometimes uses -review URLs, so we should support both

Bug: 419182970
Change-Id: I9a3836f5544a8422ccda8ded6e9d88d5a10edda2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7173365
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-12-02 16:35:21 -08:00
Ben Joyce
a99ce048b9 Add structured test id upload support to resuldb uploader
Not sure how to roll this to src after landing.
This is similar to changes for structured-test-ids in changes such as:
https://source.chromium.org/chromium/chromium/src/+/main:testing/scripts/common.py;l=203?q=common.py&ss=chromium

Bug:418015486
Change-Id: I742a6a9e7b04735e31aa1b893a1cbffc9d6e3188
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7173696
Commit-Queue: Benjamin Joyce (Ben) <bjoyce@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
2025-12-02 14:08:33 -08:00
recipe-roller
115fbc83d3 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/8696564452069831105

recipe_engine:
fe00cd14be
  fe00cd1 (mohrr@google.com)
      [proto_support] Add support for inline proto defs

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: I70c8fb0196d7fb5786b4489d3aa667fc8a276dec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7218149
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-12-02 12:30:10 -08:00
Alex Ovsienko
db99cc40f5 siso: do not have _is_subcommand_present print to stdout.
Bug: b/455433899
Change-Id: I20a840669538c1a48a645226b949b37f6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7205887
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-12-01 17:09:47 -08:00
Alex Ovsienko
f32e176f94 Add an extra check that gcert is installed on machine to make sure that the user is googler.
Bug: b/462556449
Change-Id: I2afff69ee202659e23d822c59dd4cc166a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7201883
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-12-01 17:01:18 -08:00
Alex Ovsienko
4d6030e6b1 siso: create function to kill potentially running collector.
It checks running processed for what ports they occupy and kills the first process that occupies otlp_health_port that is known from config and quits.

Bug: b/455433899

Change-Id: Ib588be4c44021e55c67f1601040ac72a6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7183397
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-12-01 16:53:57 -08:00
Alex Ovsienko
a0a276ebbf siso: super nit: remove redundant env.
Change-Id: Ieb3b749bbb5427bb6c3c4426f8ed00f56a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7205906
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
2025-12-01 15:38:00 -08:00
Scott Lee
2e88a3f08b Add unidiff-zero to git apply
The presubmit format validation hook and git cl format is given or
generate a patch such that they check/format the modified lines only.

The context lines matter because the diff parsers extract the line
numbers and length from the diffs, which include the context lines,
if included. For instance, if a patch is generated with -U3,
the presubmit hook actually verifies the format of not only the changed
lines but also the context lines. Therefore, it's important to make sure
that all the diff(s) commands use the same -U to ensure that they check
and format the same lines.

crrev.com/c/6952890 was submitted to match the context line numbers.
However, it was missing one case. The Chromium Cider extension also
generates the diff but with -U3. Therefore, cl/834917755 was made
to have it generating patches with -U0.

Another issue is that "git apply" fails by default if a given patch
was generated with -U0. It expects context lines in case a user tries
to apply a patch into a different commit so that it could adjust
the patches and applies even if the location of the corresponding,
original block has changed in the file to apply the patch.

However, the scenario of smartly modifying the patch to make it
applicable to as many commits as possible is not applicable to
depot_tools' case. The patch is not made to be shared with others.
It's generated instantly for a specific, base commit and applies it
to the current commit.

"--unidiff-zero" is the option to allow patches even if it was
generated with -U0. It's fine to use the option because the smart
patch adjustment is not applicable to our use cases.

This CL adds the option to _ProvidedDiffCache() so that it is
happy with the patch generated with -U0. The reason why the other
functionalities have been working, even though crrev.com/c/6952890
changed the context option to -U0 is that other logic doesn't use
`git apply`. They just parse the hunks and use the numbers.

Bug: 458442277
Change-Id: I8af98e9a8bcbd8d3175a162fced127ff89ce526c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7211480
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-12-01 11:16:31 -08:00
recipe-roller
c81b50d234 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/8696713554064433681

recipe_engine:
ce0a39983e
  ce0a399 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from f1d8bd5336c2 to 808a00437f24

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: I3e90fc55ec03d943dd0f904eefa6d5ef1fc848ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7212855
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-30 21:03:15 -08:00
recipe-roller
8efa575d75 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/8697298663310477905

recipe_engine:
b0770b386a
  b0770b3 (mohrr@google.com)
      [proto_support] Add annotations

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: I078a0fdb21dacb64f322debb4e165c757a3a55f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7199562
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-24 10:01:30 -08:00
recipe-roller
df5ba92104 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/8697301810701217473

recipe_engine:
ed7a3b07e2
  ed7a3b0 (mohrr@google.com)
      [post_process] Add annotations

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: Idb5b87ef2636aec90b11e27e841f148fb04bbc81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7199560
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-24 09:09:40 -08:00
Adam Norberg
3d401c263f Caffeinate fetches on Mac.
Since fetches involve multiple subprocess calls, any of which can be
slow, the per-subprocess caffeination strategy does not seem suitable --
the Mac might sleep as soon as the wake lock is dropped, before it
starts a new one. This instead implements a context manager to allow
caffeinating a scope.

To allow flag control, caffeinate.scope takes an argument that decides
whether or not it should actually do anything useful; it looks silly,
but the alternative is to interfere with flag parsing more or to require
users to write separate codepaths to decide whether to enter the context
manager scope or not; the "use the context manager in a mode where it
does not do anything" prevents this.

Bug: 462507017
Change-Id: Icc5bb9cadda30b5a120f112b10bf96ffd3b6550f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7183647
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Adam Norberg <norberg@google.com>
2025-11-21 14:01:25 -08:00
recipe-roller
b738decbef 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/8697564792098587057

recipe_engine:
e0473ea340
  e0473ea (mohrr@google.com)
      [recipe_deps] Add annotations

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: I1c11e02550cb80a5e4b8dfa2a5699da661b61d9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7187026
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-21 11:31:29 -08:00
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