Skip to content

Commit 2f5ae7b

Browse files
committed
enforce release-blocking job runtime policy
1 parent 8b7e886 commit 2f5ae7b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

config/tests/jobs/jobs_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,13 @@ func TestKubernetesReleaseBlockingJobsCIPolicy(t *testing.T) {
11831183
if !isCritical(job.Cluster) {
11841184
errs = append(errs, fmt.Errorf("must run in cluster: k8s-infra-prow-build or eks-prow-build-cluster, found: %v", job.Cluster))
11851185
}
1186+
// Allow some buffer over the 120m target in the release blocking job policy:
1187+
// "Have the average of 75% percentile duration of all runs for a week finishing in 120 minutes or less"
1188+
// "Run at least every 3 hours"
1189+
// https://github.com/kubernetes/sig-release/blob/master/release-blocking-jobs.md
1190+
if job.DecorationConfig.Timeout.Duration > (time.Hour*2 + time.Minute*30) {
1191+
errs = append(errs, fmt.Errorf("release-blocking job must have timeout <= 2h30m and nominally run in <=2h, yet timeout is: %v", job.DecorationConfig.Timeout))
1192+
}
11861193
if len(errs) > 0 {
11871194
jobsToFix++
11881195
}

0 commit comments

Comments
 (0)