Commit Graph

11931 Commits

Author SHA1 Message Date
Riley
6be1145103 [lucicfg] Update v1.45.8 -> v1.45.9
Most notable change is adding gardened only filter for builder health
notifiers.

Bug: 407539622
Change-Id: Ied811bcc25f9ff3ea8dba69aaed4b046ab40db92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6974850
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Riley Wong <rgw@google.com>
2025-09-23 09:53:06 -07:00
recipe-roller
6c58dbde8a 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/8702928887524525793

recipe_engine:
caad8510cc
  caad851 (mohrr@google.com)
      Add 'API' and 'TEST_API' to '__init__.py'

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: I957f90389d952c01b39e7e19b284de0c8f51e4a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6976475
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-09-23 07:31:27 -07:00
Jiewei Qian
9b361d9c09 git-cl: catch "ReAuth is required" error and re-raise is properly
This CL updates _RunGitPushWithTraces to detect git credential-luci
"ReAuth is required" error and propagate it nicely to the caller.

Previously, the error is uncaught, and re-raised with nested exception
stacktrace. The result was an unhelpful traceback, where the true error
is at the top (part of git push stdout/stderr).

This CL now propagate the error with a clear GitPushError printed last
(which hopefully gets developer's attention).

Fixed: 445532843
Change-Id: I789a6902b59af2c9df92fc7d013829afc4154dc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6954695
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
Auto-Submit: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
2025-09-22 15:06:26 -07:00
Jordan
8ab2a5350f Add 'Update Mechanism: Manual' to README.chromium files
R=ddoman@chromium.org

Bug: 445311061
Change-Id: Ic721217470317ed35e1506d7e79f13b5d2fb73f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6953483
Auto-Submit: Jordan Brown <rop@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-09-18 09:56:34 -07:00
recipe-roller
0d761e6db8 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/8703433460769875761

recipe_engine:
07e4e55ddf
  07e4e55 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 8542fcedab33 to 6645da847edf

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: I95e6803140638c18af69016e9a4177cad245d099
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6963197
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-09-17 17:55:06 -07:00
Steven Holte
a5397c7459 Refactor: Use f-strings for string formatting
Change-Id: I369fb3af4395b28ca840c9b9d4a5a5e0497da51d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6945150
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Steven Holte <holte@chromium.org>
2025-09-17 15:56:03 -07:00
Andrew Grieve
9d57bd01e8 git cl comments: Add --unresolved & improve --json-file
* Don't output to non-json format when --json-file is passed
* Format individual comments as JSON when --json-file is used
* Add "unresolved" field to comments
* --unresolved flag will show only unresolved comments
* Better error message when no issue is associated with the branch

I intend to use this to have gemini-cli fix comments:
https://chromium-review.googlesource.com/c/chromium/src/+/6944524

Change-Id: I3b4d594b065751a600661a89925c69ffbf22aed5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6944465
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
2025-09-17 11:28:23 -07:00
Jacek Dobrowolski
c932af8f97 Revert "git-cl: make SetReview ReAuth capable"
This reverts commit 6da6aecbb4.

Reason for revert: Breaks official chrome release.

Original change's description:
> git-cl: make SetReview ReAuth capable
>
> This CL changes SetReview to be ReAuth capable.
>
> This is a potential breaking change if an downstream script relies on
> gerrit_util.SetReview but hasn't implemented ReAuth.
>
> If this caused breakage, please refer to https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/gerrit_reauth.md#Troubleshooting for troubleshooting instructions.
>
> If the above doesn't work, please report a bug, then add `LUCI_BYPASS_REAUTH=1` to the environment to disable ReAuth for now.
>
> Bug: 442666611
> Change-Id: I7724f15f166f9975fc88be5d8e1c93be4e1ec302
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6939308
> Reviewed-by: Allen Li <ayatane@chromium.org>
> Reviewed-by: Scott Lee <ddoman@chromium.org>
> Commit-Queue: Jiewei Qian <qjw@chromium.org>

Bug: 442666611
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I7b7e769b5a8011d45e976e471d0f2e43f186e0c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6955930
Commit-Queue: Alex Kravchuk <alexanderkr@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Ben Mason <benmason@chromium.org>
2025-09-17 03:52:50 -07:00
Jiewei Qian
6da6aecbb4 git-cl: make SetReview ReAuth capable
This CL changes SetReview to be ReAuth capable.

This is a potential breaking change if an downstream script relies on
gerrit_util.SetReview but hasn't implemented ReAuth.

If this caused breakage, please refer to https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/gerrit_reauth.md#Troubleshooting for troubleshooting instructions.

If the above doesn't work, please report a bug, then add `LUCI_BYPASS_REAUTH=1` to the environment to disable ReAuth for now.

Bug: 442666611
Change-Id: I7724f15f166f9975fc88be5d8e1c93be4e1ec302
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6939308
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
2025-09-16 17:00:01 -07:00
Jiewei Qian
b6ec488e5e Roll git-credential-luci to support ReAuth on webrtc host
Bug: 443140587
Change-Id: I5f4ff4b9ed3e7841fca8314cc18fb6d5e7f04a5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6952195
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Chenlin Fan <fancl@chromium.org>
2025-09-16 16:50:21 -07:00
Scott Lee
927f7dad38 presubmit: use git diff -U0 for CheckPatchFormatted()
git cl format uses `git diff -U0` when it has to find the files
and ranges to format. Similarly, CiderG generates diffs with
-U0 and run presubmits for the checks.

However, the scm.py:GenerateDiff(), which CheckPatchFormatted() uses,
doesn't specify -U and it defaults to -U3.

This CL updates CheckPatchFormatted() to pass -U0 to
scm.py:GenerateDiff() so that Presubmit and git cl format are
always given diffs generated with -U0.

Bug: 386840832
Change-Id: I19479ab139b7dba8ba4e5e5fed89eca4d2e66412
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6952890
Auto-Submit: Scott Lee <ddoman@chromium.org>
Commit-Queue: Brian Ryner <bryner@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
2025-09-16 09:50:19 -07:00
Jiewei Qian
9d7425377e reauth: add reauth capabilities to HttpConn
This CL makes it possible to create HttpConn RPC calls with ReAuth
credential.

Callers can specify whether they want to fail when ReAuth token isn't
available, or fallback to access token.

Bug: 442666611
Change-Id: I748a01634eea8ebe321779c8ae4f52d7beed3407
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6938952
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
2025-09-16 00:32:10 -07:00
Jiewei Qian
024aacb38b auth.py: add ReAuth support
This CL adds ReAuth support to GerritAuthenticator. ReAuth token can be
obtained with a new get_authorization_header() call.

The task of obtaining such a token is delegated to different
authenticators to check if ReAuth is necessary, and if the existing
authentication token already satisfies ReAuth requirements.

Bug: 442666611
Change-Id: Ic661b868f1c61c653de0da43eb784ad5938342f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6914237
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
2025-09-16 00:15:47 -07:00
Scott Lee
35982166cc Reland "presubmit: update CheckPatchFormatted to pass --input_diff_file"
This reverts commit 3accee0833.

Reason for revert: Fixes have been made
- crrev.com/c/6939737
- crrev.com/c/6943433

Original change's description:
> Revert "presubmit: update CheckPatchFormatted to pass --input_diff_file"
>
> This reverts commit 4689d66abf.
>
> Reason for revert: causing issues in b/386840832
>
> Original change's description:
> > presubmit: update CheckPatchFormatted to pass --input_diff_file
> >
> > Once devs update depot_tools, this will take effect in both
> > terminal and CiderG
> >
> > TESTED: http://go/scrcast/NjM1MzE5NDc4NjQ4ODMyMHxmMzc3NGVlZi03Yg
> > Bug: 386840832
> > Change-Id: Ibb8f74bffd662eb330f61b9e82bcd75c09bbc232
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6937365
> > Commit-Queue: Scott Lee <ddoman@chromium.org>
> > Reviewed-by: Gavin Mak <gavinmak@google.com>
>
> Bug: 386840832
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: I0bb79952aab4e0fa29607c79ea14f13f2a2a7bb3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6939736
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Scott Lee <ddoman@chromium.org>

Bug: 386840832
Change-Id: I699e87ab7c2543b835a0cb94062ee2225b88af28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6944257
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-09-15 07:26:12 -07:00
recipe-roller
150db33178 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/8703898401963231233

recipe_engine:
af73739e9b
  af73739 (mark@chromium.org)
      Revert "Add cert pinning to `url` recipe_module"

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: I9c93144733e930bc5c6842fb5bf88294fa93874c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6944568
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-09-12 14:38:25 -07:00
Scott Lee
077e02a769 presubmit: generate a diff with prefix a/ and b/
Historically, git_cl.py and presubmit_support.py generated diffs
inconsistently.

==== git_cl.py ====
1) git_cl.py:_RunClangFormatDiff() assumed the input diff was
generated with --no-prefix. Therefore, it hard-coded -p0 as a param
for clang_format_diff.py. If the diff was generated without --no-prefix,
it would have to pass -p1 instead.

