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 4fa6952
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 4 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
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
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

0 comments on commit 4fa6952

Please sign in to comment.