Skip to content

Conversation

@sairameshv
Copy link
Member

@sairameshv sairameshv commented Nov 5, 2025

  • DynamicResourceAllocation feature has been graduated to GA
  • We need a few e2e tests defined downstream for this featuregate to be enabled to the Default cluster type
  • Added a test to validate the downstream specific code that depends on the DynamicResourceAllocation featuregate

Helps in promoting openshift/api#2498

Tests generated by Claude

cc: @tkashem @haircommander

- DynamicResourceAllocation has been graduated to GA
- We need a few e2e tests defined downstream for this featuregate to be
  enabled to the Default cluster type

Signed-off-by: Sai Ramesh Vanka <[email protected]>
@openshift-ci openshift-ci bot requested review from deads2k and p0lyn0mial November 5, 2025 15:43
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 5, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sairameshv
Once this PR has been reviewed and has the lgtm label, please assign dgoodwin for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sairameshv sairameshv changed the title Add e2e tests to validate DRA Add e2e tests to validate DRA APIs Nov 5, 2025
depends on the DynamicResourceAllocation featuregate

Signed-off-by: Sai Ramesh Vanka <[email protected]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 6, 2025

@sairameshv: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-microshift c97ac81 link true /test e2e-aws-ovn-microshift
ci/prow/e2e-metal-ipi-ovn-ipv6 c97ac81 link true /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-vsphere-ovn c97ac81 link true /test e2e-vsphere-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-trt
Copy link

openshift-trt bot commented Nov 6, 2025

Job Failure Risk Analysis for sha: c97ac81

Job Name Failure Risk
pull-ci-openshift-origin-main-e2e-gcp-csi High
Undiagnosed panic detected in pod
This test has passed 99.93% of 2978 runs on release 4.21 [Overall] in the last week.

Open Bugs
Undiagnosed Panic: openshift-cloud-controller-manager_azure-cloud-node-manager

Risk analysis has seen new tests most likely introduced by this PR.
Please ensure that new tests meet guidelines for naming and stability.

New Test Risks for sha: c97ac81

Job Name New Test Risk
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-api-machinery] API Streaming (aka. WatchList) [FeatureGate:WatchList] [Beta] [Serial] server supports sending resources in Table format" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-api-machinery] API Streaming (aka. WatchList) [FeatureGate:WatchList] [Beta] [Serial] should NOT be requested by client-go's List method when WatchListClient is enabled" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-api-machinery] API Streaming (aka. WatchList) [FeatureGate:WatchList] [Beta] [Serial] should NOT be requested by metadata client's List method when WatchListClient is enabled" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-node] NoExecuteTaintManager Multiple Pods [Serial] only evicts pods without tolerations from tainted nodes" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-node] NoExecuteTaintManager Single Pod [Serial] pods evicted from tainted nodes have pod disruption condition" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-node] Pod Level Resources [Serial] [Feature:PodLevelResources] [FeatureGate:PodLevelResources] [Beta] Burstable QoS pod, 1 container with resources" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-scheduling] Multi-AZ Clusters should spread the pods of a service across zones [Serial]" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-scheduling] SchedulerPredicates [Serial] PodTopologySpread Filtering validates 4 pods with MaxSkew=1 are evenly distributed into 2 nodes" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-storage] CSI Mock selinux on mount metrics and SELinuxWarningController SELinuxMount metrics [LinuxOnly] [Feature:SELinux] [Serial] warning is bumped on two Pods with a different context on RWO volume [FeatureGate:SELinuxMountReadWriteOncePod] [Beta] [FeatureGate:SELinuxChangePolicy] [Beta] [Feature:SELinuxMountReadWriteOncePodOnly]" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-storage] CSI Mock selinux on mount metrics and SELinuxWarningController SELinuxMount metrics [LinuxOnly] [Feature:SELinux] [Serial] warning is bumped on two Pods with different policies on RWO volume [FeatureGate:SELinuxMountReadWriteOncePod] [Beta] [FeatureGate:SELinuxChangePolicy] [Beta] [Feature:SELinuxMountReadWriteOncePodOnly]" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-storage] [Serial] Volume metrics Ephemeral should create volume metrics with the correct BlockMode PVC ref" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-storage] [Serial] Volume metrics PVC should create volume metrics in Volume Manager" is a new test, and was only seen in one job.
pull-ci-openshift-origin-main-e2e-aws-ovn-serial-1of2 Medium - "[sig-storage] [Serial] Volume metrics PVC should create volume metrics with the correct FilesystemMode PVC ref" is a new test, and was only seen in one job.