2) git_cl.py _RunYapf() and _RunGoogleJavaFormat assumed that
the input diff was generated with prefixes. Therefore,
it parsed the diffs, assuming that the diff was generated with
a/ and b/ prefixes.

This discrepancy wasn't an issue because each of the Run functions
generated and consumed the diffs within themselves. It became an issue
when https://crrev.com/c/6931775 was developed. The CL consolidated
the diff generation into a common function, so that all _Run functions
need to agree with the presence of the prefixes.

The CL changed _RunClangFormatDiff() to use -p1 instead of -p0,
mainly because
- it's the p level for the default git-diff option
- it's the p level for the unix diff util
- CiderG Chromium also generates the diff with the prefixes to
emulate the default diff output.
- I highly believe that --no-prefix was chosen for no reasons.
It seems to be a random choice to work with -p0.
- Either Java/Python or Clang wrapper should be changed.

==== presubmit_support.py ====

presubmit_support.py can be given a diff_file via --diff_file.
Otherwise, it generates the diff based on --upstream_commit.

a) it doesn't enforce the presence of the prefixes in the input
diff_file. As stated above, the Chromium extension generates
a diff with prefixes.

b) in contrast, when it is not given --diff_file, it generates
the diff with --no-prefix, and I don't find any reasons for it.
I believe that it's from a copy-pasted random choice.

