NO-JIRA: E2E: remove obsolete ContainerRuntimeConfig runtime-switch test#1510
NO-JIRA: E2E: remove obsolete ContainerRuntimeConfig runtime-switch test#1510mrniranjan wants to merge 2 commits intoopenshift:mainfrom
Conversation
WalkthroughThe PR refactors e2e performanceprofile tests: it removes a runc-related CPU usage test and associated JSON parsing helpers, and simplifies the ContainerRuntimeConfig test context to only prepare a pod template with RuntimeClassName (removing prior ContainerRuntimeConfig/MCP/HyperShift setup and teardown). ChangesContainerRuntimeConfig Test Refactoring
Removal of runc CPU usage test and helpers
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mrniranjan The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go (1)
1170-1170: ⚡ Quick winRename the Context — "ContainerRuntimeConfig" no longer reflects its contents.
After removing the runtime-switch
DescribeTable, the only remaining child of this Context is theWhen("exec-cpu-affinity is disabled", ...)block, which is unrelated toContainerRuntimeConfig. Either rename the Context to describe the exec-cpu-affinity behavior under test, or move the innerWhenblock under the existing exec-cpu-affinity-related parent. Leaving it as-is will mislead future readers and grep-based test selection.♻️ Suggested rename
- Context("ContainerRuntimeConfig", Ordered, Label(string(label.Tier2)), Label("bug"), func() { + Context("Exec CPU affinity", Ordered, Label(string(label.Tier2)), Label("bug"), func() {🤖 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 `@test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go` at line 1170, The Context named "ContainerRuntimeConfig" no longer matches its contents; locate the Context declaration with the string "ContainerRuntimeConfig" and either rename it to reflect the exec-cpu-affinity behavior being tested (e.g., mention "exec-cpu-affinity disabled") or move the When("exec-cpu-affinity is disabled", ...) block under the existing parent Context that already groups exec-cpu-affinity tests; update only the Context name or reparent the When block so the test hierarchy and grep-based selection remain accurate.
🤖 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
`@test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go`:
- Line 1170: The Context named "ContainerRuntimeConfig" no longer matches its
contents; locate the Context declaration with the string
"ContainerRuntimeConfig" and either rename it to reflect the exec-cpu-affinity
behavior being tested (e.g., mention "exec-cpu-affinity disabled") or move the
When("exec-cpu-affinity is disabled", ...) block under the existing parent
Context that already groups exec-cpu-affinity tests; update only the Context
name or reparent the When block so the test hierarchy and grep-based selection
remain accurate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: cbac5a0d-fb04-4dae-b8e5-26dc97bada1c
📒 Files selected for processing (1)
test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go
9c7fcd6 to
3d4be59
Compare
|
Thank you for the PR, it looks good to me overall. There are some nit-pick comments by the automated review. I believe they're worth considering addressing. |
The ContainerRuntimeConfig test verified switching the container runtime via CTRCFG, but this is no longer relevant: runc is deprecated and crun is now the default runtime, making the CTRCFG a no-op. Remove the DescribeTable and associated helper functions (newContainerRuntimeConfig, getContainerRuntimeConfigFrom) along with their unused imports. Signed-off-by: Niranjan M.R <mniranja@redhat.com>
Remove test_id 74461 which verified runc's CPU exclusion behavior for guaranteed pods. runc is deprecated and crun is now the default container runtime, making this test obsolete. Also remove associated helper functions (extractConfigInfo, getConfigJsonInfo) and struct types (ContainerConfig, CPUVals, CPUResources, LinuxResources, Process, Annotations) that were exclusively used by this test. Co-authored-by: Cursor <cursoragent@cursor.com>
3d4be59 to
e7ec165
Compare
|
@mrniranjan: This pull request explicitly references no jira issue. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
@mrniranjan: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
LGTM, do we want to address the nitpick comment about |
@jmencak I was doing some internal testing so i modified that line but that line is not part of this commit, so i removed that change. |
Right, but the changes/removals basically cause the Context description no longer match what the tests are doing. But I'm all for removal of unused/obsolete code, so let's not block it. /lgtm |
|
/verified by @mrniranjan |
|
@mrniranjan: This PR has been marked as verified by DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
The ContainerRuntimeConfig test verified switching the container runtime via CTRCFG, but this is no longer relevant: runc is deprecated and crun is now the default runtime, making the CTRCFG a no-op.
Remove the DescribeTable and associated helper functions (newContainerRuntimeConfig, getContainerRuntimeConfigFrom) along with their unused imports.
Summary by CodeRabbit