Skip to content

NO-JIRA: E2E: remove obsolete ContainerRuntimeConfig runtime-switch test#1510

Open
mrniranjan wants to merge 2 commits intoopenshift:mainfrom
mrniranjan:remove_container_runtime
Open

NO-JIRA: E2E: remove obsolete ContainerRuntimeConfig runtime-switch test#1510
mrniranjan wants to merge 2 commits intoopenshift:mainfrom
mrniranjan:remove_container_runtime

Conversation

@mrniranjan
Copy link
Copy Markdown
Contributor

@mrniranjan mrniranjan commented May 7, 2026

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

  • Tests
    • Streamlined performance profile end-to-end tests by simplifying setup/teardown for runtime-related scenarios.
    • Removed the runc CPU usage validation test and its associated parsing/utilities.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Walkthrough

The 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).

Changes

ContainerRuntimeConfig Test Refactoring

Layer / File(s) Summary
Import & Test-scope cleanup
test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go
Adjusted imports and test-scope variables; removed HyperShift-specific nodepool handling.
Context Setup
test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go (ContainerRuntimeConfig BeforeAll)
Replaced prior setup that created/deleted ContainerRuntimeConfig and waited for MCP transitions with a simplified BeforeAll that creates a pod template, sets namespace, and assigns RuntimeClassName from the current performance profile.
Removed Pre-checks / MCP logic
test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go
Removed pre-checks and MCP/HyperShift attach-detach and wait logic previously present in this context.

Removal of runc CPU usage test and helpers

Layer / File(s) Summary
Imports
test/e2e/performanceprofile/functests/1_performance/cpu_management.go
Removed encoding/json import.
Data Shape / Helpers Removed
test/e2e/performanceprofile/functests/1_performance/cpu_management.go
Deleted JSON-backed structs (ContainerConfig and nested types) and helper functions extractConfigInfo and getConfigJsonInfo.
Test Case Removal
test/e2e/performanceprofile/functests/1_performance/cpu_management.go
Removed the entire Context("Check container runtimes cpu usage"... test block (test_id: 74461) that validated runc cpuset behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All test titles in modified files are stable and deterministic. No dynamic pod names, timestamps, UUIDs, node identifiers, or other runtime-changing values. All use static descriptive strings.
Test Structure And Quality ✅ Passed Tests adhere to quality standards: BeforeEach/AfterEach setup, DeferCleanup for cleanup, 5-10min timeouts on waits, assertion messages, single test responsibility, consistent patterns.
Microshift Test Compatibility ✅ Passed PR removes existing tests but adds no new ones. MicroShift check applies only to new tests, so not applicable here.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR only removes existing tests, not adds new ones. The SNO compatibility check applies only to newly added Ginkgo e2e tests, so it is not applicable here.
Topology-Aware Scheduling Compatibility ✅ Passed PR removes e2e test code only. No deployment manifests, operator code, or controllers are added/modified. Topology-aware scheduling check not applicable.
Ote Binary Stdout Contract ✅ Passed PR only removes test code, no new process-level stdout writes. Test suites properly configure logging to stderr via ctrllog.SetLogger(). OTE binary clean.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR removes existing e2e tests rather than adding new ones. The custom check applies only to "new Ginkgo e2e tests" being added, not test removals. The check is not applicable.
Title check ✅ Passed The title accurately describes the main change: removing an obsolete ContainerRuntimeConfig runtime-switch test from the E2E test suite.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from jmencak and swatisehgal May 7, 2026 05:52
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go (1)

1170-1170: ⚡ Quick win

Rename the Context — "ContainerRuntimeConfig" no longer reflects its contents.

After removing the runtime-switch DescribeTable, the only remaining child of this Context is the When("exec-cpu-affinity is disabled", ...) block, which is unrelated to ContainerRuntimeConfig. Either rename the Context to describe the exec-cpu-affinity behavior under test, or move the inner When block 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

📥 Commits

Reviewing files that changed from the base of the PR and between fa5b0e1 and 9c7fcd6.

📒 Files selected for processing (1)
  • test/e2e/performanceprofile/functests/2_performance_update/updating_profile.go

@mrniranjan mrniranjan force-pushed the remove_container_runtime branch from 9c7fcd6 to 3d4be59 Compare May 7, 2026 06:08
@jmencak
Copy link
Copy Markdown
Contributor

jmencak commented May 7, 2026

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.

mrniranjan and others added 2 commits May 7, 2026 16:00
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>
@mrniranjan mrniranjan force-pushed the remove_container_runtime branch from 3d4be59 to e7ec165 Compare May 7, 2026 10:30
@mrniranjan mrniranjan changed the title E2E: remove obsolete ContainerRuntimeConfig runtime-switch test NO-JIRA: E2E: remove obsolete ContainerRuntimeConfig runtime-switch test May 7, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 7, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mrniranjan: This pull request explicitly references no jira issue.

Details

In response to this:

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

  • Tests
  • Streamlined performance profile end-to-end tests by simplifying setup/teardown for runtime-related scenarios.
  • Removed the runc CPU usage validation test and its associated parsing/utilities.

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.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 7, 2026

@mrniranjan: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@jmencak
Copy link
Copy Markdown
Contributor

jmencak commented May 7, 2026

LGTM, do we want to address the nitpick comment about The Context named "ContainerRuntimeConfig" no longer matches its contents; ?

@mrniranjan
Copy link
Copy Markdown
Contributor Author

LGTM, do we want to address the nitpick comment about The Context named "ContainerRuntimeConfig" no longer matches its contents; ?

@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.

@jmencak
Copy link
Copy Markdown
Contributor

jmencak commented May 7, 2026

@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

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2026
@mrniranjan
Copy link
Copy Markdown
Contributor Author

/verified by @mrniranjan

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label May 8, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mrniranjan: This PR has been marked as verified by @mrniranjan.

Details

In response to this:

/verified by @mrniranjan

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants