squad icon indicating copy to clipboard operation
squad copied to clipboard

Filter failures with confidence with score

Open chaws opened this issue 2 years ago • 0 comments

In endpoints like: https://qa-reports.linaro.org/api/builds/140432/failures_with_confidence/

It might be useful to have results filtered by score, something like appending this url with &score=80 for score exactly as 80% or &score__gt=80 for score >= 80% or &score__lt=80 for score <= 80%.

This seems to be trivial, since it just needs:

  1. Add a new parameter in the api: https://github.com/Linaro/squad/blob/master/squad/api/rest.py#L1032
  2. Pass this parameter to failures_with_confidence: https://github.com/Linaro/squad/blob/master/squad/core/failures.py#L32, removing all failures that don't match the search

chaws avatar Feb 24 '23 12:02 chaws