Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] TRT-1922: Use JobTier for filtering jobs #2255

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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