Commit Graph

12121 Commits (c6f8c88b92c0a63bf631bb04647572ac6390f82e)
 

Author SHA1 Message Date
Josiah Kiehl c6f8c88b92 Abort gclient-new-workdir on Btrfs snapshot failure
When attempting to create a Btrfs subvolume snapshot fails, the script
previously fell back to a slow file-by-file copy. This change modifies
the behavior to instead abort early if the source is detected to be a
Btrfs subvolume.

If the snapshot fails for a subvolume, the script now prints diagnostic
information to help the user troubleshoot and exits, saving the user
from an unexpectedly long copy operation. The fallback behavior is
preserved for non-subvolumes where snapshots are not supported.

This also adds unit tests for the new abort and diagnostic behaviors.

Change-Id: Ieee9fec08d9664d3bdffc255b6993fa2f6d8ad70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7713376
Commit-Queue: Josiah Kiehl <kiehl@google.com>
Reviewed-by: Erik Staab <estaab@google.com>
3 weeks ago
Ben Pastene 5e98835131 gclient: Support version_file in CIPD DEPS definitions
Instead of forcing all version strings for cipd package deps to be
embedded in the DEPS file like the following:
{
    'package': 'chromium/chrome/android/orderfiles/arm',
    'version': 'q1Xa79fpCv-do8mcyvDf8wV7Whf5M7CCojmM9R06R58C',
}

This CL supports pointing the dep to another file, like the following:
{
    'package': 'chromium/chrome/android/orderfiles/arm',
    'version_file': 'some/version/file.txt',
}

Then "some/version/file.txt" would be a plain text file in the repo
(relative to the DEPS file), that contains just the version string:
"q1Xa79fpCv-do8mcyvDf8wV7Whf5M7CCojmM9R06R58C".

Moving the version to another file would let Chrome's build graph
incorporate the version text file into it's dep list for relevant
targets. This would otherwise be difficult/impossible to do for the
whole DEPS file since there's way more stuff in DEPS than a single
CIPD package.

Bug: 448699364
Change-Id: I38debd2a0af48d15b894c8e88a5e3f2f59534bf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7007552
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Brian Ryner <bryner@google.com>
3 weeks ago
recipe-roller 316bb1e1c2 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/8685755100344509601

recipe_engine:
c452dab063
  c452dab (fancl@chromium.org)
      Roll provenance_broker to ca2431ca47b3f9ee4af25e48ff0c48b508a3382b

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: I4ae13beb324146b26d0d4c46f8d58ea67a8bda5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7720123
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 weeks ago
Russ Hamilton cdde2d99ce Change failing test list predicate to UNEXPECTED_MASK
This fixes an issue where flaky tests were not showing up in the
reported list.

Change-Id: I2de5510c530c4ba5258681e65de514348f9a47d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7716124
Auto-Submit: Russ Hamilton <behamilton@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Russ Hamilton <behamilton@google.com>
3 weeks ago
Dan Le Febvre 4e00b47c60 use an access token for lucicfg API calls instead of id token
id_token is not required and currently prevents LUCI auth one login from
working correctly with config validation presubmits. Please see bug for
more context.

Bug:b/496353787
Change-Id: I038871e2234878ed3a68bcacd187cc45cd31cc0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7707198
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
3 weeks ago
Louis Romero d12632a315 Add FREEZE detection in map-branches
This CL adds a new git-map-branches verbose
output: when a branch is frozen, it's now visible
when running `git map-branches -vvv`.

Fixed: 379846320
Change-Id: Ie6b35b9b727893e216e681e32701b302c3e9516c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7707352
Commit-Queue: Louis Romero <lpromero@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
3 weeks ago
Gavin Mak 3d11e3a2f0 Handle unknown HEAD gracefully in update_bootstrap
If a remote repo has no HEAD, running git_number.py causes
update_bootstrap to crash. Handle `(unknown)` HEAD branch better and fix
existing bug that passed re.MULTILINE to regex Pattern.search().

