Skip to content

Commit

Permalink
Use JobTier for filtering jobs
Browse files Browse the repository at this point in the history
Start setting `JobTier` to excluded on jobs we don't know about in
Sippy's config. This makes Sippy's config authoritative for both CR and
Sippy -- it should allow the data to match between the two, and for jobs
we don't explicitly opt-in to to stop showing up in Component Readiness.
  • Loading branch information
stbenjam committed Jan 14, 2025
1 parent d784260 commit e0b109d
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 13 deletions.
28 changes: 28 additions & 0 deletions config/views.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ component_readiness:
Topology: {}
Upgrade: {}
include_variants:
JobTier:
- informing
- blocking
- standard
Architecture:
- amd64
FeatureSet:
Expand Down Expand Up @@ -88,6 +92,10 @@ component_readiness:
Topology: {}
Upgrade: {}
include_variants:
JobTier:
- informing
- blocking
- standard
Architecture:
- amd64
FeatureSet:
Expand Down Expand Up @@ -147,6 +155,10 @@ component_readiness:
Suite: {}
Upgrade: {}
include_variants:
JobTier:
- informing
- blocking
- standard
Architecture:
- amd64
FeatureSet:
Expand Down Expand Up @@ -271,6 +283,10 @@ component_readiness:
Topology: {}
Upgrade: {}
include_variants:
JobTier:
- informing
- blocking
- standard
Architecture:
- amd64
FeatureSet:
Expand Down Expand Up @@ -333,6 +349,10 @@ component_readiness:
Suite: {}
Upgrade: {}
include_variants:
JobTier:
- informing
- blocking
- standard
Architecture:
- amd64
FeatureSet:
Expand Down Expand Up @@ -460,6 +480,10 @@ component_readiness:
Topology: {}
Upgrade: {}
include_variants:
JobTier:
- informing
- blocking
- standard
Architecture:
- amd64
FeatureSet:
Expand Down Expand Up @@ -520,6 +544,10 @@ component_readiness:
Topology: {}
Upgrade: {}
include_variants:
JobTier:
- informing
- blocking
- standard
Architecture:
- amd64
FeatureSet:
Expand Down
12 changes: 2 additions & 10 deletions pkg/api/componentreadiness/component_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"cloud.google.com/go/civil"

"github.com/openshift/sippy/pkg/util"

"cloud.google.com/go/bigquery"
Expand All @@ -33,8 +34,6 @@ import (
const (
triagedIncidentsTableID = "triaged_incidents"

ignoredJobsRegexp = `-okd|-recovery|aggregator-|alibaba|-disruptive|-rollback|-out-of-change|-sno-fips-recert`

// openRegressionConfidenceAdjustment is subtracted from the requested confidence for regressed tests that have
// an open regression.
openRegressionConfidenceAdjustment = 5
Expand Down Expand Up @@ -1784,18 +1783,11 @@ func (c *componentReportGenerator) getUniqueJUnitColumnValuesLast60Days(ctx cont
FROM
%s.junit %s
WHERE
NOT REGEXP_CONTAINS(prowjob_name, @IgnoredJobs)
AND modified_time > DATETIME_SUB(CURRENT_DATETIME(), INTERVAL 60 DAY)
modified_time > DATETIME_SUB(CURRENT_DATETIME(), INTERVAL 60 DAY)
ORDER BY
name`, field, c.client.Dataset, unnest)

query := c.client.BQ.Query(queryString)
query.Parameters = []bigquery.QueryParameter{
{
Name: "IgnoredJobs",
Value: ignoredJobsRegexp,
},
}

return getSingleColumnResultToSlice(ctx, query)
}
Expand Down
1 change: 1 addition & 0 deletions pkg/testidentification/ocp_variants.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var importantVariants = []string{
"Upgrade",
"SecurityMode",
"Installer",
"JobTier",
}

const (
Expand Down
11 changes: 9 additions & 2 deletions pkg/variantregistry/ocp.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ var (
runcRegex = regexp.MustCompile(`(?i)-runc`)
cgroupsv1Regex = regexp.MustCompile(`(?i)-cgroupsv1`)
virtRegex = regexp.MustCompile("(?i)-virt|-cnv|-kubevirt")

// JobTier:excluded matchers
excludedJobsRegex = regexp.MustCompile(`(?i)-okd|-recovery|aggregator-|alibaba|-disruptive|-rollback|-out-of-change|-sno-fips-recert`)
)

const (
Expand Down Expand Up @@ -442,12 +445,16 @@ func (v *OCPVariantLoader) IdentifyVariants(jLog logrus.FieldLogger, jobName str
variants[VariantProcedure] = VariantNoValue

// Set tier to informing/blocking as appropriate
if util.StrSliceContains(v.config.Releases[release].BlockingJobs, jobName) {
if excludedJobsRegex.MatchString(jobName) {
variants[VariantJobTier] = "excluded"
} else if util.StrSliceContains(v.config.Releases[release].BlockingJobs, jobName) {
variants[VariantJobTier] = "blocking"
} else if util.StrSliceContains(v.config.Releases[release].InformingJobs, jobName) {
variants[VariantJobTier] = "informing"
} else {
} else if v.config.Releases[release].Jobs[jobName] {
variants[VariantJobTier] = "standard"
} else {
variants[VariantJobTier] = "excluded"
}
}

Expand Down
5 changes: 4 additions & 1 deletion sippy-ng/src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ export function filterFor(column, operator, value) {
}

export function withoutUnstable() {
return [not(filterFor('variants', 'contains', 'never-stable'))]
return [
not(filterFor('variants', 'contains', 'never-stable')),
not(filterFor('variants', 'contains', 'JobTier:excluded')),
]
}

export function multiple(...filters) {
Expand Down

0 comments on commit e0b109d

Please sign in to comment.