In https://crrev.com/c/6697693, presubmit's canned formatting checks
started looking at *.star files. This included enforcing a max line
length of 80 chars in such files.
Most (all?) *.star files found in gclient-managed repos are lucicfg
client repos, which generally have their own formatter and use 4-space
indents. This can lead to some friction with presubmit's 80 char limit.
So this uncaps that limit for all *.star files.
Bug: None
Change-Id: Ice68676c5d097d7951e83cf81ca9ac8adc8151ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6862147
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
This CL adds a --list-devices for luci-auth-fido2-plugin to print
information about detected FIDO2 devices, then exit itself.
This is useful for debugging udev / permission issues on Linux.
Bug:b/433851494
Change-Id: I4db7e6a56b99e077d4128c74f49d02829b667d8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6850350
Reviewed-by: Allen Li <ayatane@chromium.org>
Commit-Queue: Jiewei Qian <qjw@chromium.org>
Reviewed-by: Chenlin Fan <fancl@chromium.org>
This reverts commit eb60ab38de.
Reason for revert: re-landing with an additional patch
-------------
* Problem
Browser infra runs ci.*-presubmit builders, such as linux-presubmit,
with --all to ensure that the entire chromium/src passes
presubmit checks.
crrev.com/c/6842238 changed the finding type for License Check
from warning to error, but the CI presubmit builders failed because
there are many files without valid CopyRight.
Not only the existing files, all the new files that are added with
`Bypass-Check-License: <reason> footer could also cause the presubmit
builder to fail.
* This CL
In addition to the original patch from crrev.com/c/6842238,
this CL makes additional patches to turn the CopyRight errors into
warnings, if --file or --all is given.
The same approach is used in
https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_canned_checks.py;l=982-987;drc=eb60ab38deeda6975c9b0fef883978f2a9f69120
Bug: 435696543,40237859
Original change's description:
> Revert "presubmit: emit errors instead of warnings for bad copyright headers"
>
> This reverts commit fa62515ecb.
>
> Reason for revert: it seems that the existing files without valid copyright headers are causing linux-presubmit builds to fail. b/438791294
>
> Bug: 435696543,40237859
> Original change's description:
> > presubmit: emit errors instead of warnings for bad copyright headers
> >
> > This is an effective revert of https://crrev.com/c/4895337 with
> > additional patches to support a footer.
> >
> > https://crrev.com/c/3887721 updated CheckLicense() to emit errors
> > for bad copyright headers. However, https://crrev.com/c/4895337
> > was changed the finding type from error to warning, claiming that
> > the check is N/A for moved third files, but it's not so easy
> > to programatiically distinguish moved third-party files.
> >
> > After discussions, it was decided to change the finding type back
> > to error to prevent accidental submissions for new files without
> > correct CopyRight headers.
> >
> > To mitigate moved, third-party files, this CL adds support for
> > "Bypass-Check-License: <reason>" footer.
> >
> > If the check should be ignored in a given CL, CL authors should
> > use the footer instead.
> >
> > Bug: 435696543,40237859
> > Change-Id: I177915c65932a3d76ea60ee6a0e396f726bc400d
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6842238
> > Reviewed-by: Gavin Mak <gavinmak@google.com>
> > Commit-Queue: Scott Lee <ddoman@chromium.org>
>
> Bug: 435696543,40237859
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: Ibedf8d13e3742249947e29e625a14cceaf89879c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6852377
> Commit-Queue: Scott Lee <ddoman@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>
Bug: 435696543,40237859
Change-Id: Iafdb29b928c016eb3949e29fd43a2ba5f53e0ba0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6852108
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
This reverts commit fa62515ecb.
Reason for revert: it seems that the existing files without valid copyright headers are causing linux-presubmit builds to fail. b/438791294
Bug: 435696543,40237859
Original change's description:
> presubmit: emit errors instead of warnings for bad copyright headers
>
> This is an effective revert of https://crrev.com/c/4895337 with
> additional patches to support a footer.
>
> https://crrev.com/c/3887721 updated CheckLicense() to emit errors
> for bad copyright headers. However, https://crrev.com/c/4895337
> was changed the finding type from error to warning, claiming that
> the check is N/A for moved third files, but it's not so easy
> to programatiically distinguish moved third-party files.
>
> After discussions, it was decided to change the finding type back
> to error to prevent accidental submissions for new files without
> correct CopyRight headers.
>
> To mitigate moved, third-party files, this CL adds support for
> "Bypass-Check-License: <reason>" footer.
>
> If the check should be ignored in a given CL, CL authors should
> use the footer instead.
>
> Bug: 435696543,40237859
> Change-Id: I177915c65932a3d76ea60ee6a0e396f726bc400d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6842238
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Scott Lee <ddoman@chromium.org>
Bug: 435696543,40237859
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ibedf8d13e3742249947e29e625a14cceaf89879c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6852377
Commit-Queue: Scott Lee <ddoman@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Adds unittest and pylint checks for the mcp/ directory.
Change-Id: I7aa6a33fea7ac60500b8c865e18f3cf72d425289
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6847122
Reviewed-by: Struan Shrimpton <sshrimp@google.com>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
This is an effective revert of https://crrev.com/c/4895337 with
additional patches to support a footer.
https://crrev.com/c/3887721 updated CheckLicense() to emit errors
for bad copyright headers. However, https://crrev.com/c/4895337
was changed the finding type from error to warning, claiming that
the check is N/A for moved third files, but it's not so easy
to programatiically distinguish moved third-party files.
After discussions, it was decided to change the finding type back
to error to prevent accidental submissions for new files without
correct CopyRight headers.
To mitigate moved, third-party files, this CL adds support for
"Bypass-Check-License: <reason>" footer.
If the check should be ignored in a given CL, CL authors should
use the footer instead.
Bug: 435696543,40237859
Change-Id: I177915c65932a3d76ea60ee6a0e396f726bc400d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6842238
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
Deduplicates the various `prpc call` subprocess.run calls throughout
mcp/ in favor of a new run_prpc_call helper.
Also makes a few drive-by cleanup changes that were caught by WIP
presubmit checks.
Change-Id: I3e401cb959ba96f2224ea1a7f7f58795330f643a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6847120
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Struan Shrimpton <sshrimp@google.com>
WindowsClient works for both non-admin and admin users. There's no need
to branch and use Fido2Client for admin users.
Bug:b/433851494
Change-Id: I42d52d71749beaf0b2c68d9adc6027a5b6bb2ac2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6844138
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Chenlin Fan <fancl@chromium.org>
Auto-Submit: Jiewei Qian <qjw@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Include a few `git cl` tools, particularly try_builder_results which
returns the current branch's try results in a json format.
Bug: None
Change-Id: I853250fc1ea4745771cdcc74002522ace39f7f85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6847119
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Auto-Submit: Struan Shrimpton <sshrimp@google.com>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Adds several ResultDB-related tools to the depot_tools MCP server.
Specifically:
* get_non_exonerated_unexpected_results_from_build which gets all test
results from a build that a normal user would consider failures.
* expand_summary_html which is used to expand the summaryHtml field
included in a ResultDB result to include referenced artifact content.
* get_test_level_text_artifact which retrieves the content of a test
result level text artifact.
Together, these allow Gemini to perform some rudimentary test failure
analysis such as grouping related failures together.
Bug: 438226961
Change-Id: I81cd798d7568bb47b1aa476589816253e29a5630
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6842578
Reviewed-by: Struan Shrimpton <sshrimp@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Updates mcp/buildbucket_test.py to use `from unittest import mock`
instead of `from unittest.mock import ...` since the Google style guide
says to avoid importing specific pieces of a module except in a few
specific (typing-related) cases.
Change-Id: Ibefb62e492fbf48b89e97fc75bf55beda7030d52
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6842579
Reviewed-by: Struan Shrimpton <sshrimp@google.com>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Adds two new tools to the depot_tools MCP server related to retrieving
recent builds from Buildbucket. get_recent_builds retrieves the N most
recent completed builds from the specified builder, while
get_recent_failed_builds retrieves the N most recent failed (i.e. red)
builds.
Bug: 438226961
Change-Id: I55d93140fcf405276e622525a833c5717b5aca90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6842576
Reviewed-by: Struan Shrimpton <sshrimp@google.com>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
This CL allows presubmit_support to run without any files in diff mode
if it's given --description "..."
Bug: 436813955
Change-Id: I43252c0fdbd1a87b6099d2c9cd19e4b0f9b7f64f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6838150
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Scott Lee <ddoman@chromium.org>
This plugin handles FIDO2 security keys for doing auth and integrates
with luci-auth (specifically git-credential-luci).
(It's in Python because tl;dr the Python library is much better.)
Bug: 433851494
Change-Id: Ib956b614588aad8ad4fda7619bfbae17a670438f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6804585
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Allen Li <ayatane@chromium.org>
Trying to configure users' git config automatically has been more
trouble than it's worth. All users should be on new auth now (with
the help of the manual wizard), so disable the auto logic (and then
delete it later) so we don't get bitten by the auto logic
unintentionally interacting in a bad way later.
Bug: 430668572
Change-Id: Ia1f92d1bea834eb3be1887ea9c54d2e1a70ae33c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6821484
Commit-Queue: Allen Li <ayatane@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
This is needed to pass the repo path to the credential helper, so we
can distinguish repos that need ReAuth.
Change-Id: I5aa72d6ec0421dcbff610f48f34129b8962050f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6822598
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Allen Li <ayatane@chromium.org>
The command is passed directly to gn.main, so it does not
need the python executable.
Change-Id: I010bf68e86bf48b4b7387c26124ede216696449f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6793062
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
This wheel was initially incorrectly setup as a UniversalSource wheel
which has since been fixed. Update the .vpython3 file to match
Change-Id: I6f8a7281f050b1712ca27f7b32037b7fe8c8af97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6782163
Commit-Queue: Jie Sheng <jiesheng@google.com>
Reviewed-by: Jie Sheng <jiesheng@google.com>
Auto-Submit: Struan Shrimpton <sshrimp@google.com>