Skip to content

API improvements for MCP #2059

Description

@nuclearcat

As discussed in Discord several improvements on Dashboard API is required to provide better efficiency for MCP tools:

  1. Wire lab into the existing filter_. mechanism on tree/{commit}/boots|tests|builds, i.e. make filter_boot.lab=lava-collabora / filter_test.lab= / filter_build.lab= actually filter, today they are accepted and silently ignored while filter_architecture and filter_boot.status work, so a lab query has to download all ~34k tests of a commit and discard 99% of them client-side. Accepting the parameter repeatedly (filter_test.lab=a&filter_test.lab=b) for multi-lab selection would match how the UI presents labs.
  2. Honour the filter body object on the hardware/{id}/boots|tests|builds|summary POST endpoints, at minimum for lab and status — it is currently ignored in full, so the "which labs run this qcom platform, and how are they doing" question can only be answered by fetching everything for the platform.
  3. Add a lab dimension to /api/metrics/: lab_maps gives volumes (builds/boots/tests counts) but no pass/fail, so there is no way to ask "is lab X healthy right now" without going through a specific tree or platform. Per-lab status counts there, ideally with the same PASS/FAIL/ERROR/SKIP shape already used by summary.
    .labs - would make it a one-call answer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions