Skip to content

NO-JIRA: test/extended: scope oc process to NTO namespace#1508

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
jmencak:5.0-OTE-fix-failing-test-namespace
May 7, 2026
Merged

NO-JIRA: test/extended: scope oc process to NTO namespace#1508
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
jmencak:5.0-OTE-fix-failing-test-namespace

Conversation

@jmencak
Copy link
Copy Markdown
Contributor

@jmencak jmencak commented May 6, 2026

WithoutNamespace() does not add -n, so oc used the kubeconfig context namespace. If the namespace (e.g. an OTE project) was deleted, the oc process would fail. Pass -n with the resource (openshift-cluster-node-tuning-operator) namespace.

Resolves: openshift/release#78471 (comment)

Summary by CodeRabbit

  • Tests
    • Enhanced namespace specification in test utility procedures for template processing operations.

WithoutNamespace() does not add `-n`, so `oc` used the kubeconfig context namespace.
If the namespace (e.g. an OTE project) was deleted, the `oc` process would fail.
Pass `-n` with the resource (openshift-cluster-node-tuning-operator) namespace.
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 6, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 6, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Walkthrough

The CreateIRQSMPAffinityProfileIfNotExist method in the NTO resource utility now explicitly specifies the target namespace when invoking the oc process command by adding the -n <namespace> flag, ensuring operations target the correct namespace rather than relying on defaults.

Changes

Namespace Specification in OC Template Processing

Layer / File(s) Summary
Core Implementation
test/extended/utils/nto_util.go
oc process invocation adds -n <namespace> flag to explicitly target the resource's namespace.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
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 PR modifies test/extended/utils/nto_util.go, a utility/helper file with zero Ginkgo test definitions. The change is to a helper function implementation, not test titles. Check not applicable.
Test Structure And Quality ✅ Passed Check targets Ginkgo test code (It blocks, BeforeEach/AfterEach). Modified file is a utility module with helper functions, not test code. Check not applicable to this file type.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. Only an existing utility function is modified. The check only applies when new tests are added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds utility functions in test/extended/utils/nto_util.go, not new Ginkgo tests. The check applies only to new Ginkgo e2e tests (It(), Describe(), etc.), which are not present.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test code in test/extended/utils/nto_util.go. No deployment manifests, operator code, or scheduling constraints were added or modified. Not applicable to this check.
Ote Binary Stdout Contract ✅ Passed File is a utility package with Logf (fmt.Printf) only called from test cases where stdout is intercepted. No process-level code writes to stdout. PR only modifies command-line arguments.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed New Ginkgo e2e tests in test/extended/specs/nto.go contain no IPv4 assumptions or external connectivity requirements. Tests use only cluster-internal operations.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: scoping the oc process command to the NTO namespace in the test utilities.

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

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

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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 6, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmencak

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 May 6, 2026
@jmencak
Copy link
Copy Markdown
Contributor Author

jmencak commented May 6, 2026

/test all

@qodo-for-rh-openshift
Copy link
Copy Markdown

qodo-for-rh-openshift Bot commented May 6, 2026

PR-Agent: could not find a component named all in a supported language in this PR.

@jmencak
Copy link
Copy Markdown
Contributor Author

jmencak commented May 6, 2026

/test all

@qodo-for-rh-openshift
Copy link
Copy Markdown

qodo-for-rh-openshift Bot commented May 6, 2026

PR-Agent: could not find a component named all in a supported language in this PR.

@jmencak
Copy link
Copy Markdown
Contributor Author

jmencak commented May 7, 2026

/retest

@jmencak jmencak marked this pull request as ready for review May 7, 2026 04:53
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 7, 2026
@qodo-for-rh-openshift
Copy link
Copy Markdown

Review Summary by Qodo

Fix oc process command namespace scoping in NTO tests

🐞 Bug fix 🧪 Tests

Grey Divider

Walkthroughs

Description
• Add explicit namespace flag to oc process command
• Prevents failures when kubeconfig context namespace is deleted
• Ensures template processing uses NTO namespace consistently
Diagram
flowchart LR
  A["oc process without -n flag"] -->|"uses kubeconfig context namespace"| B["Fails if context namespace deleted"]
  C["oc process with -n flag"] -->|"uses explicit NTO namespace"| D["Reliable template processing"]
Loading

Grey Divider

File Changes

1. test/extended/utils/nto_util.go 🐞 Bug fix +1/-1

Add namespace flag to oc process command

• Added -n ntoRes.Namespace flag to the oc process command in
 CreateIRQSMPAffinityProfileIfNotExist method
• Ensures template processing uses the openshift-cluster-node-tuning-operator namespace explicitly
• Prevents command failures when the kubeconfig context namespace is deleted or unavailable

test/extended/utils/nto_util.go


Grey Divider

Qodo Logo

@qodo-for-rh-openshift
Copy link
Copy Markdown

qodo-for-rh-openshift Bot commented May 7, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@openshift-ci openshift-ci Bot requested review from ffromani and yanirq May 7, 2026 04:54
@jmencak jmencak changed the title test/extended: scope oc process to NTO namespace NO-JIRA: test/extended: scope oc process to NTO namespace 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

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

Details

In response to this:

WithoutNamespace() does not add -n, so oc used the kubeconfig context namespace. If the namespace (e.g. an OTE project) was deleted, the oc process would fail. Pass -n with the resource (openshift-cluster-node-tuning-operator) namespace.

Resolves: openshift/release#78471 (comment)

Summary by CodeRabbit

  • Tests
  • Enhanced namespace specification in test utility procedures for template processing operations.

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

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

@yanirq
Copy link
Copy Markdown
Contributor

yanirq commented May 7, 2026

/lgtm

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

jmencak commented May 7, 2026

/verified by ci/prow/e2e-aws-nto-ext

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

@jmencak: This PR has been marked as verified by ci/prow/e2e-aws-nto-ext.

Details

In response to this:

/verified by ci/prow/e2e-aws-nto-ext

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-merge-bot openshift-merge-bot Bot merged commit 77a9f81 into openshift:main May 7, 2026
20 checks passed
@jmencak jmencak deleted the 5.0-OTE-fix-failing-test-namespace branch May 7, 2026 12:06
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. 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