Bug: 492363028
Change-Id: Ie20311d50e84cfd075bf31df5da837da473a31ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7674291
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
3 weeks ago
Gavin Mak 8215972804 Fix shutil.move failure for root gclient paths
When `checkout_path` is the root directory, we cannot move the
entire root directory into itself (i.e. into `bad_scm_dir`).
Instead, we move its contents individually, skipping the
quarantine directory.

Change-Id: Id606b42cbf2cdd909b5677744e8c842f6c11a0f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7705375
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
3 weeks ago
Ziwen Lin f5c816648d [Depot Tools] Add skill-validator for SKILL.md presubmit checks
- A validation script (skill_validator.py) that checks required fields
    (name, description), naming conventions, YAML frontmatter, and
    directory name matching.
  - Unit tests for the validator (skill_validator_test.py).
  - A PRESUBMIT.py check (CheckSkillFiles) that automatically runs the
    validator when any SKILL.md file is modified.
  - A SKILL.md for the validator itself, so it can be invoked as
    /skill-validator.

TODO: add agents/PRESUBMIT.py in a follow-up CL

Change-Id: Ie55ef26efddd07c5f362bb0fa82f5a6893e66edd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7693938
Reviewed-by: Erik Staab <estaab@google.com>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Ziwen Lin <ziwlin@microsoft.com>
4 weeks ago
recipe-roller f5a572610b 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/8686193614903977665

