From bc5fcf2ee9edf203174973682a6fbb0607977285 Mon Sep 17 00:00:00 2001 From: Stephen Benjamin Date: Mon, 25 Aug 2025 15:32:10 -0400 Subject: [PATCH] UPSTREAM: : Exclude certain images from mirror list `k8s-tests-ext images` returns the list of images we should mirror to be able to run tests. However, starting with d5b8cb3aa, we started returning invalid.registry.k8s.io images, which are intentionally not working images. These should be excluded from the list returned to callers. --- openshift-hack/cmd/k8s-tests-ext/k8s-tests.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/openshift-hack/cmd/k8s-tests-ext/k8s-tests.go b/openshift-hack/cmd/k8s-tests-ext/k8s-tests.go index bf48e7e4b00f6..a4de97972145e 100644 --- a/openshift-hack/cmd/k8s-tests-ext/k8s-tests.go +++ b/openshift-hack/cmd/k8s-tests-ext/k8s-tests.go @@ -6,6 +6,7 @@ import ( "os" "reflect" "strconv" + "strings" et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests" @@ -88,7 +89,19 @@ func main() { Qualifiers: []string{withExcludedTestsFilter(`name.contains('[Serial]')`)}, }) + // ignoredImagePrefixes we don't want to mirror, i.e. things that are intentionally invalid. + ignoredImagePrefixes := []string{ + "invalid.registry.k8s.io/invalid", + } + +imageLoop: for k, v := range image.GetOriginalImageConfigs() { + for _, i := range ignoredImagePrefixes { + if strings.HasPrefix(v.GetE2EImage(), i) { + continue imageLoop + } + } + image := convertToImage(v) image.Index = int(k) kubeTestsExtension.RegisterImage(image)