==== the problem ====

This discarepancy became a problem, when crrev.com/c/6937365
was landed. It enforces git_cl.py and presubmit_support.py to agree
for the format of the input diff. That is, the presence of
the prefixes must be agreed by all the following.
- presubmit_support.py with --diff_file /tmp/abc
- presubmit_suppory.py without --diff_file /tmp/abc
- git cl format
- git cl format --input_diff_file /tmp/abc

==== possible solutions ====
Obviously, there are 3 choices.

1) update the regex and parsers of git_cl.py to auto detect the best
-p{num}.
This was the least preferred option, as it can be fragile.

2) update Chromium extension and git_cl.py to use --no-prefix.
i.e.,
- update the Chromium CiderG to generate diffs without the prefix.
- update the regex used in _ComputeFormatDiffLineRanges() to assume
that the input is generated with --no-prefix.
- change _RunClangFormatDiff() to pass -p0 instead of -p1.

3) update presubmit_support.py to generate diff without --no-prefix.

==== What this CL does ====
It implements (3).
- That is the default option for git-diff.
- I don't find obvious reasons to use --no-prefix.
- CiderG has been generating diffs with prefixes for weeks.
- It implies that presubmit_support.py works fine with a prefixed diff.

Bug: 386840832
Change-Id: Iac8a4fc30f101e70e3ccc56f9f8ee48198dfa833
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6939737
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-09-12 10:34:21 -07:00
Ergun Erdogmus
6b4f0bfc22 [DevToolsGardener] Fix git cl format --js --full causing an error
`RunGitDiffCmd` with `--name-only` returns the files separated
by a new line as a string and then `FindFilesToFormat` splits it
to convert it to a files list.