recipe_engine:
27aefcf0da
  27aefcf (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from d6756be19c83 to c26f1797c84d

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: I6691cc5030cc461006b2b8bf77787580aecef419
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7705381
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>
4 weeks ago
recipe-roller 69860df127 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/8686217522696700049

recipe_engine:
b13e3d33e4
  b13e3d3 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from f22a30ea9e29 to 4048470b2263

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: I09d921c3eba51da5151a869049bb37e364f88f3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7706148
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>
4 weeks ago
Erik Staab a3a4502a8b Add --number flag to mdformat calls
This is more human-readable for unrendered markdown
files.

Change-Id: I9c0f5419fa0174f67a07bf457103042e254fa25d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7607289
Reviewed-by: Sho Mizoe <shomizoe@google.com>
Commit-Queue: Erik Staab <estaab@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Erik Staab <estaab@google.com>
4 weeks ago
Gavin Mak d948009ec3 Support multiple gitlinks with the same hash in CheckForCommitObjects
Mapping the DEPS validation dictionary to a list of paths prevents
false-positive mismatch and unexpected entry errors when duplicating
submodules (e.g. during migrations).

Bug: 496212953
Change-Id: I34c4cad56b118392007285ffaf7aff48d7f316b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7702032
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
4 weeks ago
rop ce1ebad2c3 Add various licenses to allowlist
Licenses added: Public-Domain-Ross-Williams, RFC, curl, ietf

Note that curl was in the wrong list, it is an spdx id.
https://spdx.org/licenses/curl

Bug: 455011723, 451723867
Change-Id: I423d6109d320b54e59353587a48e96b4335e9726
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7698986
Commit-Queue: Jordan Brown <rop@google.com>
Reviewed-by: Jiewei Qian <qjw@chromium.org>
4 weeks ago
Jordan Brown be9dc5976e Require valid update mechanism exceptions
See example CL [0]  and metadata validator output [1]

[0] https://chromium-review.git.corp.google.com/c/chromium/src/+/7684428/2/third_party/blink/web_tests/images/jpeg-suite/README.chromium

[1] https://ci.chromium.org/ui/p/chromium/builders/try/linux-metadata-validator/900/overview

Change-Id: I3d67f422073f0466f9f2c445616c4423d3f6f79d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7690020
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Commit-Queue: Jordan Brown <rop@google.com>
4 weeks ago
Jordan Brown 7d747a5c34 Add TU-Berlin-1.0 to license allowlist
Bug: 490504075
Change-Id: I48e08cac0ffec4132fe83e10c3deb75b998fd7e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7693962
Commit-Queue: Jordan Brown <rop@google.com>
Auto-Submit: Jordan Brown <rop@google.com>
Reviewed-by: Jiewei Qian <qjw@chromium.org>
4 weeks ago
Justin cd20cedcbe depot_tools: rename --reflink to --copy-on-write in gclient-new-workdir
Rename the --reflink and --no-reflink flags to --copy-on-write and
--no-copy-on-write to use a more generic, cross-platform term. The old
names are retained as hidden, deprecated aliases for backward
compatibility.

Change-Id: I29a3c3326fa30171d796a1d34e877eb70d88e23f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7697452
Reviewed-by: Erik Staab <estaab@google.com>
Commit-Queue: Erik Staab <estaab@google.com>
Auto-Submit: Justin Cohen <justincohen@google.com>
4 weeks ago
Gavin Mak e9512dd3ca Fix git cl patch -n incorrectly setting last-upload-hash
Skip setting `last-upload-hash` and `gerrit-squash-hash` when no commit
is created. This prevents upload from producing incorrect diffs during
subsequent uploads.

Bug: 489740364
Change-Id: I3819fe94b18e7982b11cd669535b4d16cace9129
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7662436
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
4 weeks ago
Justin 7bf52a69c3 Optimize macOS reflink copies in gclient-new-workdir
Replaces the subprocess call to cp -a -c on Darwin with a direct call to
the native macOS clonefile C API via ctypes. This provides faster,
OS-level APFS copy-on-write directory cloning.

Change-Id: I6058d19a5a9a73fff2e8cc2b0d926695bb418487
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7691305
Commit-Queue: Justin Cohen <justincohen@google.com>
Reviewed-by: Kirubel Aklilu <kaklilu@chromium.org>
Reviewed-by: Erik Staab <estaab@google.com>
4 weeks ago
Ashwin Verleker 4a2ca60bef Add the heartbeat argument to autoninja when it is invoked from an AI agent
Bug: 467713994
Change-Id: Id2e2422b5738f5484a128fcd93e394d89c1efec3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7655172
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Erik Staab <estaab@google.com>
Commit-Queue: Ashwin Verleker <ashwinpv@google.com>
4 weeks ago
Erik Staab 416ff6088d Change estaab OWNERS to google.com
Change-Id: I9ee1b2b866e0ac02c0db2017f28509676a54148f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7693513
Auto-Submit: Erik Staab <estaab@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
4 weeks ago
Alex Ovsienko 2e5b239d79 depot_tools: use CREATE_NO_WINDOW for Windows as it produces no
persistent windows.

Bug: b/495538195
Change-Id: I450358094725f0e4ffa54c9a2e54a4816a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7695677
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
Auto-Submit: Alex Ovsienko <ovsienko@google.com>
Reviewed-by: Greg Thompson <grt@chromium.org>
4 weeks ago
Alex Ovsienko a93a14858d depot_tools: on windows have CREATE_NO_WINDOW set for creation flags.
Bug: b/495538195
Change-Id: I0173beab8785d63a2d4cc8dd1427ac8d6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7695898
Auto-Submit: Alex Ovsienko <ovsienko@google.com>
Commit-Queue: Greg Thompson <grt@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
4 weeks ago
recipe-roller d5c8d9fb01 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/8686495605358440577

recipe_engine:
52702646ee
  5270264 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from b526998233b7 to 8cb5bd940d5f

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: I09a12f9da1aca923a81b61a04f75a925fb0520a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7695423
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>
4 weeks ago
Josiah Kiehl 145eee0201 Exit early in git cl patch if creating a new branch fails
If creating the branch fails for any reason, one reason being the
branch already exists, then cl patch will ignore the error and
continue to apply the cherry-pick to the current branch, which is
likely not what the user wants. This CL adds an early exit for branch
create failures.

Change-Id: Iad31bac4a19e8da0c25409d388f96cdd85c44e0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7666361
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josiah Kiehl <kiehl@google.com>
1 month ago
Sunny Sachanandani 315fe92361 gclient-new-workdir: Merge git repo linking flags into --max-depth
Merge --link-root-git-repo-only and --link-all-git-sub-repos into a
single --max-depth flag.

The default is 1 if copy-on-write is supported (reflink), which links
the workspace sub-directories (like src) but skips deeper levels.
Otherwise, the default is -1 (no limit).

Also allow following symlinks when walking the directory tree so that
we can symlink nested third_party directories in the workspace and
still have them linked for git with --max-depth=1. For example with
the following directory structure:

primary/.gclient
primary/src
primary/dawn -> src/third_party/dawn

Running `gclient-new-workdir.py primary secondary --max-depth=1` will
link (with symlinks or git worktree) both src/.git and src/dawn/.git in
the secondary workspace.

Change-Id: Ia2b38a5a63cfeafc48f1e976c0fbb94d6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7686111
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
1 month ago
Sunny Sachanandani 40b296d214 gclient-new-workdir: Detach HEAD in --use-git-symlinks mode
For safety, it's good practice to detach HEAD in the workdir when its
.git directory is linked to the primary repository to avoid accidentally
mutating the same branch concurrently.

Change-Id: Id5bb522c1a1ddb98257e283cd0e482ee6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7682535
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 month ago
Russ Hamilton 9922fe92e1 Improve flexibility of luci-test-results skill
Change-Id: Ibd9e96611278d10239a4975188268928651048ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7684099
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Russ Hamilton <behamilton@google.com>
1 month ago
Russ Hamilton 3dde7d222e Fix luci-test-results skill
The instructions for the skill were missing the project flag needed by
`resolve-build-id`, which is now set to "chrome" in the example. Also,
`list-failures` was passing an incorrect protobuf to the
`luci.resultdb.v1.ResultDB.QueryTestVariants` RPC - the predicate is of
type `TestVariantPredicate`, but it was providing a
`TestResultPredicate`. This resulted in the predicate being silently
ignored.

Change-Id: Ie273b00be37ebaf3ee0b59c407c29da48d4003ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7656545
Auto-Submit: Russ Hamilton <behamilton@google.com>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Russ Hamilton <behamilton@google.com>
1 month ago
Alex Ovsienko 983ff6c520 depot_tools: unify format folder for bots and developers.
Change-Id: Ie98e64a5fe3cf52e13246e9fa9a06be66a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7683351
Reviewed-by: Junji Watanabe <jwata@google.com>
Auto-Submit: Alex Ovsienko <ovsienko@google.com>
Commit-Queue: Alex Ovsienko <ovsienko@google.com>
1 month ago
Sunny Sachanandani 8e07900125 gclient-new-workdir: Use git worktree
Allow using git worktree to link the copied (sub)-repositories back to
the original. Since we try to use copy-on-write by default, we have to
mimic some of what `git worktree add` does since it doesn't work well
when the worktree directory already exists.

This functionality is behind the `--use-git-worktree` flag which is
disabled by default and there's a `--use-git-symlinks` flag which uses
the old symlink code path instead of git worktree.

Change-Id: I1bb8bf3ec81a5d1dc923670d66944b466a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7675410
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
1 month ago
Peter Wen d819b798b7 siso: Add ANTIGRAVITY_AGENT to AI_AGENT list
Add ANTIGRAVITY_AGENT=1 to the list of environment variables used to
identify an AI agent in siso.py.

When an AI agent is detected, siso prepends --quiet --batch=false to
ninja commands to improve latency and reduce context pollution.

Bug: None
Change-Id: I22b2252f527a7e4ad0384ddb53c4c18e3270beb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7674579
Reviewed-by: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Auto-Submit: Peter Wen <wnwen@chromium.org>
1 month ago
Julia Hansbrough 95d1432b5c [presubmit,rust] Omit rust files from the line length presubmit check.
rustfmt and the line length checker, at present, disagree about the proper formatting for certain files.

Since rustfmt already wraps things to an appropriate length, the additional check from this presubmit is redundant; therefore, let's except Rust files from it.

Bug: 492035293
Change-Id: Ia03e998727e8d1ade54b4510aa5317be9a20f9f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7665158
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Julia Hansbrough <flowerhack@google.com>
1 month ago
Allen Li 31b7aaa3ee [git cl] Handle stray corp URLs
These URLs might get pasted into, e.g. git cl patch, so we rewrite
them so everything continues to work.

Bug: 487545425
Change-Id: I6f9ff56ad82b9b43529a31160e92e81429348de2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7644979
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
1 month ago
James Woo 4e58caf8aa metrics: Check for Cog in metrics collector
Add an env var to show if the user is in a Cog workspace. This is needed
to accurately compare sync times for edit monitor control and enabled
groups. Edit monitor will never run in Cog, so we need to filter out Cog
workspaces from the control group.

Bug: b:479871142
Change-Id: I29a40c66bcfd1dea8d17cc17dfb9cb729299f1c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7668825
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: James Woo <jewoo@google.com>
1 month ago
Stav Nir 6b62257bd9 siso: fix local build latency for AI agents
Siso defaults fast_nop, fast_local, fast_last_failure, fast_exit
to false when stdout is not a TTY. This makes no-op and small
builds under AI agent envs slower. Prepend --batch=false and
--quiet in siso.py.

Move --quiet from autoninja.py to siso.py. Generalise the
GEMINI_CLI detection to recognise Claude Code, Codex, Cursor
and a generic AI_AGENT env var.

Bug: 484983987
Change-Id: I32f4999e96246f3210cd209b368e283ece657f62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7580119
Auto-Submit: Stav Nir <stav.nir@island.io>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Alex Ovsienko <ovsienko@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
1 month ago
Sunny Sachanandani b478a061f2 gclient-new-workdir: Add --link-root-git-repo-only flag
Add new --link-root-git-repo-only and --link-all-git-sub-repos flags to
gclient-new-workdir to only copy/reflink the top level git repository
e.g. chromium/src since most users only care about the top level
repository and we can skip walking the directory tree or linking .git
directories for sub-repositories. This is set to default if btrfs
subvolume snapshots or reflinks are used for copying since
sub-repositories will already be in the copy. However, the .git folders
won't be linked for the sub-repositories so there's a
--link-all-git-sub-repos flag for users who don't want this behavior.

Change-Id: I786de60b864d4a98f8e6dabf5b2de62f6a6a6964
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7654938
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
1 month ago
Vadim Shtayura 74584e96d4 Roll cipd to v2.7.11.
To pick up
https://chromium.googlesource.com/infra/luci/luci-go/+/ef258c61a38
https://chromium.googlesource.com/infra/infra/+/09ad27bb7a4

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

Change-Id: I8367dbd3298917e71b7e2a65f4ffcd22e2f2b590
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7662435
Reviewed-by: Robbie Iannucci <iannucci@google.com>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
1 month ago
recipe-roller 27acdb6426 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/8687509158665020353

recipe_engine:
8cca60077c
  8cca600 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 4a1223e49952 to 09ad27bb7a42

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: Ic4af070967d94325a602e02f80bd4b9677e330c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7662481
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
1 month ago
recipe-roller 3de3b74fc6 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/8687516707999138897

recipe_engine:
2fb4b67761
  2fb4b67 (tbain@google.com)
      [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: I9ab50ceb29f8c8e8a9fd6ea48c84f4d4a5235761
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7662468
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
1 month ago
Kirubel a4e677522d Make gclient-new-workdir.py work on Mac.
This script currently fails when run on Mac with the following error:
`cp: illegal option -- -`.

Mac uses `cp -c` to trigger copy-on-write rather than `cp --reflink`.

I tested this by running on my machine and verified that a new
workdir was created without copying the underlying data:
https://paste.googleplex.com/4994555217838080

Change-Id: I4c2893f1309ebd3a907a5790f892a557e3bfce9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7653739
Reviewed-by: Michal Mocny <mmocny@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Kirubel Aklilu <kaklilu@chromium.org>
1 month ago
Vadim Shtayura 4ce8ba39a3 Update luci-auth tool to v1.6.3.
To pick up
https://chromium.googlesource.com/infra/luci/luci-go/+/aea7c1cc1ba296abb5

R=dlf@google.com

Change-Id: I1ffe9992900205620066e24dd0e212d83214d299
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7639509
Reviewed-by: Dan Le Febvre <dlf@google.com>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
2 months ago
James Woo aceafdaa59 [Metrics] Detect Edit Monitor state via pgrep
Replaces the EDIT_MONITOR_STATE environment variable detection with a
robust process check for Chrome developers. depot_tools will now
dynamically invoke `pgrep` on Linux to check if the edit_monitor daemon
is actively running for the chrome target repo.

Bug: b:484022773
Change-Id: I9de9de32607aa128fc64253fe25ad0142d16fb2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7629800
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
Auto-Submit: James Woo <jewoo@google.com>
Commit-Queue: James Woo <jewoo@google.com>
2 months ago
recipe-roller a1e573faed 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/8688199330244750225

recipe_engine:
361e88e4c3
  361e88e (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 1bc4b4239487 to eefaa865c439

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: Ib01104eb1ddbc1ab4fa893166fb18f55ed08f2c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7635585
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
recipe-roller 2167887d78 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/8688233302222900737

recipe_engine:
b885497a34
  b885497 (mohrr@google.com)
      [buildbucket] Support execution_timeout for generic builds

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: I7804fba0612a1c4fcab61bde2577d4bfd63f8ede
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7633300
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
Dan Le Febvre 27f8f7c421 Roll tools that use luci-auth
Luci auth now supports credential helpers and so any tool that uses
luci-auth for authentication can now benefit from this.

Bug:b/342261857
Change-Id: I78182ffe58062fbe4cec9e231fa8f1d7732e2faf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7629397
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Dan Le Febvre <dlf@google.com>
2 months ago
Dan Le Febvre 6a281ea36d Roll CIPD cli
There shouldn't be any changes to the CLI itself however it's been a
a long time since the last roll. One notable change to dependencies is
the addition of credential helpers in luci-auth which the CLI uses
for auth.

Bug:b/342261857
Change-Id: I6a5f80cdbc54c747b098a548ebb042f665cbb147
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7629396
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Dan Le Febvre <dlf@google.com>
2 months ago
James Woo d6aae1009f autoninja, metrics: Record edit_monitor_state
The Chromium Edit Monitor is a background file-watcher daemon used to
gather data on developer edit events. To ensure this daemon does not
starve system resources or silently regress compile times, it must pass
a performance Launch Review.

To conduct fleet-wide apples-to-apples latency comparisons, we need
to segment the build and sync telemetry by whether the developer is
currently running the daemon.

This CL updates the client-side wrappers:
1. metrics_utils: Checks the environment for EDIT_MONITOR_STATE.
2. ninjalog_uploader: Injects the state into the metadata payload
   sent to the chromium_build_stats backend.
3. metrics: Injects the state into the env_vars repeated field
   array sent to the depot_tools_metrics backend for gclient sync
   operations.

Bug: b:484022773
Change-Id: I16ddc4d162b5567185b8808a5d05823f1d010895
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7610040
Auto-Submit: James Woo <jewoo@google.com>
Commit-Queue: James Woo <jewoo@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
2 months ago
recipe-roller 63873c5535 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/8688347810214288641

recipe_engine:
5221066282
  5221066 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 15a26f979961 to a61d4d67348b

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: I6e57e740dfaaa38a818d880624f04faecc0273b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7627541
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
recipe-roller f71f52b78c 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/8688367942208088321

recipe_engine:
9b440af398
  9b440af (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from e118d99ee508 to 5a9e45463a87

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: I579d08d2440812947abe2f53d6908c76e28fdfd6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7625461
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