Add DRA e2e CI test#1847
Conversation
✅ Deploy Preview for openshift-kmm ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TomerNewman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Warning Review limit reached
Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR adds a new DRA (Dynamic Resource Allocation) end-to-end test suite: Kubernetes manifests for a KMM Module with a DRA driver and DeviceClass, a consumer Pod using a ResourceClaimTemplate, and a Prow Bash script validating the full DRA lifecycle from module load through cleanup. ChangesDRA e2e test addition
Estimated code review effort: 2 (Simple) | ~12 minutes Related issues: Sequence Diagram(s)sequenceDiagram
participant Script as e2e-dra script
participant Cluster as OpenShift Cluster
participant Module as kmm-ci-dra Module
participant DaemonSet as DRA DaemonSet
participant Pod as dra-consumer Pod
Script->>Cluster: label worker node, create build secret
Script->>Module: apply module-kmm-ci-dra.yaml
Module->>DaemonSet: create DRA driver DaemonSet and DeviceClass
Script->>DaemonSet: wait for ready, verify ResourceSlices
Script->>Cluster: apply dra-consumer-pod.yaml
Cluster->>Pod: schedule with resourceClaim
Script->>Pod: wait for Ready
Script->>Pod: delete consumer pod
Script->>Module: delete module
Script->>Cluster: assert DaemonSet/DeviceClass removed, module unloaded
Suggested reviewers: yevgeny-shnaidman, qbarrand 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ci/e2e-dra/dra-consumer-pod.yaml (1)
14-38: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low valueConsumer pod runs without privilege-escalation/root hardening.
Checkov flags this pod for missing
allowPrivilegeEscalation: falseand non-root enforcement. Since this is a throwaway busybox e2e test pod, risk is minimal, but adding a minimalsecurityContextcosts little.🛡️ Optional hardening
containers: - name: consumer image: busybox:1.36 command: ["sh", "-c", "sleep infinity"] + securityContext: + allowPrivilegeEscalation: false + runAsNonRoot: true resources: claims: - name: gpu🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ci/e2e-dra/dra-consumer-pod.yaml` around lines 14 - 38, The dra-consumer pod is missing basic container hardening settings. Update the consumer container in the dra-consumer pod spec to add a minimal securityContext that disables privilege escalation and enforces non-root execution. Use the existing container definition under the consumer container to keep the change scoped to this busybox test pod.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@ci/e2e-dra/dra-consumer-pod.yaml`:
- Around line 14-38: The dra-consumer pod is missing basic container hardening
settings. Update the consumer container in the dra-consumer pod spec to add a
minimal securityContext that disables privilege escalation and enforces non-root
execution. Use the existing container definition under the consumer container to
keep the change scoped to this busybox test pod.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3e085c02-98a8-4a74-be86-0d2c2e1b6db2
📒 Files selected for processing (3)
ci/e2e-dra/dra-consumer-pod.yamlci/e2e-dra/module-kmm-ci-dra.yamlci/prow/e2e-dra
Add an end-to-end test that validates the full DRA lifecycle: DaemonSet creation, DeviceClass management, node labeling, status reporting, and cleanup on Module deletion.
0e32b2d to
2f409ac
Compare
| container: | ||
| modprobe: | ||
| moduleName: kmm_ci_a | ||
| modulesLoadingOrder: [kmm_ci_a, kmm_ci_b] |
There was a problem hiding this comment.
any special reason for loading 2 kernel modules?
There was a problem hiding this comment.
I will remove it, but since it exist also in u/s, I suggest to merge it, and then do the fix in u/s and then backport to here
|
I am happy with this PR when @yevgeny-shnaidman is. |
|
/lgtm |
33d1d14
into
rh-ecosystem-edge:main
Add an end-to-end test that validates the full DRA lifecycle: DaemonSet creation, DeviceClass management, node labeling, status reporting, and cleanup on Module deletion.
/cc @yevgeny-shnaidman @ybettan
/assign @ybettan @yevgeny-shnaidman
fixes #1846
Summary by CodeRabbit