Skip to content

NO-ISSUE: Skip Additional Storage tests on HyperShift - MachineConfig API not available - #31489

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
BhargaviGudi:skip-api-hypershift
Aug 8, 2026
Merged

NO-ISSUE: Skip Additional Storage tests on HyperShift - MachineConfig API not available#31489
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
BhargaviGudi:skip-api-hypershift

Conversation

@BhargaviGudi

@BhargaviGudi BhargaviGudi commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Add HyperShift detection to Additional Storage tests and consolidate HyperShift skip logic across all node tests into a reusable helper function.

Problem

Additional Storage E2E and API validation tests were failing on HyperShift clusters with:
the server could not find the requested resource (post containerruntimeconfigs.machineconfiguration.openshift.io)

Root cause: HyperShift clusters use External topology mode where the control plane runs outside the cluster. These clusters do not have the MachineConfig API (ContainerRuntimeConfig, MachineConfigPool,
etc.) available.

Changes

1. Added SkipOnHyperShift() helper in node_utils.go

  • Uses context-aware exutil.IsHypershift(ctx, configClient)
  • Follows the same pattern as existing SkipOnMicroShift()
  • Accepts context.Context to allow API call cancellation

2. Updated 5 node test files to use the helper

Replaced inline HyperShift detection with the reusable helper:

  • additional_storage_api.go - API validation tests
  • additional_storage_e2e.go - E2E functional tests
  • kubeletconfig_tls.go - TLS config tests
  • node_swap.go - Swap configuration tests
  • runc_upgrade_cases.go - Runtime upgrade tests

Benefits

DRY principle - Eliminates duplicate HyperShift detection code (5 instances → 1 helper)
Context-aware - API calls can be canceled if test context is canceled
Consistent - All node tests use the same skip pattern
Maintainable - Future HyperShift detection changes only need to update one function

Testing

  • Additional Storage tests will now be skipped on HyperShift clusters
  • Existing tests on HA/Single-Node topologies continue to run normally

Related

  • Addresses reviewer feedback from @saschagrunert and @ngopalak-redhat
  • Part of AdditionalStorageConfig feature gate promotion effort (TechPreview → GA)

Summary by CodeRabbit

  • Bug Fixes
    • Improved extended test compatibility by consistently skipping tests on HyperShift clusters where required APIs are unavailable.
    • Refined additional storage feature-gate checks to evaluate only the relevant feature gate.
    • Standardized topology detection and skip behavior across node-related tests.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@BhargaviGudi BhargaviGudi changed the title Skip Additional Storage tests on HyperShift - MachineConfig API not available NO-ISSUE: Skip Additional Storage tests on HyperShift - MachineConfig API not available Aug 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown

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

Details

In response to this:

What does this PR do?

Adds HyperShift detection to skip Additional Storage API and E2E tests on clusters with External topology mode (HyperShift).

Why is this needed?

HyperShift clusters use externally hosted control planes and don't have the MachineConfig API (including ContainerRuntimeConfig resources) available. Tests were failing with:

the server could not find the requested resource (post containerruntimeconfigs.machineconfiguration.openshift.io)

How does this fix it?

Adds a control plane topology check to IsAdditionalStorageConfigEnabled() to detect and skip on HyperShift, following the same pattern used in:

  • test/extended/node/node_swap.go
  • test/extended/node/kubeletconfig_tls.go

Since both API and E2E tests share this function, one fix covers both test suites.

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 6, 2026
@openshift-ci
openshift-ci Bot requested review from QiWang19 and cpmeadors August 6, 2026 09:07
@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-ovn-hypershift

@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/test e2e-hypershift-conformance

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Walkthrough

Node tests now use shared HyperShift detection before flows that require the MachineConfig API. Additional storage tests perform platform skips in setup, while feature-gate validation only evaluates AdditionalStorageConfig.

Changes

Node test gating