New tests seen in this PR at sha: c97ac81

  • "[sig-api-machinery] API Streaming (aka. WatchList) [FeatureGate:WatchList] [Beta] [Serial] server supports sending resources in Table format" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-api-machinery] API Streaming (aka. WatchList) [FeatureGate:WatchList] [Beta] [Serial] should NOT be requested by client-go's List method when WatchListClient is enabled" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-api-machinery] API Streaming (aka. WatchList) [FeatureGate:WatchList] [Beta] [Serial] should NOT be requested by metadata client's List method when WatchListClient is enabled" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-api-machinery] CBOR [Feature:CBOR] clients remain compatible with the 1.17 sample-apiserver [Serial]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-api-machinery] Namespaces [Serial] should always delete fast (ALL of 100 namespaces in 150 seconds) [Feature:ComprehensiveNamespaceDraining]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-apps] Daemon set [Serial] should not update pod when spec was updated and update strategy is OnDelete" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-apps] Daemon set [Serial] should surge pods onto nodes when spec was updated and update strategy is RollingUpdate" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-apps] DisruptionController evictions: maxUnavailable deny evictions, integer => should not allow an eviction [Serial]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-apps] Job should run a job to completion with CPU requests [Serial]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-network] IngressClass [Feature:Ingress] should choose the one with the later CreationTimestamp, if equal the one with the lower name when two ingressClasses are marked as default [Serial]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-network] IngressClass [Feature:Ingress] should set default value on new IngressClass [Serial]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-network] Networking should allow creating a Pod with an SCTP HostPort [LinuxOnly] [Serial]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-network] Services should allow creating a basic SCTP service with pod and endpoints [LinuxOnly] [Serial]" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-node] NoExecuteTaintManager Multiple Pods [Serial] only evicts pods without tolerations from tainted nodes" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-node] NoExecuteTaintManager Single Pod [Serial] pods evicted from tainted nodes have pod disruption condition" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-node] Pod Level Resources [Serial] [Feature:PodLevelResources] [FeatureGate:PodLevelResources] [Beta] Burstable QoS pod, 1 container with resources" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-scheduling] Multi-AZ Clusters should spread the pods of a service across zones [Serial]" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-scheduling] SchedulerPredicates [Serial] PodTopologySpread Filtering validates 4 pods with MaxSkew=1 are evenly distributed into 2 nodes" [Total: 1, Pass: 1, Fail: 0, Flake: 0]
  • "[sig-scheduling] SchedulerPredicates [Serial] validates local ephemeral storage resource limits of pods that are allowed to run" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • "[sig-scheduling] SchedulerPredicates [Serial] validates that taints-tolerations is respected if matching" [Total: 2, Pass: 2, Fail: 0, Flake: 0]
  • (...showing 20 of 31 tests)

Copy link
Contributor

@tkashem tkashem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should verify beta and alpha DRA APIs are disabled adds value for OpenShift, other tests are already covered by the upstream tests

pollInterval = 2 * time.Second
)

var _ = g.Describe("[sig-scheduling][OCPFeatureGate:DynamicResourceAllocation]", func() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DRA spans across multiple sigs, but if we have to pick a sig, i would probably go with sig-node, the upstream DRA tests use sig-node as well if i am not mistaken

Also, can we add the label "DRA" to these tests? (so searching with DRA shows both upstream and these tests)


g.Context("Dynamic Resource Allocation", func() {

g.It("should create and list DeviceClass resources [apigroup:resource.k8s.io]", func(ctx context.Context) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o.Expect(err).NotTo(o.HaveOccurred(), "failed to delete ResourceClaim")

g.By("verifying the ResourceClaim was deleted")
err = wait.PollUntilContextTimeout(ctx, pollInterval, draTestTimeout, true, func(ctx context.Context) (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need polling here? i would expect the first invocation of Get to succeed

o.Expect(len(dcList.Items)).To(o.BeNumerically(">", 0), "expected at least one DeviceClass")
})

g.It("should create and manage ResourceClaim lifecycle [apigroup:resource.k8s.io]", func(ctx context.Context) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o.Expect(createdPod.Spec.ResourceClaims[0].ResourceClaimTemplateName).NotTo(o.BeNil())

g.By("verifying a generated ResourceClaim was created from the template")
// The generated claim name follows the pattern: <pod-name>-<claim-name>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OwnerReferences of the expected claim should include the pod as an owner

// The generated claim name follows the pattern: <pod-name>-<claim-name>

var generatedClaim *resourcev1.ResourceClaim
err = wait.PollUntilContextTimeout(ctx, pollInterval, draTestTimeout, true, func(ctx context.Context) (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: gomega.Eventually?

o.Expect(err).NotTo(o.HaveOccurred(), "external ResourceClaim should persist after pod deletion")
})

g.It("should create and manage ResourceClaimTemplate [apigroup:resource.k8s.io]", func(ctx context.Context) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o.Expect(err).NotTo(o.HaveOccurred(), "failed to list ResourceSlices - API should be accessible")

// ResourceSlices are created by DRA drivers, so we may not have any in a cluster
// without DRA drivers installed. Just verify the API is accessible.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this test providing any value (upstream tests already cover this)

framework.Logf("Available versions for resource.k8s.io: %v", resourceAPIGroup.Versions)

// Verify only v1 is in the list
hasV1 := false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we just compare to an array with the expected v1?

  "versions": [
    {
      "groupVersion": "resource.k8s.io/v1",
      "version": "v1"
    }
  ],

})

// Adding a test for the DynamicResourceAllocation field in Scheduler ProfileCustomizations that depends on downstream DynamicResourceAllocation feature gate.
g.It("should support DynamicResourceAllocation field in Scheduler ProfileCustomizations [apigroup:config.openshift.io]", func(ctx context.Context) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what value this test provides specific to DRA, if we want to validate that setting this value to either true or false enables/disables the dra plugin in the scheduler, then the test needs to wait for the scheduler to rollout and then validates appropriately.

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.

2 participants