From 2bbe035a0d7253872a44374c2738d52ba51ff4c5 Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Mon, 20 Oct 2025 16:45:51 +0100 Subject: [PATCH 01/10] OCPBUGS-63333 - Add Dot Net 8.0 to Origin Tests plus specifying branch for https://github.com/sclorg/django-ex.git" --- .../quickstarts/django-postgresql-persistent.json | 3 ++- examples/quickstarts/django-postgresql.json | 3 ++- test/extended/image_ecosystem/s2i_images.go | 12 ++++++------ test/extended/testdata/bindata.go | 9 ++++++--- .../cluster/quickstarts/django-postgresql.json | 3 ++- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/examples/quickstarts/django-postgresql-persistent.json b/examples/quickstarts/django-postgresql-persistent.json index 28f2aa2ac694..0eae4612f7e4 100644 --- a/examples/quickstarts/django-postgresql-persistent.json +++ b/examples/quickstarts/django-postgresql-persistent.json @@ -484,7 +484,8 @@ { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", + "value": "4.2.x" }, { "name": "CONTEXT_DIR", diff --git a/examples/quickstarts/django-postgresql.json b/examples/quickstarts/django-postgresql.json index 6359561b6457..c9fd34a81bfd 100644 --- a/examples/quickstarts/django-postgresql.json +++ b/examples/quickstarts/django-postgresql.json @@ -458,7 +458,8 @@ { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", + "value": "4.2.x" }, { "name": "CONTEXT_DIR", diff --git a/test/extended/image_ecosystem/s2i_images.go b/test/extended/image_ecosystem/s2i_images.go index 02e318acbece..7e17a53781f2 100644 --- a/test/extended/image_ecosystem/s2i_images.go +++ b/test/extended/image_ecosystem/s2i_images.go @@ -252,17 +252,17 @@ var s2iImages = map[string][]tc{ }, "dotnet": { { - Version: "60", + Version: "80", Cmd: "dotnet --version", - Expected: "6.0", - Tag: "6.0-ubi8", + Expected: "8.0", + Tag: "8.0-ubi8", Arches: []string{"amd64", "arm64", "s390x"}, }, // { - // Version: "80", + // Version: "90", // Cmd: "dotnet --version", - // Expected: "8.0", - // Tag: "8.0-ubi8", + // Expected: "9.0", + // Tag: "9.0-ubi8", // Arches: []string{"amd64", "arm64", "ppc64le", "s390x"}, // }, }, diff --git a/test/extended/testdata/bindata.go b/test/extended/testdata/bindata.go index 052733981251..c007498a4fd7 100644 --- a/test/extended/testdata/bindata.go +++ b/test/extended/testdata/bindata.go @@ -9284,7 +9284,8 @@ var _examplesQuickstartsDjangoPostgresqlPersistentJson = []byte(`{ { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", + "value": "4.2.x" }, { "name": "CONTEXT_DIR", @@ -9833,7 +9834,8 @@ var _examplesQuickstartsDjangoPostgresqlJson = []byte(`{ { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", + "value": "4.2.x" }, { "name": "CONTEXT_DIR", @@ -28908,7 +28910,8 @@ var _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson = []byte(`{ { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", + "value": "4.2.x" }, { "name": "CONTEXT_DIR", diff --git a/test/extended/testdata/cluster/quickstarts/django-postgresql.json b/test/extended/testdata/cluster/quickstarts/django-postgresql.json index 6359561b6457..c9fd34a81bfd 100644 --- a/test/extended/testdata/cluster/quickstarts/django-postgresql.json +++ b/test/extended/testdata/cluster/quickstarts/django-postgresql.json @@ -458,7 +458,8 @@ { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", + "value": "4.2.x" }, { "name": "CONTEXT_DIR", From 9d9a672e33de379c4188bd347d3a78639bf01be5 Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Fri, 24 Oct 2025 16:35:41 +0100 Subject: [PATCH 02/10] OCPBUGS-63333 - Add Dot Net 8.0 to Origin Tests plus specifying branch for https://github.com/sclorg/django-ex.git --- .../image-streams/image-streams-centos7.json | 52 +++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/examples/image-streams/image-streams-centos7.json b/examples/image-streams/image-streams-centos7.json index edd6ac1a379a..2080cbf180fe 100644 --- a/examples/image-streams/image-streams-centos7.json +++ b/examples/image-streams/image-streams-centos7.json @@ -20,18 +20,18 @@ { "name": "latest", "annotations": { - "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/6.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", + "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET (Latest)", "sampleContextDir": "app", - "sampleRef": "dotnet-6.0", + "sampleRef": "dotnet-8.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet", "tags": "builder,.net,dotnet,dotnetcore,hidden" }, "from": { "kind": "ImageStreamTag", - "name": "6.0-ubi8" + "name": "8.0-ubi8" }, "generation": null, "importPolicy": {}, @@ -85,6 +85,52 @@ "type": "Local" } }, + { + "name": "8.0-ubi8", + "annotations": { + "description": "Build and run .NET 8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET 8 (UBI 8)", + "sampleContextDir": "app", + "sampleRef": "dotnet-8.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:8.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet80", + "version": "8.0" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-80:8.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "8.0", + "annotations": { + "description": "Build and run .NET 8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET 8 (UBI 8)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-8.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:8.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet80,hidden", + "version": "8.0" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-80:8.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, { "name": "3.1-ubi8", "annotations": { From 04bd47206900106251d0c1d1255b8275d7e67d3e Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Fri, 24 Oct 2025 16:37:47 +0100 Subject: [PATCH 03/10] OCPBUGS-63333 - Add Dot Net 8.0 to Origin Tests plus specifying branch for https://github.com/sclorg/django-ex.git --- test/extended/testdata/bindata.go | 52 +++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/test/extended/testdata/bindata.go b/test/extended/testdata/bindata.go index 69cff81940f8..a6712200ed25 100644 --- a/test/extended/testdata/bindata.go +++ b/test/extended/testdata/bindata.go @@ -2848,18 +2848,18 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ { "name": "latest", "annotations": { - "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/6.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", + "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET (Latest)", "sampleContextDir": "app", - "sampleRef": "dotnet-6.0", + "sampleRef": "dotnet-8.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet", "tags": "builder,.net,dotnet,dotnetcore,hidden" }, "from": { "kind": "ImageStreamTag", - "name": "6.0-ubi8" + "name": "8.0-ubi8" }, "generation": null, "importPolicy": {}, @@ -2913,6 +2913,52 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ "type": "Local" } }, + { + "name": "8.0-ubi8", + "annotations": { + "description": "Build and run .NET 8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET 8 (UBI 8)", + "sampleContextDir": "app", + "sampleRef": "dotnet-8.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:8.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet80", + "version": "8.0" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-80:8.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "8.0", + "annotations": { + "description": "Build and run .NET 8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET 8 (UBI 8)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-8.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:8.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet80,hidden", + "version": "8.0" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-80:8.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, { "name": "3.1-ubi8", "annotations": { From 7ff7eacf49a67f09a7aaad8d8cb3f683daa60df7 Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Tue, 28 Oct 2025 10:32:56 +0000 Subject: [PATCH 04/10] OCPBUGS-63333 - Add Dot Net 8.0 to Origin Tests plus specifying branch for https://github.com/sclorg/django-ex.git --- test/extended/util/compat_otp/framework.go | 2 +- test/extended/util/framework.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/extended/util/compat_otp/framework.go b/test/extended/util/compat_otp/framework.go index c60343a6cbe9..7785c0034b42 100644 --- a/test/extended/util/compat_otp/framework.go +++ b/test/extended/util/compat_otp/framework.go @@ -202,7 +202,7 @@ func WaitForOpenShiftNamespaceImageStreams(oc *exutil.CLI) error { if err != nil { return err } - langs := []string{"ruby", "nodejs", "perl", "php", "python", "mysql", "postgresql", "mongodb", "jenkins"} + langs := []string{"ruby", "nodejs", "perl", "php", "python", "mysql", "postgresql", "mongodb", "jenkins", "dotnet"} scan := func() bool { // check the samples operator to see about imagestream import status samplesOperatorConfig, err := oc.AdminConfigClient().ConfigV1().ClusterOperators().Get(context.Background(), "openshift-samples", metav1.GetOptions{}) diff --git a/test/extended/util/framework.go b/test/extended/util/framework.go index 82307ba5d8d4..e2074b40d402 100644 --- a/test/extended/util/framework.go +++ b/test/extended/util/framework.go @@ -313,7 +313,7 @@ func WaitForImageStreamImport(oc *CLI) error { // WaitForOpenShiftNamespaceImageStreams waits for the standard set of imagestreams to be imported func WaitForOpenShiftNamespaceImageStreams(oc *CLI) error { ctx := context.Background() - images := []string{"nodejs", "perl", "php", "python", "mysql", "postgresql", "jenkins"} + images := []string{"nodejs", "perl", "php", "python", "mysql", "postgresql", "jenkins", "dotnet"} hasSamplesOperator, err := IsCapabilityEnabled(oc, configv1.ClusterVersionCapabilityOpenShiftSamples) if err != nil { From 1c0a7f47b757f1a2157d541761d936a115048446 Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Tue, 28 Oct 2025 13:54:45 +0000 Subject: [PATCH 05/10] OCPBUGS-63333 - Add Dot Net 8.0 to Origin Tests plus specifying branch for https://github.com/sclorg/django-ex.git --- test/extended/image_ecosystem/scl.go | 53 ++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/test/extended/image_ecosystem/scl.go b/test/extended/image_ecosystem/scl.go index a3ec91e98cc2..898a2c8aa5c4 100644 --- a/test/extended/image_ecosystem/scl.go +++ b/test/extended/image_ecosystem/scl.go @@ -40,6 +40,43 @@ func skipArch(oc *exutil.CLI, arches []string) bool { return true } +// waitForImageStreamTag waits for a specific imagestream tag to be available in the registry +// with a timeout of 5 minutes +func waitForImageStreamTag(oc *exutil.CLI, imageName, tagName string) error { + e2e.Logf("waiting for imagestream %s:%s to be available in openshift namespace", imageName, tagName) + + timeout := 5 * time.Minute + err := wait.Poll(10*time.Second, timeout, func() (bool, error) { + is, err := oc.AsAdmin().ImageClient().ImageV1().ImageStreams("openshift").Get(context.Background(), imageName, metav1.GetOptions{}) + if err != nil { + e2e.Logf("failed to get imagestream %s: %v", imageName, err) + return false, nil + } + + // Check if the specific tag exists and has been imported + for _, tag := range is.Status.Tags { + if tag.Tag == tagName && len(tag.Items) > 0 { + e2e.Logf("imagestream %s:%s is available with %d items", imageName, tagName, len(tag.Items)) + return true, nil + } + } + + e2e.Logf("imagestream %s exists but tag %s is not ready yet", imageName, tagName) + return false, nil + }) + + if err != nil { + // Dump imagestream for debugging + out, dumpErr := oc.AsAdmin().Run("get").Args("is", imageName, "-n", "openshift", "-o", "yaml").Output() + if dumpErr == nil { + e2e.Logf("imagestream %s details:\n%s", imageName, out) + } + return fmt.Errorf("timed out waiting for imagestream %s:%s after %v: %v", imageName, tagName, timeout, err) + } + + return nil +} + // defineTest will create the gingko test. This ensures the test // is created with a local copy of all variables the test will need, // since the test may not run immediately and may run in parallel with other @@ -54,6 +91,14 @@ func defineTest(name string, t tc, oc *exutil.CLI) { return } e2e.Logf("%s:%s passed architecture compatibility", name, t.Tag) + + // Wait for dotnet imagestream to be available in the registry + if name == "dotnet" { + g.By(fmt.Sprintf("waiting for imagestream %s:%s to be available", name, t.Tag)) + err := waitForImageStreamTag(oc, name, t.Tag) + o.Expect(err).NotTo(o.HaveOccurred()) + } + g.By(fmt.Sprintf("creating a sample pod for %q", t.DockerImageReference)) pod := exutil.GetPodForContainer(kapiv1.Container{ Name: "test", @@ -106,6 +151,14 @@ func defineTest(name string, t tc, oc *exutil.CLI) { return } e2e.Logf("%s:%s passed architecture compatibility", name, t.Tag) + + // Wait for dotnet imagestream to be available in the registry + if name == "dotnet" { + g.By(fmt.Sprintf("waiting for imagestream %s:%s to be available", name, t.Tag)) + err := waitForImageStreamTag(oc, name, t.Tag) + o.Expect(err).NotTo(o.HaveOccurred()) + } + g.By(fmt.Sprintf("creating a sample pod for %q with /bin/bash -c command", t.DockerImageReference)) pod := exutil.GetPodForContainer(kapiv1.Container{ Image: t.DockerImageReference, From aae4d9968c6b2c2840aacc10e9b7546177f671fb Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Tue, 28 Oct 2025 14:09:22 +0000 Subject: [PATCH 06/10] Revert "OCPBUGS-63333 - Add Dot Net 8.0 to Origin Tests plus specifying branch for https://github.com/sclorg/django-ex.git" This reverts commit 1c0a7f47b757f1a2157d541761d936a115048446. --- test/extended/image_ecosystem/scl.go | 53 ---------------------------- 1 file changed, 53 deletions(-) diff --git a/test/extended/image_ecosystem/scl.go b/test/extended/image_ecosystem/scl.go index 898a2c8aa5c4..a3ec91e98cc2 100644 --- a/test/extended/image_ecosystem/scl.go +++ b/test/extended/image_ecosystem/scl.go @@ -40,43 +40,6 @@ func skipArch(oc *exutil.CLI, arches []string) bool { return true } -// waitForImageStreamTag waits for a specific imagestream tag to be available in the registry -// with a timeout of 5 minutes -func waitForImageStreamTag(oc *exutil.CLI, imageName, tagName string) error { - e2e.Logf("waiting for imagestream %s:%s to be available in openshift namespace", imageName, tagName) - - timeout := 5 * time.Minute - err := wait.Poll(10*time.Second, timeout, func() (bool, error) { - is, err := oc.AsAdmin().ImageClient().ImageV1().ImageStreams("openshift").Get(context.Background(), imageName, metav1.GetOptions{}) - if err != nil { - e2e.Logf("failed to get imagestream %s: %v", imageName, err) - return false, nil - } - - // Check if the specific tag exists and has been imported - for _, tag := range is.Status.Tags { - if tag.Tag == tagName && len(tag.Items) > 0 { - e2e.Logf("imagestream %s:%s is available with %d items", imageName, tagName, len(tag.Items)) - return true, nil - } - } - - e2e.Logf("imagestream %s exists but tag %s is not ready yet", imageName, tagName) - return false, nil - }) - - if err != nil { - // Dump imagestream for debugging - out, dumpErr := oc.AsAdmin().Run("get").Args("is", imageName, "-n", "openshift", "-o", "yaml").Output() - if dumpErr == nil { - e2e.Logf("imagestream %s details:\n%s", imageName, out) - } - return fmt.Errorf("timed out waiting for imagestream %s:%s after %v: %v", imageName, tagName, timeout, err) - } - - return nil -} - // defineTest will create the gingko test. This ensures the test // is created with a local copy of all variables the test will need, // since the test may not run immediately and may run in parallel with other @@ -91,14 +54,6 @@ func defineTest(name string, t tc, oc *exutil.CLI) { return } e2e.Logf("%s:%s passed architecture compatibility", name, t.Tag) - - // Wait for dotnet imagestream to be available in the registry - if name == "dotnet" { - g.By(fmt.Sprintf("waiting for imagestream %s:%s to be available", name, t.Tag)) - err := waitForImageStreamTag(oc, name, t.Tag) - o.Expect(err).NotTo(o.HaveOccurred()) - } - g.By(fmt.Sprintf("creating a sample pod for %q", t.DockerImageReference)) pod := exutil.GetPodForContainer(kapiv1.Container{ Name: "test", @@ -151,14 +106,6 @@ func defineTest(name string, t tc, oc *exutil.CLI) { return } e2e.Logf("%s:%s passed architecture compatibility", name, t.Tag) - - // Wait for dotnet imagestream to be available in the registry - if name == "dotnet" { - g.By(fmt.Sprintf("waiting for imagestream %s:%s to be available", name, t.Tag)) - err := waitForImageStreamTag(oc, name, t.Tag) - o.Expect(err).NotTo(o.HaveOccurred()) - } - g.By(fmt.Sprintf("creating a sample pod for %q with /bin/bash -c command", t.DockerImageReference)) pod := exutil.GetPodForContainer(kapiv1.Container{ Image: t.DockerImageReference, From baac27f79ad27669c9d8b9d3e01405e049252f5d Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Tue, 28 Oct 2025 14:19:42 +0000 Subject: [PATCH 07/10] Revert "OCPBUGS-63333 - Add Dot Net 8.0 to Origin Tests plus specifying branch for https://github.com/sclorg/django-ex.git" This reverts commit 7ff7eacf49a67f09a7aaad8d8cb3f683daa60df7. --- test/extended/util/compat_otp/framework.go | 2 +- test/extended/util/framework.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/extended/util/compat_otp/framework.go b/test/extended/util/compat_otp/framework.go index 7785c0034b42..c60343a6cbe9 100644 --- a/test/extended/util/compat_otp/framework.go +++ b/test/extended/util/compat_otp/framework.go @@ -202,7 +202,7 @@ func WaitForOpenShiftNamespaceImageStreams(oc *exutil.CLI) error { if err != nil { return err } - langs := []string{"ruby", "nodejs", "perl", "php", "python", "mysql", "postgresql", "mongodb", "jenkins", "dotnet"} + langs := []string{"ruby", "nodejs", "perl", "php", "python", "mysql", "postgresql", "mongodb", "jenkins"} scan := func() bool { // check the samples operator to see about imagestream import status samplesOperatorConfig, err := oc.AdminConfigClient().ConfigV1().ClusterOperators().Get(context.Background(), "openshift-samples", metav1.GetOptions{}) diff --git a/test/extended/util/framework.go b/test/extended/util/framework.go index e2074b40d402..82307ba5d8d4 100644 --- a/test/extended/util/framework.go +++ b/test/extended/util/framework.go @@ -313,7 +313,7 @@ func WaitForImageStreamImport(oc *CLI) error { // WaitForOpenShiftNamespaceImageStreams waits for the standard set of imagestreams to be imported func WaitForOpenShiftNamespaceImageStreams(oc *CLI) error { ctx := context.Background() - images := []string{"nodejs", "perl", "php", "python", "mysql", "postgresql", "jenkins", "dotnet"} + images := []string{"nodejs", "perl", "php", "python", "mysql", "postgresql", "jenkins"} hasSamplesOperator, err := IsCapabilityEnabled(oc, configv1.ClusterVersionCapabilityOpenShiftSamples) if err != nil { From 7a1e34a595100efe5a88f02ed92a1004292c83b1 Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Tue, 28 Oct 2025 18:03:48 +0000 Subject: [PATCH 08/10] OCPBUGS-63333 - Add Dot Net 9.0 to Origin Tests --- .../image-streams/image-streams-centos7.json | 38 +++++++++---------- test/extended/image_ecosystem/s2i_images.go | 12 +++--- test/extended/testdata/bindata.go | 38 +++++++++---------- 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/examples/image-streams/image-streams-centos7.json b/examples/image-streams/image-streams-centos7.json index 2080cbf180fe..e46da78b11ac 100644 --- a/examples/image-streams/image-streams-centos7.json +++ b/examples/image-streams/image-streams-centos7.json @@ -20,18 +20,18 @@ { "name": "latest", "annotations": { - "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", + "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET (Latest)", "sampleContextDir": "app", - "sampleRef": "dotnet-8.0", + "sampleRef": "dotnet-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet", "tags": "builder,.net,dotnet,dotnetcore,hidden" }, "from": { "kind": "ImageStreamTag", - "name": "8.0-ubi8" + "name": "9.0-ubi8" }, "generation": null, "importPolicy": {}, @@ -86,21 +86,21 @@ } }, { - "name": "8.0-ubi8", + "name": "9.0-ubi8", "annotations": { - "description": "Build and run .NET 8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.", + "description": "Build and run .NET 9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET 8 (UBI 8)", + "openshift.io/display-name": ".NET 9 (UBI 8)", "sampleContextDir": "app", - "sampleRef": "dotnet-8.0", + "sampleRef": "dotnet-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", - "supports": "dotnet:8.0,dotnet", - "tags": "builder,.net,dotnet,dotnetcore,dotnet80", - "version": "8.0" + "supports": "dotnet:9.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet90", + "version": "9.0" }, "from": { "kind": "DockerImage", - "name": "registry.access.redhat.com/ubi8/dotnet-80:8.0" + "name": "registry.access.redhat.com/ubi8/dotnet-90:9.0" }, "generation": null, "importPolicy": {}, @@ -109,21 +109,21 @@ } }, { - "name": "8.0", + "name": "9.0", "annotations": { - "description": "Build and run .NET 8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.", + "description": "Build and run .NET 9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET 8 (UBI 8)", + "openshift.io/display-name": ".NET 9 (UBI 8)", "sampleContextDir": "app", - "sampleRef": "dotnetcore-8.0", + "sampleRef": "dotnetcore-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", - "supports": "dotnet:8.0,dotnet", - "tags": "builder,.net,dotnet,dotnetcore,dotnet80,hidden", - "version": "8.0" + "supports": "dotnet:9.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet90,hidden", + "version": "9.0" }, "from": { "kind": "DockerImage", - "name": "registry.access.redhat.com/ubi8/dotnet-80:8.0" + "name": "registry.access.redhat.com/ubi8/dotnet-90:9.0" }, "generation": null, "importPolicy": {}, diff --git a/test/extended/image_ecosystem/s2i_images.go b/test/extended/image_ecosystem/s2i_images.go index 7e17a53781f2..e5367fb846ef 100644 --- a/test/extended/image_ecosystem/s2i_images.go +++ b/test/extended/image_ecosystem/s2i_images.go @@ -252,17 +252,17 @@ var s2iImages = map[string][]tc{ }, "dotnet": { { - Version: "80", + Version: "90", Cmd: "dotnet --version", - Expected: "8.0", - Tag: "8.0-ubi8", + Expected: "9.0", + Tag: "9.0-ubi8", Arches: []string{"amd64", "arm64", "s390x"}, }, // { - // Version: "90", + // Version: "100", // Cmd: "dotnet --version", - // Expected: "9.0", - // Tag: "9.0-ubi8", + // Expected: "10.0", + // Tag: "10.0-ubi8", // Arches: []string{"amd64", "arm64", "ppc64le", "s390x"}, // }, }, diff --git a/test/extended/testdata/bindata.go b/test/extended/testdata/bindata.go index a6712200ed25..26a06ec3335f 100644 --- a/test/extended/testdata/bindata.go +++ b/test/extended/testdata/bindata.go @@ -2848,18 +2848,18 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ { "name": "latest", "annotations": { - "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", + "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET (Latest)", "sampleContextDir": "app", - "sampleRef": "dotnet-8.0", + "sampleRef": "dotnet-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet", "tags": "builder,.net,dotnet,dotnetcore,hidden" }, "from": { "kind": "ImageStreamTag", - "name": "8.0-ubi8" + "name": "9.0-ubi8" }, "generation": null, "importPolicy": {}, @@ -2914,21 +2914,21 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ } }, { - "name": "8.0-ubi8", + "name": "9.0-ubi8", "annotations": { - "description": "Build and run .NET 8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.", + "description": "Build and run .NET 9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET 8 (UBI 8)", + "openshift.io/display-name": ".NET 9 (UBI 8)", "sampleContextDir": "app", - "sampleRef": "dotnet-8.0", + "sampleRef": "dotnet-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", - "supports": "dotnet:8.0,dotnet", - "tags": "builder,.net,dotnet,dotnetcore,dotnet80", - "version": "8.0" + "supports": "dotnet:9.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet90", + "version": "9.0" }, "from": { "kind": "DockerImage", - "name": "registry.access.redhat.com/ubi8/dotnet-80:8.0" + "name": "registry.access.redhat.com/ubi8/dotnet-90:9.0" }, "generation": null, "importPolicy": {}, @@ -2937,21 +2937,21 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ } }, { - "name": "8.0", + "name": "9.0", "annotations": { - "description": "Build and run .NET 8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/8.0/build/README.md.", + "description": "Build and run .NET 9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET 8 (UBI 8)", + "openshift.io/display-name": ".NET 9 (UBI 8)", "sampleContextDir": "app", - "sampleRef": "dotnetcore-8.0", + "sampleRef": "dotnetcore-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", - "supports": "dotnet:8.0,dotnet", - "tags": "builder,.net,dotnet,dotnetcore,dotnet80,hidden", - "version": "8.0" + "supports": "dotnet:9.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet90,hidden", + "version": "9.0" }, "from": { "kind": "DockerImage", - "name": "registry.access.redhat.com/ubi8/dotnet-80:8.0" + "name": "registry.access.redhat.com/ubi8/dotnet-90:9.0" }, "generation": null, "importPolicy": {}, From 8cdb0d928432d9f6eb9cfcee912951d0684df5d3 Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Wed, 29 Oct 2025 11:36:59 +0000 Subject: [PATCH 09/10] For .NET 9.0, explicitly run the usage script to work around Terminal Logger issues --- test/extended/image_ecosystem/scl.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/test/extended/image_ecosystem/scl.go b/test/extended/image_ecosystem/scl.go index a3ec91e98cc2..af9749192f26 100644 --- a/test/extended/image_ecosystem/scl.go +++ b/test/extended/image_ecosystem/scl.go @@ -55,10 +55,25 @@ func defineTest(name string, t tc, oc *exutil.CLI) { } e2e.Logf("%s:%s passed architecture compatibility", name, t.Tag) g.By(fmt.Sprintf("creating a sample pod for %q", t.DockerImageReference)) - pod := exutil.GetPodForContainer(kapiv1.Container{ + container := kapiv1.Container{ Name: "test", Image: t.DockerImageReference, - }) + } + + // For .NET 9.0, explicitly run the usage script to work around Terminal Logger issues + // See: https://developers.redhat.com/articles/2024/11/15/net-9-now-available-rhel-and-openshift + if name == "dotnet" && strings.Contains(t.Tag, "9.0") { + e2e.Logf("Setting explicit command for .NET 9.0 to run usage script") + container.Command = []string{"/usr/libexec/s2i/usage"} + } + + pod := exutil.GetPodForContainer(container) + + // Set restart policy to Never for .NET 9.0 to match the expected behavior + if name == "dotnet" && strings.Contains(t.Tag, "9.0") { + pod.Spec.RestartPolicy = kapiv1.RestartPolicyNever + } + _, err := oc.KubeClient().CoreV1().Pods(oc.Namespace()).Create(context.Background(), pod, metav1.CreateOptions{}) o.Expect(err).NotTo(o.HaveOccurred()) From 41f27d2581960a3f2fdc01c849ba2889adf8feda Mon Sep 17 00:00:00 2001 From: Deirdre Malone Date: Wed, 29 Oct 2025 11:59:56 +0000 Subject: [PATCH 10/10] For .NET 9.0, explicitly run the usage script to work around Terminal Logger issues V2 --- test/extended/image_ecosystem/scl.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/extended/image_ecosystem/scl.go b/test/extended/image_ecosystem/scl.go index af9749192f26..e4cb6ec4192e 100644 --- a/test/extended/image_ecosystem/scl.go +++ b/test/extended/image_ecosystem/scl.go @@ -69,11 +69,6 @@ func defineTest(name string, t tc, oc *exutil.CLI) { pod := exutil.GetPodForContainer(container) - // Set restart policy to Never for .NET 9.0 to match the expected behavior - if name == "dotnet" && strings.Contains(t.Tag, "9.0") { - pod.Spec.RestartPolicy = kapiv1.RestartPolicyNever - } - _, err := oc.KubeClient().CoreV1().Pods(oc.Namespace()).Create(context.Background(), pod, metav1.CreateOptions{}) o.Expect(err).NotTo(o.HaveOccurred())