Previously, we were calling `keys()` on this list and it
was throwing an error. Simply returning the file names
should be enough.

See the failure in:
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket/8703934325829680961/+/u/Scripted_rolls/Update_Browser_Protocol_deps/Run_Browser_Protocol_script/stdout

Bug: 386840832
Change-Id: I7bf54089726a66867c9126b1c398e8e57cc6eb26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6943433
Reviewed-by: Scott Lee <ddoman@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-09-12 08:41:52 -07:00
Scott Lee
3accee0833 Revert "presubmit: update CheckPatchFormatted to pass --input_diff_file"
This reverts commit 4689d66abf.

Reason for revert: causing issues in b/386840832

Original change's description:
> presubmit: update CheckPatchFormatted to pass --input_diff_file
>
> Once devs update depot_tools, this will take effect in both
> terminal and CiderG
>
> TESTED: http://go/scrcast/NjM1MzE5NDc4NjQ4ODMyMHxmMzc3NGVlZi03Yg
> Bug: 386840832
> Change-Id: Ibb8f74bffd662eb330f61b9e82bcd75c09bbc232
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6937365
> Commit-Queue: Scott Lee <ddoman@chromium.org>
> Reviewed-by: Gavin Mak <gavinmak@google.com>

Bug: 386840832
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I0bb79952aab4e0fa29607c79ea14f13f2a2a7bb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6939736
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-09-11 16:29:34 -07:00
Benedikt Meurer
106981b2c9 [DIR_METADATA] Migrate from Monorail to Buganizer.
Bug: none
Change-Id: I6889f64ee04675b3da2c7f4c576d407cdb03d4d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6935512
Reviewed-by: Brian Ryner <bryner@google.com>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Brian Ryner <bryner@google.com>
2025-09-11 14:03:58 -07:00
Scott Lee
4689d66abf presubmit: update CheckPatchFormatted to pass --input_diff_file
Once devs update depot_tools, this will take effect in both
terminal and CiderG

TESTED: http://go/scrcast/NjM1MzE5NDc4NjQ4ODMyMHxmMzc3NGVlZi03Yg
Bug: 386840832
Change-Id: Ibb8f74bffd662eb330f61b9e82bcd75c09bbc232
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6937365
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-09-11 10:40:14 -07:00
Scott Lee
363e910475 git_cl: update the clang, java, and yapf formatters to be git-free
This makes the formatter runners to be git-free if --input_diff_file
is given. They still run `git diff`, if --diff is given. However,
for the purpose of making the presubmit check for format verification
git-free, it's ok as --diff is not used by the presubmit check.


Bug: 386840832
Change-Id: If5ab68fa4e2fec1aafa22e15ddeabb744993342b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6931775
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-09-11 10:28:39 -07:00
recipe-roller
f1e3fbdf09 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/8704032409770896913

recipe_engine:
d66b5b6a0c
  d66b5b6 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 43ec34cde4f8 to 49b2e707cefe

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: I50610b41674c18b55c850ec3cec943836600d562
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6939733
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-09-11 03:09:17 -07:00
Scott Lee
5ed7fd0ea5 git_cl: add --input_diff_file for git cl format
If the option is given, git cl format uses the input diff file to
determine the files and sections to format instead of git-diff.

