Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildIndexer ¶
type BuildIndexer interface {
// contains filtered or unexported methods
}
BuildIndexer is an interface that describes the buildnum to row index mapping used to retrieve data about individual builds from the JSON file. This is an interface because the JSON format describing failure clusters has 2 ways of recording the mapping info.
type Cluster ¶
type Cluster struct { Identifier string `json:"id"` Key string `json:"key"` Text string `json:"text"` Tests []*Test `json:"tests"` // contains filtered or unexported fields }
Cluster holds information about a failure cluster.
func (*Cluster) Body ¶
Body returns the body text of the github issue and *must* contain the output of ID(). closedIssues is a (potentially empty) slice containing all closed issues authored by this bot that contain ID() in their body. If Body returns an empty string no issue is created.
func (*Cluster) ID ¶
ID yields the string identifier that uniquely identifies this issue. This ID must appear in the body of the issue. DO NOT CHANGE how this ID is formatted or duplicate issues may be created on github.
func (*Cluster) Labels ¶
Labels returns the labels to apply to the issue created for this cluster on github.
type ContigIndexer ¶
type ContigIndexer struct {
// contains filtered or unexported fields
}
ContigIndexer is a BuildIndexer implementation for when the buildnum to row index mapping describes a contiguous set of rows via 3 ints.
type DictIndexer ¶
type DictIndexer map[string]interface{}
DictIndexer is a BuildIndexer implementation for when the buildnum to row index mapping is simply a dictionary. The value type of this dictionary is interface instead of int so that we don't have to convert the original map.
type FlakyJob ¶
type FlakyJob struct { // Name is the job's name. Name string // Consistency is the percentage of builds that passed. Consistency *float64 `json:"consistency"` // FlakeCount is the number of flakes. FlakeCount *int `json:"flakes"` // FlakyTests is a map of test names to the number of times that test failed. // Any test that failed at least once a day for the past week on this job is included. FlakyTests map[string]int `json:"flakiest"` // contains filtered or unexported fields }
FlakyJob is a struct that represents a single job and the flake data associated with it. FlakyJob implements the Issue interface so that it can be synced with github issues via the IssueCreator.
func (*FlakyJob) Body ¶
Body returns the body text of the github issue and *must* contain the output of ID(). closedIssues is a (potentially empty) slice containing all closed issues authored by this bot that contain ID() in their body. If Body returns an empty string no issue is created.
func (*FlakyJob) ID ¶
ID yields the string identifier that uniquely identifies this issue. This ID must appear in the body of the issue. DO NOT CHANGE how this ID is formatted or duplicate issues may be created on github.
func (*FlakyJob) Labels ¶
Labels returns the labels to apply to the issue created for this flaky job on github.
func (*FlakyJob) Priority ¶
Priority calculates and returns the priority of this issue The returned bool indicates if the returned priority is valid and can be used
func (*FlakyJob) TestsSorted ¶
TestsSorted returns a slice of the testnames from a FlakyJob's FlakyTests map. The slice is sorted by descending number of failures for the tests.
type FlakyJobReporter ¶
type FlakyJobReporter struct {
// contains filtered or unexported fields
}
FlakyJobReporter is a munger that creates github issues for the flakiest kubernetes jobs. The flakiest jobs are parsed from JSON generated by /test-infra/experiment/bigquery/flakes.sh
func (*FlakyJobReporter) Issues ¶
func (fjr *FlakyJobReporter) Issues(c *creator.IssueCreator) ([]creator.Issue, error)
Issues is the main work method of FlakyJobReporter. It fetches and parses flaky job data, then syncs the top issues to github with the IssueCreator.
func (*FlakyJobReporter) RegisterFlags ¶
func (fjr *FlakyJobReporter) RegisterFlags()
RegisterFlags registers options for this munger; returns any that require a restart when changed.
type TriageFiler ¶
type TriageFiler struct {
// contains filtered or unexported fields
}
TriageFiler files issues for clustered test failures.
func (*TriageFiler) Issues ¶
func (f *TriageFiler) Issues(c *creator.IssueCreator) ([]creator.Issue, error)
Issues is the main work function of the TriageFiler. It fetches and parses cluster data, then syncs the top issues to github with the IssueCreator.
func (*TriageFiler) RegisterFlags ¶
func (f *TriageFiler) RegisterFlags()
RegisterFlags registers options for this munger; returns any that require a restart when changed.