Skip to content

Conversation

@asahay19
Copy link

Starting from OpenShift 4.21 (Kubernetes 1.34), beta APIs are disabled by default.This PR migrates all DRA test code from resource.k8s.io/v1beta1 to resource.k8s.io/v1

Changes include:

  • Updated all Go imports and client calls
  • Restructured DeviceRequest to use the new Exactly field
  • Updated Device struct access (removed Basic field)
  • Migrated YAML test manifests to v1 API
  • Updated JSON configs in MPS and time-slicing tests
  • Tested against: OpenShift 4.21+ cluster with beta APIs disabled
  • Relates to: [WIP] DRA e2e test to validate Nvidia gpu openshift/origin#29842

Miciah and others added 30 commits September 24, 2025 19:31
* test/extended/router/gatewayapicontroller.go (istioName): Declare
const.
(waitForIstioHealthy): Use the new const instead of a string literal.
* test/extended/router/gatewayapicontroller.go: Delete the Istio CR and
wait for the istiod pod to be deleted as part of the test cleanup.
Replace BeforeAll and AfterAll with BeforeEach and AfterEach,
respectively, and add explicit logic to prevent the cleanup logic
in AfterEach from running before the tests are all done.

Because of the way that Origin tests are run, BeforeAll and AfterAll
actually behave as BeforeEach and AfterEach.  That is, an AfterAll block
is run not once after all the specs in the Describe container are done
but rather once after each spec, and similarly, a BeforeAll block is run
before each spec.  Before this change, the cleanup logic was happening
after every spec, meaning OSSM was being uninstalled and re-installed
between each test, which caused a lot of churn and flakiness.

This change replaces BeforeAll and AfterAll because using them is
misleading.  This change also makes the tests faster and more reliable.

* gatewayapicontroller.go (gatewayClassName): Move declaration from the
Describe block to the package level so that helpers can use it.
(ossmAndOLMResourcesCreated, defaultGatewayclassAccepted)
(customGatewayclassAccepted, lbAndServiceAndDnsrecordAreCreated)
(httprouteObjectCreated, gieEnabled): New consts used to identify tests.
(testNames): New variable with a list of all tests in the file.
(Describe): Replace BeforeAll and AfterAll with BeforeEach and
AfterEach.  Use checkAllTestsDone in the AfterEach block to skip cleanup
while tests are still running.  Use a deferred call to markTestDone in
each test's It block to mark the test as done when it finishes.
(annotationKeyForTest): New helper.  Return the key for an annotation on
the default gatewayclass that indicates whether a given test is done.
(markTestDone): New helper.  Add an annotation to the default
gatewayclass to indicate that a test is done.
(checkAllTestsDone): New helper. Check the default gatewayclass's
annotations and return a Boolean value indicating whether all tests are
done.
* test/extended/pods/priorityclasses.go (excludedPriorityClassPods): Add
an override for Istio gateway pods.
* test/extended/cpu_partitioning/pods.go
(excludedBestEffortDeployments): Add an override for Istio gateway pods.
TRT-2071: Remove annotations and replace with environment selector based test skipping and disablement
…eratorDown

OTA-1626: Fail CI if alert/ClusterOperatorDegraded is fired
OCPQE-30698:enable OTE for olmv0
OCPBUGS-61398: fix(ginkgo): avoid nil deref and harden env var setup
OCPERT-151: Migrate new func for Compare structured data instead of string from openshift-test-private repo
OCPBUGS-62227: bump telemetry series limit to 1000
…ated---update-synthetic-test-data

NO-ISSUE: Automated - Update synthetic test data
MCO-1875: Bump timeout for vSphereBootimageUpdate tests
NO-JIRA: Add olm into the known operator set
Revert "NO-JIRA: Add olm into the known operator set"
Validates that KubeVirt VMs with preconfigured MAC and IP addresses
maintain those addresses correctly before and after a vmi with duplicate
IP/MAC request is made, and that the vmi with the duplicate address get
the appropriate address conflict error event.

Co-authored-by: Miguel Duarte Barroso <[email protected]>
Signed-off-by: Ram Lavi <[email protected]>
The requested IPs for the primary UDN attachment are not in the VMI
spec, but in an annotation in the VMI. Hence, we need to fetch that
particular annotation, and set it in the duplicate VMI.

This was implemented using the builder pattern, since I suspect in the
future we will need to further customize the VMI spec / metadata; this
will make it simpler to extend the framework in the future.

Signed-off-by: Miguel Duarte Barroso <[email protected]>
This way we can ensure appropriate cases are caught in a generic way.
With it, we can safely expect to find IP conflicts when there are
duplicate IPs in the network.
In future commits, we will be able to catch MAC conflicts when there are
duplicate MACs in the network

Co-authored-by: Ram Lavi <[email protected]>
Signed-off-by: Miguel Duarte Barroso <[email protected]>
openshift-merge-bot bot and others added 29 commits October 29, 2025 22:08
TRT-2373: Revert "Revert "Merge pull request openshift#30269 from hongkailiu/OTA-1626""
…cy-e2e

STOR-2340: Add e2e tests for storage network policy
This change adds a showInfo boolean field to the CLI struct to prevent
sensitive data exposure in test logs. While RedactBearerToken() helps
with bearer tokens, commands like 'oc set data secret --from-literal=password=secret'
would still expose sensitive data.

Changes:
- Add showInfo field to CLI struct (default: true for backward compatibility)
- Modify start() to conditionally call framework.Logf based on showInfo
- Implement NotShowInfo() and SetShowInfo() methods in util_otp.go
- Initialize showInfo=true in all CLI constructor functions

Usage:
  cli.NotShowInfo().Run("set", "data", "secret", ...).Execute()

Fixes: https://issues.redhat.com/browse/OCPERT-201
…net-8

OCPBUGS-63333: Add Dot Net 9.0 to Origin Tests
TRT-2386: Revert "Revert "Merge pull request openshift#30296 from hongkailiu/OTA-1637-reboot""
OCPBUGS-55755: Create intervals when etcd disk metrics are  over upstream recommended thresholds
The missing ClusterOperatorDown runbook URL was addressed in [1].
The missing ClusterVersionOperatorDown runbook URL was addressed in [2].

[1]: openshift/cluster-version-operator#1036
[2]: openshift/cluster-version-operator#1250
…cpert-201

NO-JIRA: Add showInfo flag to control CLI command logging
…ated---update-synthetic-test-data

NO-ISSUE: Automated - Update synthetic test data
…ionOperatorDown-exception

OCPBUGS-14246: Remove exceptions for missing CVO alert runbook URLs
…pod-deletion

OCPBUGS-63478: Check operators for pod deletion
- use helm.sh/helm/v3 v3.18.0
- pin to the current version of
github.com/distribution/distribution/v3 being used
@asahay19 asahay19 closed this Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.