The intended use case is to remove git dependencies in case
presubmit_support.py is executed with a diff file and it calls
presubmit_canned_checks.CheckPatchFormatted().

Bug: 386840832
Change-Id: Ia1eacd1bdb81731e07753df19ebf1d2470c9f1aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6912693
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
2025-09-10 14:38:11 -07:00
recipe-roller
88e06ae96e 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/8704153205978475953

recipe_engine:
61cd6d7ffe
  61cd6d7 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from fa42cfa51170 to 7b865aedb415

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: I92aa31b64b88aec18202cc91d70378dbc362b807
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6933960
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-09-09 19:09:18 -07:00
Jiewei Qian
958e89cc41 git-cl: disable git ASKPASS and TERMINAL_PROMPT
Disable interactive authentication so that git won't prompt for username
/ password when the LUCI access token or ReAuth token expired.

Bug: 443632112
Change-Id: Ie347042178facd113df0d96b1909097cebdbb400
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6918922
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
2025-09-09 16:42:12 -07:00
Jiewei Qian
3ca8f4784d Roll git-credential-luci
Rolls git-credential-luci to fix a few CLI UX issues.

Bug: 440438534
Change-Id: I440c4df28b2e657a0b924a1a77a380bbb824026c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6918923
Reviewed-by: Chenlin Fan <fancl@chromium.org>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Auto-Submit: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
2025-09-08 17:38:49 -07:00
recipe-roller
1eec93f8bf 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/8704260788248835889

recipe_engine:
bd938f90e1
  bd938f9 (mohrr@google.com)
      [buildbucket] Add created_by arguments in test APIs

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: Ie0f93c4269a14126e78cfe220bc3b4c11328f760
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6927110
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-09-08 14:44:47 -07:00
Gregg Tavares
424bd24d29 Change the PRESUBMIT TODO warning to ask for an issue #
An issue # is the preferred format. See
https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#comment-style
so the warning should suggest an issue #

Note: the check remains the same so just an owner will pass the check
even though owners leave the team making such TODOs useless.

Bug: 440305604
Change-Id: Id107ccb104437201e873d96670c595b84fd90ab7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6917466
Reviewed-by: Scott Lee <ddoman@chromium.org>
Auto-Submit: Gregg Tavares <gman@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2025-09-08 11:40:50 -07:00
Scott Lee
9c3171ffea git_cl: rename params and reduce indent
Cosmetic changes for consistent param names and unnecessary indents.

Bug: 400759419
Change-Id: I7845f0b059c66f4d6ceb8c4055d71b8704ff29fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6918336
Auto-Submit: Scott Lee <ddoman@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-09-05 11:26:00 -07:00
Allen Li
e46459f0d3 git cl: Handle URL variations more robustly
Bug: 429002243
Change-Id: I0638da9f7ddf8f82078b13331d5890ad8b2421ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6917276
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-09-04 15:41:18 -07:00
Allen Li
6d9991fc7b auth: Print specific instructions for ReAuth, other errors
Bug: 442666611
Change-Id: Icfc9c223937b9035f0364630455a50492e282128
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6912692
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-09-04 14:15:17 -07:00
Jordan Brown
20ce2373dd Fix: Use f-string for validation warning message.
The warning message for missing autoroll exception link was not
correctly interpolating `self._name` because it was missing the `f`
prefix.

Bug:b/442963176
Change-Id: I0dfaf8aa3d1238ebbbd9bb097be53e18daa1916c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6915079
Auto-Submit: Jordan Brown <rop@google.com>
Reviewed-by: Andrew Mitchell <mitchella@google.com>
Commit-Queue: Andrew Mitchell <mitchella@google.com>
2025-09-04 00:26:37 -07:00
Jordan
f916887e12 Checking for package managers in vuln sufficiency.
This improves our alignment of vuln scan sufficiency with the scanners
we are using, based on the data extracted from README.chromium files.
Other package managers are being covered based on their manifest files.

