Commit Graph

6 Commits (main)

Author SHA1 Message Date
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>
11 hours 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>
1 day 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>
1 day 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>
2 days 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>
2 days 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>
3 weeks ago