failurereason

package
v0.0.0-...-01cd1ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package failurereason contains the failure reason clustering algorithm for LUCI Analysis.

This algorithm removes ips, temp file names, numbers and other such tokens to cluster similar reasons together.

Index

Constants

View Source
const AlgorithmVersion = 6

AlgorithmVersion is the version of the clustering algorithm. The algorithm version should be incremented whenever existing test results may be clustered differently (i.e. Cluster(f) returns a different value for some f that may have been already ingested).

Variables

AlgorithmName is the identifier for the clustering algorithm. LUCI Analysis requires all clustering algorithms to have a unique identifier. Must match the pattern ^[a-z0-9-.]{1,32}$.

The AlgorithmName must encode the algorithm version, so that each version of an algorithm has a different name.

View Source
var BugTemplate = template.Must(template.New("reasonTemplate").Parse(
	`This bug is for all test failures where the primary error message is similiar to the following (ignoring numbers and hexadecimal values):
{{.FailureReason}}

The following test(s) were observed to have matching failures at this time (at most five examples listed):
{{range .TestIDs}}- {{.}}
{{end}}`))

BugTemplate is the template for the content of bugs created for failure reason clusters. A list of test IDs is included to improve searchability by test name.

Functions

This section is empty.

Types

type Algorithm

type Algorithm struct{}

Algorithm represents an instance of the reason-based clustering algorithm.

func (*Algorithm) Cluster

func (a *Algorithm) Cluster(config *compiledcfg.ProjectConfig, failure *clustering.Failure) []byte

Cluster clusters the given test failure and returns its cluster ID (if it can be clustered) or nil otherwise.

func (*Algorithm) ClusterDescription

func (a *Algorithm) ClusterDescription(config *compiledcfg.ProjectConfig, summary *clustering.ClusterSummary) (*clustering.ClusterDescription, error)

ClusterDescription returns a description of the cluster, for use when filing bugs, with the help of the given example failure.

func (*Algorithm) ClusterTitle

func (a *Algorithm) ClusterTitle(config *compiledcfg.ProjectConfig, example *clustering.Failure) string

ClusterTitle returns a definition of the cluster, typically in the form of an unhashed clustering key which is common across all test results in a cluster. For display on the cluster page or cluster listing.

func (*Algorithm) FailureAssociationRule

func (a *Algorithm) FailureAssociationRule(config *compiledcfg.ProjectConfig, example *clustering.Failure) string

FailureAssociationRule returns a failure association rule that captures the definition of cluster containing the given example.

func (*Algorithm) Name

func (a *Algorithm) Name() string

Name returns the identifier of the clustering algorithm.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL