Skip to content

e2e: fix tuned deferred tests on Hypershift#1494

Open
SargunNarula wants to merge 1 commit intoopenshift:mainfrom
SargunNarula:tuned_deferred_hypershift
Open

e2e: fix tuned deferred tests on Hypershift#1494
SargunNarula wants to merge 1 commit intoopenshift:mainfrom
SargunNarula:tuned_deferred_hypershift

Conversation

@SargunNarula
Copy link
Copy Markdown
Contributor

@SargunNarula SargunNarula commented Apr 23, 2026

The tuned-deferred suite used to failed in BeforeAll when resolving the pool via mcps.GetByProfile.

This PR updates the performance profile test pool discovery logic to use poolname.GetByProfile instead, which maps to MCP on self-managed OCP and to the NodePool on Hypershift.

Summary by CodeRabbit

  • Tests
    • Updated test logging to display the resolved tuning pool name instead of the previous performance designation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 35b39a94-d1f1-4a2d-9a0f-2cb0b8f8ccc8

📥 Commits

Reviewing files that changed from the base of the PR and between 8b2194c and f9e8557.

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

Walkthrough

Refactors a test to replace mcps.GetByProfile() with poolname.GetByProfile(context.TODO(), profile) and updates the initialization log to refer to the resolved "tuning pool (MCP or nodepool)" name.

Changes

Cohort / File(s) Summary
Test Utility Migration
test/e2e/performanceprofile/functests/2_performance_update/tuned_deferred.go
Replaced mcps.GetByProfile() with poolname.GetByProfile(context.TODO(), profile). Updated init log message from "performanceMCP" to "tuning pool (MCP or nodepool)". Removed mcps import; added poolname import.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Test file violates assertion messages requirement with 7 assertions lacking meaningful failure messages. Add meaningful assertion messages to all error assertions and ensure explicit error checking in critical test phases.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating tuned deferred tests to work with Hypershift by switching pool name discovery logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 names are stable and deterministic with no dynamic content in test titles. Dynamic values are properly confined to test bodies.
Microshift Test Compatibility ✅ Passed PR modifies existing Ginkgo e2e tests but does not add new ones; only updates pool name discovery mechanism.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The 'Tuned Deferred tests of performance profile' test suite only accesses workerCNFNodes[0] and does not assume multiple nodes, making it compatible with Single Node OpenShift deployments.
Topology-Aware Scheduling Compatibility ✅ Passed Pull request modifies only a test file with no scheduling constraints introduced. Change improves topology awareness for both OCP and HyperShift platforms.
Ote Binary Stdout Contract ✅ Passed The modified code writes all output through testlog.Infof(), which safely routes to ginkgo.GinkgoWriter rather than stdout. No direct stdout writes found.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Pull request changes only update pool name discovery function calls and logging in test infrastructure code without adding new test cases or modifying networking logic.

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

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: inconsistent vendoring in :\n\tgithub.com/RHsyseng/operator-utils@v1.4.13: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/go-systemd@v0.0.0-20191104093116-d3cd4ed1dbcf: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/ignition@v0.35.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/coreos/ignition/v2@v2.26.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/docker/go-units@v0.5.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/go-logr/stdr@v1.2.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/google/go-cmp@v0.7.0

... [truncated 19339 characters] ...

is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/legacy-cloud-providers: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/metrics: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/mount-utils: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/pod-security-admission: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tk8s.io/sample-apiserver: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tgithub.com/onsi/ginkgo/v2: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor\n"


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 MarSik and jmencak April 23, 2026 08:46
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/tuned_deferred.go (1)

29-30: Minor: import ordering.

Alphabetically, pods precedes poolname, so goimports/gofmt grouping would place pods before poolname. Not flagged by static analysis here, so optional — feel free to swap to match the canonical ordering used elsewhere in this package.

♻️ Proposed tweak
 	"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/nodes"
-	"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/poolname"
 	"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/pods"
+	"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/poolname"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/performanceprofile/functests/2_performance_update/tuned_deferred.go`
around lines 29 - 30, The import block in tuned_deferred.go has the two local
imports out of alphabetical order; swap the two import lines so that
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/pods"
comes before
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/poolname"
to match goimports/gofmt canonical ordering and the package convention used
elsewhere (no functional changes, just reorder the imports).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@test/e2e/performanceprofile/functests/2_performance_update/tuned_deferred.go`:
- Around line 29-30: The import block in tuned_deferred.go has the two local
imports out of alphabetical order; swap the two import lines so that
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/pods"
comes before
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/poolname"
to match goimports/gofmt canonical ordering and the package convention used
elsewhere (no functional changes, just reorder the imports).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 81fb6235-166a-4620-bf50-bc3e6b4494af

📥 Commits

Reviewing files that changed from the base of the PR and between 3d98f7e and 8b2194c.

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

@SargunNarula SargunNarula changed the title e2e: use poolname.GetByProfile in tuned deferred tests for Hypershift e2e: fix tuned deferred tests on Hypershift Apr 23, 2026
@SargunNarula SargunNarula force-pushed the tuned_deferred_hypershift branch from 8b2194c to 66fb75f Compare April 23, 2026 09:12
poolName, err = mcps.GetByProfile(profile)
Expect(err).ToNot(HaveOccurred())
testlog.Infof("using performanceMCP: %q", poolName)
poolName = poolname.GetByProfile(context.TODO(), profile)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

better to rename the import (utilpoolname?) because poolname vs poolName is too similar and too confusing. We have a cheap fix, let's use it.

other than that LGTM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@ffromani sure, updated.

Signed-off-by: Sargun Narula <snarula@redhat.com>
@SargunNarula SargunNarula force-pushed the tuned_deferred_hypershift branch from 66fb75f to f9e8557 Compare April 23, 2026 13:17
@ffromani
Copy link
Copy Markdown
Contributor

/approve
/lgtm

thanks!

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

openshift-ci Bot commented Apr 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ffromani, SargunNarula

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2026
@SargunNarula
Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 24, 2026

@SargunNarula: 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-hypershift f9e8557 link true /test e2e-hypershift
ci/prow/e2e-hypershift-pao f9e8557 link true /test e2e-hypershift-pao

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.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants