go.fuchsia.dev/infra@v0.0.0-20240507153436-9b593402251b/cmd/autocorrelator/findings/findings.go (about)

     1  // Copyright 2021 The Fuchsia Authors.
     2  // Use of this source code is governed by a BSD-style license that can be
     3  // found in the LICENSE file.
     4  
     5  package findings
     6  
     7  // SummarySimilarity represents a potential false negative finding based on
     8  // similarity to a build's summary markdown.
     9  type SummarySimilarity struct {
    10  	// Similarity score [0.0, 1.0] between summary markdowns.
    11  	Score float64 `json:"score"`
    12  
    13  	// Buildbucket build ID.
    14  	BuildId string `json:"build_id"`
    15  
    16  	// Commit distance between the build and the base commit.
    17  	CommitDist int `json:"commit_dist"`
    18  
    19  	// Whether the build has SUCCESS status.
    20  	IsGreen bool `json:"is_green"`
    21  }
    22  
    23  // OpenFlakeBug represents a potential false negative finding based on the
    24  // existence of an open flake bug matching a failed test.
    25  //
    26  // TODO(atyfto): Implement a subcommand which checks failed tests against open
    27  // flakes and returns OpenFlakeBugs.
    28  type OpenFlakeBug struct {
    29  	// Name of the test.
    30  	Name string `json:"name"`
    31  
    32  	// Monorail bug ID.
    33  	BugId string `json:"bug_id"`
    34  
    35  	// Current flake rate.
    36  	FlakeRate float64 `json:"flake_rate"`
    37  
    38  	// TODO(atyfto): Consider adding LastUpdated field, though we should filter
    39  	// for automatic bug comments.
    40  }