Commit Graph

10 Commits (main)

Author SHA1 Message Date
Struan Shrimpton 28ecc1b36a Fix docstrings and add support for arbitrary CL try-results
This fixes the copy-paste error with the _from_id and _from_build_number
versions of get_build. It also adds support for getting try results
from a URL, not just the current checked out version.

Bug: None
Change-Id: I1e076c5c461c346f5864eda068a6552237f5691f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6890424
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
Auto-Submit: Struan Shrimpton <sshrimp@google.com>
2 weeks ago
Brian Sheedy 526aace177 Add presubmit checks for mcp/
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>
3 weeks ago
Struan Shrimpton b12a6cc03c Add bsheedy to mcp/OWNERS
Bug: None
Change-Id: I1b68a9710e0a3e93a3693a45376e37cf6051b125
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6847121
Auto-Submit: Struan Shrimpton <sshrimp@google.com>
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
4 weeks ago
Brian Sheedy 569c95044f Deduplicate mcp/ prpc calls
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>
4 weeks ago
Struan Shrimpton ad28aed318 Add git cl tools to mcp server
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>
4 weeks ago
Brian Sheedy 95155bece7 Add several ResultDB tools
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>
4 weeks ago
Brian Sheedy 8c832a9622 Update buildbucket test imports
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>
4 weeks ago
Brian Sheedy 499091560a Add recent build tools to MCP server
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>
4 weeks ago
Struan Shrimpton 56f1f96c4b Specify vpython wheel name for pydantic_core with platform
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>
2 months ago
Struan Shrimpton 75449d2000 mcp: Add some buildbucket tools and the mcp server
These tools are still being evaluated and may change. get_build vs
get_build_from_id and get_build_from_build_number in particular are two
distinct ways of implementing the same tool that need to be compared.
get_build gives flexibility but is extremely verbose which means it
might be too flaky or consume unnecessary tokens. The return of these
might also need filtering for unnecessary output. Particularly steps
which can be very verbose without much information.

Bug: 430952168
Change-Id: Ia9b092a6b6c546198939deb36ea1b89ff33d7fc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6758660
Auto-Submit: Struan Shrimpton <sshrimp@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Struan Shrimpton <sshrimp@google.com>
2 months ago