blob: e5ecc359337fc817e2daa551f8c2eec303aca5a2 [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package findings
// SummarySimilarity represents a potential false negative finding based on
// similarity to a build's summary markdown.
type SummarySimilarity struct {
// Similarity score [0.0, 1.0] between summary markdowns.
Score float64 `json:"score"`
// Buildbucket build ID.
BuildId string `json:"build_id"`
// Commit distance between the build and the base commit.
CommitDist int `json:"commit_dist"`
// Whether the build has SUCCESS status.
IsGreen bool `json:"is_green"`
}
// OpenFlakeBug represents a potential false negative finding based on the
// existence of an open flake bug matching a failed test.
//
// TODO(atyfto): Implement a subcommand which checks failed tests against open
// flakes and returns OpenFlakeBugs.
type OpenFlakeBug struct {
// Name of the test.
Name string `json:"name"`
// Monorail bug ID.
BugId string `json:"bug_id"`
// Current flake rate.
FlakeRate float64 `json:"flake_rate"`
// TODO(atyfto): Consider adding LastUpdated field, though we should filter
// for automatic bug comments.
}