Skip to content

Commit

Permalink
Merge pull request #33352 from BenTheElder/drop-remaining-trusted-jobs
Browse files Browse the repository at this point in the history
Drop remaining trusted jobs
  • Loading branch information
k8s-ci-robot authored Aug 21, 2024
2 parents 8088ceb + c7fb61b commit abc73f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 172 deletions.
156 changes: 0 additions & 156 deletions config/jobs/kubernetes/test-infra/test-infra-trusted.yaml

This file was deleted.

20 changes: 4 additions & 16 deletions config/tests/jobs/jobs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,33 +292,21 @@ func TestRetestMatchJobsName(t *testing.T) {
func TestCommunityJobs(t *testing.T) {
const legacyDefault = "default"
const legacyTrusted = "test-infra-trusted"

// These jobs are used to automate prow itself and will not be migrating
// They run in prow's own cluster and will be removed right before we migrate the control plane
// DO NOT ADD ANY MORE JOBS HERE
knownBadJobs := sets.NewString(
"ci-test-infra-gencred-refresh-kubeconfig",
"post-test-infra-deploy-prow",
"post-test-infra-gencred-refresh-kubeconfig",
"ci-test-infra-autobump-prow",
"ci-test-infra-autobump-prow-for-auto-deploy",
)

// error if any job tries to run in the legacy default cluster
// error if any unknown job tries to run in the legacy trusted cluster
// error if any job tries to run in the legacy trusted cluster
const errFmt = "job %q uses deprecated cluster: %q which may not be used for new jobs, see: https://groups.google.com/a/kubernetes.io/g/dev/c/p6PAML90ZOU"
for _, job := range c.AllStaticPresubmits(nil) {
if job.Cluster == legacyDefault || (job.Cluster == legacyTrusted && !knownBadJobs.Has(job.Name)) {
if job.Cluster == legacyDefault || job.Cluster == legacyTrusted {
t.Errorf(errFmt, job.Name, job.Cluster)
}
}
for _, job := range c.AllStaticPostsubmits(nil) {
if job.Cluster == legacyDefault || (job.Cluster == legacyTrusted && !knownBadJobs.Has(job.Name)) {
if job.Cluster == legacyDefault || job.Cluster == legacyTrusted {
t.Errorf(errFmt, job.Name, job.Cluster)
}
}
for _, job := range c.AllPeriodics() {
if job.Cluster == legacyDefault || (job.Cluster == legacyTrusted && !knownBadJobs.Has(job.Name)) {
if job.Cluster == legacyDefault || job.Cluster == legacyTrusted {
t.Errorf(errFmt, job.Name, job.Cluster)
}
}
Expand Down

0 comments on commit abc73f6

Please sign in to comment.