Documentation ¶
Index ¶
- Variables
- func GetWebFeaturesDataCache() shared.WebFeaturesData
- func RegisterRoutes()
- func SetWebFeaturesDataCache(newData shared.WebFeaturesData)
- type AbstractAll
- type AbstractAnd
- type AbstractCount
- type AbstractExists
- type AbstractLessThan
- type AbstractLink
- type AbstractMoreThan
- type AbstractNone
- type AbstractNot
- type AbstractOr
- type AbstractQuery
- type AbstractSequential
- type AbstractTestLabel
- type AbstractTestWebFeature
- type AbstractTriaged
- type AggregationOpts
- type And
- type Binder
- type ConcreteQuery
- type Count
- type False
- type LessThan
- type Link
- type MetadataQuality
- type MoreThan
- type Not
- type Or
- type Plan
- type RunQuery
- type RunTestStatusEq
- type RunTestStatusNeq
- type SubtestNamePattern
- type SummaryResult
- type TestLabel
- type TestNamePattern
- type TestPath
- type TestStatusEq
- type TestStatusNeq
- type TestWebFeature
- type TestWebFeatureAtom
- type Triaged
- type True
Constants ¶
This section is empty.
Variables ¶
var ErrBadSummaryVersion = errors.New("invalid/unsupported summary version")
ErrBadSummaryVersion occurs when the summary file URL is not the correct version.
var MetadataMapCached map[string][]byte // nolint:gochecknoglobals // TODO: Fix gochecknoglobals lint error
MetadataMapCached is the local cache of Metadata in searchcache. Zero value is nil.
Functions ¶
func GetWebFeaturesDataCache ¶
func GetWebFeaturesDataCache() shared.WebFeaturesData
GetWebFeaturesDataCache safely retrieves the data cache.
func SetWebFeaturesDataCache ¶
func SetWebFeaturesDataCache(newData shared.WebFeaturesData)
SetWebFeaturesDataCache safely swaps the data cache. Currently, the separate goroutine in the poll folder will use this.
Types ¶
type AbstractAll ¶
type AbstractAll struct {
Args []AbstractQuery
}
AbstractAll represents an array of abstract queries, each of which must be satifisfied by all runs. It represents the root of a structured query.
func (AbstractAll) BindToRuns ¶
func (e AbstractAll) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns binds each abstract query to an and-combo of that query against each specific/individual run. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractAll) UnmarshalJSON ¶
func (e *AbstractAll) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractAll attempts to interpret a query atom as {"all": [<abstract query>]}.
type AbstractAnd ¶
type AbstractAnd struct {
Args []AbstractQuery
}
AbstractAnd is the AbstractQuery for conjunction.
func (AbstractAnd) BindToRuns ¶
func (a AbstractAnd) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns for AbstractAnd produces an And with bound arguments. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractAnd) UnmarshalJSON ¶
func (a *AbstractAnd) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractAnd attempts to interpret a query atom as {"and": [<abstract queries>]}.
type AbstractCount ¶
type AbstractCount struct { Count int Where AbstractQuery }
AbstractCount represents the root of a count query, where the exact number of runs that satisfy the query must match the expected count.
func (AbstractCount) BindToRuns ¶
func (c AbstractCount) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns binds each count query to all of the runs, so that it can count the number of runs that match the criteria. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractCount) UnmarshalJSON ¶
func (c *AbstractCount) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON for AbstractCount attempts to interpret a query atom as {"count": int, "where": query}.
type AbstractExists ¶
type AbstractExists struct {
Args []AbstractQuery
}
AbstractExists represents an array of abstract queries, each of which must be satifisfied by some run. It represents the root of a structured query.
func (AbstractExists) BindToRuns ¶
func (e AbstractExists) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns binds each abstract query to an or-combo of that query against each specific/individual run. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractExists) UnmarshalJSON ¶
func (e *AbstractExists) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractExists attempts to interpret a query atom as {"exists": [<abstract queries>]}.
type AbstractLessThan ¶
type AbstractLessThan struct {
AbstractCount
}
AbstractLessThan is the root of a lessThan query, where the number of runs that satisfy the query must be less than the given count.
func (AbstractLessThan) BindToRuns ¶
func (l AbstractLessThan) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns binds each count query to all of the runs, so that it can count the number of runs that match the criteria. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractLessThan) UnmarshalJSON ¶
func (l *AbstractLessThan) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractLessThan attempts to interpret a query atom as {"count": int, "where": query}.
type AbstractLink ¶
type AbstractLink struct { Pattern string // contains filtered or unexported fields }
AbstractLink is represents the root of a link query, which matches Metadata URLs to a pattern string.
func (AbstractLink) BindToRuns ¶
func (l AbstractLink) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns for AbstractLink fetches metadata for either test-level issues or issues associated with the given runs. It does not filter the metadata by the pattern yet. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractLink) UnmarshalJSON ¶
func (l *AbstractLink) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractLink attempts to interpret a query atom as {"link":<metadata url pattern string>}.
type AbstractMoreThan ¶
type AbstractMoreThan struct {
AbstractCount
}
AbstractMoreThan is the root of a moreThan query, where the number of runs that satisfy the query must be more than the given count.
func (AbstractMoreThan) BindToRuns ¶
func (m AbstractMoreThan) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns binds each count query to all of the runs, so that it can count the number of runs that match the criteria. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractMoreThan) UnmarshalJSON ¶
func (m *AbstractMoreThan) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON for AbstractMoreThan attempts to interpret a query atom as {"count": int, "where": query}.
type AbstractNone ¶
type AbstractNone struct {
Args []AbstractQuery
}
AbstractNone represents an array of abstract queries, each of which must not be satifisfied by any run. It represents the root of a structured query.
func (AbstractNone) BindToRuns ¶
func (e AbstractNone) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns binds to a not-exists for the same query(s). nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractNone) UnmarshalJSON ¶
func (e *AbstractNone) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractNone attempts to interpret a query atom as {"none": [<abstract query>]}.
type AbstractNot ¶
type AbstractNot struct {
Arg AbstractQuery
}
AbstractNot is the AbstractQuery for negation.
func (AbstractNot) BindToRuns ¶
func (n AbstractNot) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns for AbstractNot produces a Not with a bound argument. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractNot) UnmarshalJSON ¶
func (n *AbstractNot) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractNot attempts to interpret a query atom as {"not": <abstract query>}.
type AbstractOr ¶
type AbstractOr struct {
Args []AbstractQuery
}
AbstractOr is the AbstractQuery for disjunction.
func (AbstractOr) BindToRuns ¶
func (o AbstractOr) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns for AbstractOr produces an Or with bound arguments. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractOr) UnmarshalJSON ¶
func (o *AbstractOr) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractOr attempts to interpret a query atom as {"or": [<abstract queries>]}.
type AbstractQuery ¶
type AbstractQuery interface {
BindToRuns(runs ...shared.TestRun) ConcreteQuery
}
AbstractQuery is an intermetidate representation of a test results query that has not been bound to specific shared.TestRun specs for processing.
type AbstractSequential ¶
type AbstractSequential struct {
Args []AbstractQuery
}
AbstractSequential represents the root of a sequential queries, where the first query must be satisfied by some run such that the next run, sequentially, also satisfies the next query, and so on.
func (AbstractSequential) BindToRuns ¶
func (e AbstractSequential) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns binds each sequential query to an and-combo of those queries against specific sequential runs, for each combination of sequential runs. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractSequential) UnmarshalJSON ¶
func (e *AbstractSequential) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractSequential attempts to interpret a query atom as {"exists": [<abstract queries>]}.
type AbstractTestLabel ¶
type AbstractTestLabel struct { Label string // contains filtered or unexported fields }
AbstractTestLabel represents the root of a testlabel query, which matches test-level metadata labels to a searched label.
func (AbstractTestLabel) BindToRuns ¶
func (t AbstractTestLabel) BindToRuns(_ ...shared.TestRun) ConcreteQuery
BindToRuns for AbstractTestLabel fetches test-level metadata; it is independent of test runs. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractTestLabel) UnmarshalJSON ¶
func (t *AbstractTestLabel) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractTestLabel attempts to interpret a query atom as {"label":<label string>}.
type AbstractTestWebFeature ¶
type AbstractTestWebFeature struct { TestWebFeatureAtom // contains filtered or unexported fields }
AbstractTestWebFeature represents the root of a web_feature query, which matches test-level metadata to a searched web feature.
func (AbstractTestWebFeature) BindToRuns ¶
func (t AbstractTestWebFeature) BindToRuns(_ ...shared.TestRun) ConcreteQuery
BindToRuns for AbstractTestWebFeature fetches test-level metadata; it is independent of test runs. nolint:ireturn // TODO: Fix ireturn lint error
type AbstractTriaged ¶
type AbstractTriaged struct { Product *shared.ProductSpec // contains filtered or unexported fields }
AbstractTriaged represents the root of a triaged query that matches tests where the test of a specific browser has been triaged through Metadata.
func (AbstractTriaged) BindToRuns ¶
func (t AbstractTriaged) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns for AbstractTriaged binds each run matching the AbstractTriaged ProductSpec to a triaged object. nolint:ireturn // TODO: Fix ireturn lint error
func (*AbstractTriaged) UnmarshalJSON ¶
func (t *AbstractTriaged) UnmarshalJSON(b []byte) error
UnmarshalJSON for AbstractTriaged attempts to interpret a query atom as {"triaged":<browser name>}.
type AggregationOpts ¶
type AggregationOpts struct { IncludeSubtests bool InteropFormat bool IncludeDiff bool IgnoreTestHarnessResult bool // Don't +1 the "OK" status for testharness tests. DiffFilter shared.DiffFilterParam }
AggregationOpts are options for the aggregation format used when collecting the results.
type And ¶
type And struct {
Args []ConcreteQuery
}
And is a logical conjunction of ConcreteQuery instances.
type Binder ¶
type Binder interface { // Bind produces an query execution Plan and/or error after binding its inputs // to a query service mechanism. E.g., an in-memory cache may verify that the // given runs are in the cache and extract results data subsets that pertain // to the runs before producing a Plan implementation that can operate over // the subsets directly. Bind([]shared.TestRun, ConcreteQuery) (Plan, error) }
Binder is a mechanism for binding a query over a slice of test runs to a particular query service mechanism.
type ConcreteQuery ¶
type ConcreteQuery interface {
Size() int
}
ConcreteQuery is an AbstractQuery that has been bound to specific test runs.
type Count ¶
type Count struct { Count int Args []ConcreteQuery }
Count constrains search results to include only test results where the number of runs that match the given criteria is exactly the expected count.
type False ¶
type False struct{}
False is a false-valued ConcreteQuery.
func (False) BindToRuns ¶
func (f False) BindToRuns(_ ...shared.TestRun) ConcreteQuery
BindToRuns for False is a no-op; it is independent of test runs. nolint:ireturn // TODO: Fix ireturn lint error
type LessThan ¶
type LessThan struct {
Count
}
LessThan constrains search results to include only test results where the number of runs that match the given criteria is less than the given count.
type MetadataQuality ¶
type MetadataQuality int
MetadataQuality represents the root of an "is" query, which asserts known metadata qualities to the results.
const ( // MetadataQualityUnknown is a placeholder for unrecognized values. MetadataQualityUnknown MetadataQuality = iota // MetadataQualityDifferent represents an is:different atom. // "different" ensures that one or more results differs from the other results. MetadataQualityDifferent // MetadataQualityTentative represents an is:tentative atom. // "tentative" ensures that the results are from a tentative test. MetadataQualityTentative // MetadataQualityOptional represents an is:optional atom. // "optional" ensures that the results are from an optional test. MetadataQualityOptional )
func MetadataQualityFromString ¶
func MetadataQualityFromString(quality string) (MetadataQuality, error)
MetadataQualityFromString returns the enum value for the given string.
func (MetadataQuality) BindToRuns ¶
func (q MetadataQuality) BindToRuns(_ ...shared.TestRun) ConcreteQuery
BindToRuns for MetadataQuality is a no-op; it is independent of test runs. nolint:ireturn // TODO: Fix ireturn lint error
func (MetadataQuality) Size ¶
func (q MetadataQuality) Size() int
Size of Is depends on the quality.
func (*MetadataQuality) UnmarshalJSON ¶
func (q *MetadataQuality) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON for MetadataQuality attempts to interpret a query atom as {"is":<metadata quality>}.
type MoreThan ¶
type MoreThan struct {
Count
}
MoreThan constrains search results to include only test results where the number of runs that match the given criteria is more than the given count.
type Not ¶
type Not struct {
Arg ConcreteQuery
}
Not is a logical negation of ConcreteQuery instances.
type Or ¶
type Or struct {
Args []ConcreteQuery
}
Or is a logical disjunction of ConcreteQuery instances.
type Plan ¶
type Plan interface { // Execute runs the query execution plan. The result set type depends on the // underlying query service mechanism that the Plan was bound with. Execute([]shared.TestRun, AggregationOpts) interface{} }
Plan a query execution plan that returns results.
type RunQuery ¶
type RunQuery struct { RunIDs []int64 AbstractQuery }
RunQuery is the internal representation of a query received from an HTTP client, including the IDs of the test runs to query, and the structured query to run.
func (*RunQuery) UnmarshalJSON ¶
UnmarshalJSON interprets the JSON representation of a RunQuery, instantiating (an) appropriate Query implementation(s) according to the JSON structure.
type RunTestStatusEq ¶
type RunTestStatusEq struct { Run int64 Status shared.TestStatus }
RunTestStatusEq constrains search results to include only test results from a particular run that have a particular test status value. Run IDs are those values automatically assigned to shared.TestRun instances by Datastore. Status IDs are those codified in shared.TestStatus* symbols.
func (RunTestStatusEq) Size ¶
func (RunTestStatusEq) Size() int
Size of RunTestStatusEq is 1: servicing such a query requires a single lookup in a test run result mapping per test.
type RunTestStatusNeq ¶
type RunTestStatusNeq struct { Run int64 Status shared.TestStatus }
RunTestStatusNeq constrains search results to include only test results from a particular run that do not have a particular test status value. Run IDs are those values automatically assigned to shared.TestRun instances by Datastore. Status IDs are those codified in shared.TestStatus* symbols.
func (RunTestStatusNeq) Size ¶
func (RunTestStatusNeq) Size() int
Size of RunTestStatusNeq is 1: servicing such a query requires a single lookup in a test run result mapping per test.
type SubtestNamePattern ¶
type SubtestNamePattern struct {
Subtest string
}
SubtestNamePattern is a query atom that matches subtest names to a pattern string.
func (SubtestNamePattern) BindToRuns ¶
func (tnp SubtestNamePattern) BindToRuns(_ ...shared.TestRun) ConcreteQuery
BindToRuns for SubtestNamePattern is a no-op; it is independent of test runs. nolint:ireturn // TODO: Fix ireturn lint error
func (SubtestNamePattern) Size ¶
func (SubtestNamePattern) Size() int
Size of SubtestNamePattern has a size of 1: servicing such a query requires a substring match per subtest.
func (*SubtestNamePattern) UnmarshalJSON ¶
func (tnp *SubtestNamePattern) UnmarshalJSON(b []byte) error
UnmarshalJSON for SubtestNamePattern attempts to interpret a query atom as {"subtest":<subtest name pattern string>}.
type SummaryResult ¶
type SummaryResult struct { // Status represents the 1-2 character abbreviation for the status of the test. Status string `json:"s"` // Counts represents the subtest counts (passes and total). Counts []int `json:"c"` }
SummaryResult is the format of the data from summary files generated with the newest aggregation method.
type TestNamePattern ¶
type TestNamePattern struct {
Pattern string
}
TestNamePattern is a query atom that matches test names to a pattern string.
func (TestNamePattern) BindToRuns ¶
func (tnp TestNamePattern) BindToRuns(_ ...shared.TestRun) ConcreteQuery
BindToRuns for TestNamePattern is a no-op; it is independent of test runs. nolint:ireturn // TODO: Fix ireturn lint error
func (TestNamePattern) Size ¶
func (TestNamePattern) Size() int
Size of TestNamePattern has a size of 1: servicing such a query requires a substring match per test.
func (*TestNamePattern) UnmarshalJSON ¶
func (tnp *TestNamePattern) UnmarshalJSON(b []byte) error
UnmarshalJSON for TestNamePattern attempts to interpret a query atom as {"pattern":<test name pattern string>}.
type TestPath ¶
type TestPath struct {
Path string
}
TestPath is a query atom that matches exact test path prefixes. It is an inflexible equivalent of TestNamePattern.
func (TestPath) BindToRuns ¶
func (tp TestPath) BindToRuns(_ ...shared.TestRun) ConcreteQuery
BindToRuns for TestNamePattern is a no-op; it is independent of test runs. nolint:ireturn // TODO: Fix ireturn lint error
func (TestPath) Size ¶
Size of TestPath has a size of 1: servicing such a query requires a substring match per test.
func (*TestPath) UnmarshalJSON ¶
UnmarshalJSON for TestPath attempts to interpret a query atom as {"path":<test name pattern string>}.
type TestStatusEq ¶
type TestStatusEq struct { Product *shared.ProductSpec Status shared.TestStatus }
TestStatusEq is a query atom that matches tests where the test status/result from at least one test run matches the given status value, optionally filtered to a specific browser name.
func (TestStatusEq) BindToRuns ¶
func (tse TestStatusEq) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns for TestStatusEq expands to a disjunction of RunTestStatusEq values. nolint:ireturn // TODO: Fix ireturn lint error
func (*TestStatusEq) UnmarshalJSON ¶
func (tse *TestStatusEq) UnmarshalJSON(b []byte) error
UnmarshalJSON for TestStatusEq attempts to interpret a query atom as {"product": <browser name>, "status": <status string>}.
type TestStatusNeq ¶
type TestStatusNeq struct { Product *shared.ProductSpec Status shared.TestStatus }
TestStatusNeq is a query atom that matches tests where the test status/result from at least one test run does not match the given status value, optionally filtered to a specific browser name.
func (TestStatusNeq) BindToRuns ¶
func (tsn TestStatusNeq) BindToRuns(runs ...shared.TestRun) ConcreteQuery
BindToRuns for TestStatusNeq expands to a disjunction of RunTestStatusNeq values. nolint:ireturn // TODO: Fix ireturn lint error
func (*TestStatusNeq) UnmarshalJSON ¶
func (tsn *TestStatusNeq) UnmarshalJSON(b []byte) error
UnmarshalJSON for TestStatusNeq attempts to interpret a query atom as {"product": <browser name>, "status": {"not": <status string>}}.
type TestWebFeature ¶
type TestWebFeature struct { WebFeature string WebFeaturesData shared.WebFeaturesData }
TestWebFeature is a ConcreteQuery of AbstractTestWebFeature.
func (TestWebFeature) Size ¶
func (TestWebFeature) Size() int
Size of TestWebFeature has a size of 1: servicing such a query requires a web feature match per Web Features Node.
type TestWebFeatureAtom ¶
type TestWebFeatureAtom struct {
WebFeature string
}
TestWebFeatureAtom contains the parsed data from a "feature" query atom.
func (*TestWebFeatureAtom) UnmarshalJSON ¶
func (t *TestWebFeatureAtom) UnmarshalJSON(b []byte) error
UnmarshalJSON for TestWebFeatureAtom attempts to interpret a query atom as {"feature":<web_feature_string>}.
type True ¶
type True struct{}
True is a true-valued ConcreteQuery.
func (True) BindToRuns ¶
func (t True) BindToRuns(_ ...shared.TestRun) ConcreteQuery
BindToRuns for True is a no-op; it is independent of test runs. nolint:ireturn // TODO: Fix ireturn lint error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cache
|
|
backfill/mock_backfill
Package mock_backfill is a generated GoMock package.
|
Package mock_backfill is a generated GoMock package. |
index
Package index is a generated GoMock package.
|
Package index is a generated GoMock package. |
monitor
Package monitor is a generated GoMock package.
|
Package monitor is a generated GoMock package. |