This change splits "sufficient:URL and Version" into:
* "sufficient:Git URL and Version"; and
* "sufficient:Package Manager URL and Version"

Bug: 438384047
Change-Id: Ia3262b93092cad40e60243158e437f65a04e1916
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6905113
Reviewed-by: Anne Redulla <aredulla@google.com>
Commit-Queue: Jordan Brown <rop@google.com>
2025-09-03 23:01:57 -07:00
Fumitoshi Ukai
0f565fa858 siso: add .sisorc support
if build/config/siso/.sisorc exists, it will add global flags
or subcmd flags.

global flags is line starting with "-"
e.g.
--credential_helper=gcloud

subcmd flags are line starting with subcmd name.
e.g.
ninja --verbose_failures=false -k=0

Bug: b/269554009
Change-Id: I4691b9e17571721dd5b70f6ffb063e2d2f0ac4e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6910278
Reviewed-by: Scott Lee <ddoman@chromium.org>
Reviewed-by: Philipp Wollermann <philwo@google.com>
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
2025-09-03 19:03:18 -07:00
Allen Li
7064499de3 auth: Refactor missing access_token logic
Standalone change for review

Bug: 442666611
Change-Id: I2b99a68a3fbf70f15ceebc26bb2d136e628d9347
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6912691
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-09-03 17:51:47 -07:00
Fumitoshi Ukai
671f3a1488 ninja: fix TypeError: check_out_dir() missing 1 required positional argument
Bug: 442612621
Change-Id: Ia6dd38e2b8a6b84fcf3abbe9603550af0eb6a8c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6914234
Commit-Queue: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
2025-09-03 17:13:21 -07:00
Allen Li
008ecc31b2 auth: Remove unused param
Bug: 442666611
Change-Id: I69824453cf5d4152b5480cbb9d295a78ac023735
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6912690
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
2025-09-03 15:35:47 -07:00
Allen Li
42cfc1ef22 auth: Hoist exception handling in GerritAuthenticator
This moves the handling to the same level as
`raise GitLoginRequiredError()` so we can check for other exit codes
and raise other errors.

Bug: 442666611
Change-Id: Idbb34d6549b47b715bf59d6720362293d5c28039
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6912689
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-09-03 15:31:20 -07:00
Allen Li
05b5e754e4 auth: Disable ReAuth for git-credential-luci in depot_tools
depot_tools doesn't know how to use git-credential-luci properly for
ReAuth.  For now, explicitly disable it so it doesn't break.  Future
changes will modify depot_tools so it can use ReAuth properly for the
Gerrit RPCs that need it.

Bug: 442666611
Change-Id: I77847527d1bb42a2bab8d287bc853a7a5be0b867
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6908321
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Jiewei Qian <qjw@chromium.org>
2025-09-03 14:16:05 -07:00
Jiewei Qian
fa63ec7437 roll git-credential-luci to improve error messaging
GCL roll includes:

- Better error messaging
- SSH Agent probe (depends on https://crrev.com/c/6910821)

Bug: 440418327
Change-Id: I595bd8624ce2646fb5cef49193f569d3acd3e42b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6910742
Reviewed-by: Chenlin Fan <fancl@chromium.org>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
2025-09-02 21:57:04 -07:00
Jiewei Qian
669375e6a1 roll luci-auth-ssh-helper to support ping/pong check
Bug: 442309587
Change-Id: I0c4260e8692e0a874c990a979a2912bfcf4a3114
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6910821
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Auto-Submit: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Chenlin Fan <fancl@chromium.org>
2025-09-02 21:44:05 -07:00
Fumitoshi Ukai
f80f5bc99e autoninja: support running from outside of workspace
gclient_paths.GetPrimarySolutionPath() finds primary
solution path from current directory, so it would fail
if it is invoked from outside of workspace.

Pass directory to gclient_paths.GetPrimarySolutionPath
so it could find workspace correctly if it is invoked
ninja outside of workspace.

Bug: 441240584
Change-Id: I873f7883873e143ec8a64ee0e636042ac2336a2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6898614
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
2025-09-02 13:08:00 -07:00
recipe-roller
0e9c00fe9f 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/8704818840872905601

recipe_engine:
f1a02eca24
  f1a02ec (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from d27319d48eb3 to f58a984f19ee

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: I5373fa5deb999847234c4d8622d6fa72ad874f04
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6908685
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-09-02 10:54:06 -07:00
recipe-roller
83ad19235f 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/8704857848275062881

recipe_engine:
a28812ee74
  a28812e (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from c1f5d1013f08 to 0ff6e38043da

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: I18e26406982662bf222a8afaf5c1969c031ff817
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6901831
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-09-02 00:32:57 -07:00
Jordan
f01b22f782 Improving vuln scan sufficiency heuristics
* Centralised CPE/Version checking to reuse logic.
* Basic check that a url contains git, googlesource, or 'bitbucket etc to indicate it's a clonable url which is required to count as sufficient.
This brings the category closely in alignment with AutoVM, removing 100
dependencies, all of which did not have vulnerability cover.

Bug:b/438384047
Change-Id: I7483f20a177670ad1d6571ffcc2545c0faddd892
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6904943
Commit-Queue: Jordan Brown <rop@google.com>
Auto-Submit: Jordan Brown <rop@google.com>
Reviewed-by: Anne Redulla <aredulla@google.com>
2025-09-01 22:37:02 -07:00
recipe-roller
3f41e54ae1 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/8704939008280799825

recipe_engine:
1d4fe5b3dc
  1d4fe5b (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 87d8ad6864bb to 75f092b40e0d

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: I06ee85cf7cad78abffdb3a59c6ccb33c27b29549
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6901825
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-09-01 03:03:50 -07:00
Jordan
7e5f7cbec7 Changing CPE/Version to Warning
Bug: 441973518
Change-Id: I74ced62da409b25eed88070d473b79bd06655b82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6903326
Reviewed-by: Dominic Battré <battre@chromium.org>
Commit-Queue: Jordan Brown <rop@google.com>
2025-09-01 00:39:30 -07:00
recipe-roller
a54a6c133b 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/8705157322527026625

recipe_engine:
631bb0493d
  631bb04 (chromium-autoroll@skia-public.iam.gserviceaccount.com)
      Roll CAS Client from 806dc4f5ce12 to 5482078f7d59

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: I687fc7103ecf3ecf067b4112219513058d744aef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6902020
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-08-29 17:09:58 -07:00
Jordan Brown
0699a53d84 Add validation for CPEPrefix and Version fields.
This change introduces a new validation rule: if a `CPEPrefix` is
provided but does not contain a version component, the `Version` field
must be present in the metadata. A helper function
`has_version_component` is added to `cpe_prefix.py` to check for a
version within a CPE string. Tests are added to cover the new validation
logic and the `has_version_component` function.

Bug: 438383649
Change-Id: I69938959316051d31f7fec32c5293d2c4c1a8e2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6898421
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Commit-Queue: Jordan Brown <rop@google.com>
2025-08-29 02:26:20 -07:00
Jiewei Qian
6b19831e3c Roll git-credential-luci to default enable ReAuth
This CL rolls git-credential-luci (GCL) to default enable ReAuth after
addressing a few CLI UX issues.

Warnings and errors now include troubleshoot instructions, and a "I want
to unblock myself" escape hatch.

If things break and can't be bypassed by setting `LUCI_BYPASS_REAUTH`
environment var, please revert this CL.

Bug: 438584121
Change-Id: I3731cecb3b09cc0392b2890a764e351a41cabdc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6896061
Reviewed-by: Chenlin Fan <fancl@chromium.org>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
2025-08-28 23:09:19 -07:00