Layer / File(s) Summary
Shared HyperShift detection
test/extended/node/node_utils.go
SkipOnHyperShift checks control-plane topology, reports lookup errors through Gomega, and skips HyperShift clusters.
Node test integration
test/extended/node/kubeletconfig_tls.go, test/extended/node/node_swap.go, test/extended/node/runc_upgrade_cases.go
The tests use SkipOnHyperShift instead of local external-topology checks.
Additional storage gating
test/extended/node/additional_storage_api.go, test/extended/node/additional_storage_e2e.go
The tests skip unsupported cluster types before execution. The feature-gate helper only evaluates AdditionalStorageConfig.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: cpmeadors, qiwang19, ngopalak-redhat

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning node_utils.go:43 adds a bare error assertion, and additional_storage_e2e.go deletes testPod1 only on the success path, so failures can leak the pod. Add a diagnostic message to SkipOnHyperShift and register DeferCleanup immediately after every resource creation, including testPod1 and partially created MCPs.
✅ Passed checks (14 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 Ginkgo titles in the changed files are static string literals; the diff contains no changes to It, Describe, Context, or When titles.
Microshift Test Compatibility ✅ Passed The PR adds no new Ginkgo tests; it only updates setup and adds a helper. All affected tests are protected by MicroShift skips or unavailable-API apigroup tags.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo tests were added; declaration counts are unchanged, and the existing Additional Storage E2E suite already has [Skipped:SingleReplicaTopology].
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only extended test code and a HyperShift skip helper; it adds no manifests, operators, controllers, replicas, affinity, spread constraints, PDBs, selectors, or tolerations.
Ote Binary Stdout Contract ✅ Passed The six changed files add no init, main, TestMain, or suite-level stdout/logging calls; new SkipOnHyperShift only runs from test setup, while logs use stderr in main.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo tests were added; declaration counts are unchanged, and the existing registry.k8s.io pull plus [Skipped:Disconnected] marker predate this PR.
No-Weak-Crypto ✅ Passed The patch only adds HyperShift detection and skip logic. Changed code imports no crypto packages and contains no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The commit changes six Go test files and no manifests; added lines contain no privileged, host namespace, SYS_ADMIN, root, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The diff adds no logging of credentials, PII, hostnames, or customer data; the only new output is a generic HyperShift skip message.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes skipping Additional Storage tests on HyperShift because the MachineConfig API is unavailable, which is a key part of the changes.
✨ 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.

@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/assign @saschagrunert @asahay19

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
test/extended/node/additional_storage_api.go (1)

28-32: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Fail closed when Infrastructure.Status.ControlPlaneTopology is empty.

GetControlPlaneTopology() returns an address to the parsed field, so controlPlaneTopology != nil, and its address comparison with the string literal remains true when the field is empty. Gate AdditionalStorageConfig only when the value equals configv1.ExternalTopologyMode; otherwise skip or fail so empty topology does not reach MachineConfig-backed tests.

🤖 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/extended/node/additional_storage_api.go` around lines 28 - 32, Update
the topology guard in AdditionalStorageConfig to fail closed when
GetControlPlaneTopology returns nil or an empty value, and only allow the test
when the value is explicitly configv1.ExternalTopologyMode; ensure empty or
unrecognized topology skips or fails before reaching MachineConfig-backed tests.
🤖 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.

Inline comments:
In `@test/extended/node/additional_storage_api.go`:
- Around line 28-29: Update IsAdditionalStorageConfigEnabled to use a
context-aware, bounded topology lookup instead of
exutil.GetControlPlaneTopology, passing its received ctx through the API
request. Add or reuse a helper that performs the infrastructure GET with ctx and
an appropriate timeout, while preserving the existing error assertion and
topology behavior.

---

Nitpick comments:
In `@test/extended/node/additional_storage_api.go`:
- Around line 28-32: Update the topology guard in AdditionalStorageConfig to
fail closed when GetControlPlaneTopology returns nil or an empty value, and only
allow the test when the value is explicitly configv1.ExternalTopologyMode;
ensure empty or unrecognized topology skips or fails before reaching
MachineConfig-backed tests.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c5c3e9c-bbb6-41f2-ba68-cb44975fe452

📥 Commits

Reviewing files that changed from the base of the PR and between a15c5b5 and d575362.

📒 Files selected for processing (1)
  • test/extended/node/additional_storage_api.go

Comment thread test/extended/node/additional_storage_api.go Outdated
Comment thread test/extended/node/additional_storage_api.go Outdated
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

Comment thread test/extended/node/additional_storage_api.go Outdated
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@test/extended/node/node_utils.go`:
- Around line 41-49: Update SkipOnHyperShift and its callers in the BeforeEach
flows to accept and pass context.Context; make GetControlPlaneTopology and its
underlying infrastructure lookup context-aware with a bounded timeout, replacing
context.Background(). Apply the changes in the shared helper plus
additional_storage_api.go and additional_storage_e2e.go, preserving the existing
topology check and skip behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 02476261-2975-48ee-b930-59feb3c7d047

📥 Commits

Reviewing files that changed from the base of the PR and between ce6064a and cd2afc1.

📒 Files selected for processing (3)
  • test/extended/node/additional_storage_api.go
  • test/extended/node/additional_storage_e2e.go
  • test/extended/node/node_utils.go

Comment thread test/extended/node/node_utils.go
@openshift-ci openshift-ci Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Aug 7, 2026
@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/test e2e-hypershift-conformance

Comment thread test/extended/node/node_utils.go Outdated
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/test e2e-hypershift-conformance

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 7, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@asahay19

asahay19 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

/retest

@ngopalak-redhat

Copy link
Copy Markdown
Contributor

/lgtm

@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/retest-required

@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/test e2e-hypershift-techpreview

@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-ovn-hypershift-conformance

@asahay19

asahay19 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@BhargaviGudi

Copy link
Copy Markdown
Contributor Author

/verified by @BhargaviGudi Skipping tests on HyperShift clusters

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 7, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@BhargaviGudi: This PR has been marked as verified by @BhargaviGudi Skipping tests on HyperShift clusters``.

Details

In response to this:

/verified by @BhargaviGudi Skipping tests on HyperShift clusters

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.

@cpmeadors

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asahay19, BhargaviGudi, cpmeadors, ngopalak-redhat, saschagrunert

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 Aug 7, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD ce6064a and 2 for PR HEAD fd724b9 in total

@saschagrunert

Copy link
Copy Markdown
Member

/retest-required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 3d514be and 1 for PR HEAD fd724b9 in total

@openshift-ci

openshift-ci Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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

@openshift-merge-bot
openshift-merge-bot Bot merged commit 52e6e8a into openshift:main Aug 8, 2026
23 checks passed
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. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants