Skip to content

OCPBUGS-100458: Adapt bootimage tests for CAPI migration - #6363

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
djoshy:capi-disruptive-fix
Aug 3, 2026
Merged

OCPBUGS-100458: Adapt bootimage tests for CAPI migration#6363
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
djoshy:capi-disruptive-fix

Conversation

@djoshy

@djoshy djoshy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

- What I did
This PR skips the Automatic mode skew enforcement tests if no MAPI resources are detected. This is necessary on AWS because openshift has migrated to using CAPI resources on 5.0 tech preview installations. Once the boot image controller is updated to handle these cases, these tests can be updated alongside.

- How to verify it
Running the AWS disruptive test against this should be sufficient to verify this.

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation when no MachineSets are available by reporting the affected namespace.
    • Prevented unsupported upgrade, boot-image, and OS image tests from running when legacy MachineSets are unavailable.
    • Standardized MachineSet availability checks across tests.
    • Test setup now distinguishes unavailable cluster data from command failures, providing clearer outcomes.

@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: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@djoshy: This pull request references Jira Issue OCPBUGS-100458, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

- What I did
This PR skips the Automatic mode skew enforcement tests if no MAPI resources are detected. This is necessary on AWS because openshift has migrated to using CAPI resources on 5.0 tech preview installations. Once the boot image controller is updated to handle these cases, these tests can be updated alongside.

- How to verify it
Running the AWS disruptive test against this should be sufficient to verify 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.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2026
@djoshy

djoshy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview-2of3

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

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: Enterprise

Run ID: 0896f8bb-9ea5-47df-9d67-1f583260eade

📥 Commits

Reviewing files that changed from the base of the PR and between fbac8b4 and 9966bce.

📒 Files selected for processing (5)
  • test/extended-priv/machineset.go
  • test/extended-priv/mco_bootimages_aws_marketplace.go
  • test/extended-priv/mco_bootimages_skew.go
  • test/extended-priv/util/clusters.go
  • test/extended/osImageStream.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • test/extended-priv/mco_bootimages_aws_marketplace.go
  • test/extended-priv/mco_bootimages_skew.go
  • test/extended-priv/util/clusters.go
  • test/extended-priv/machineset.go

Walkthrough

The changes add a shared legacy MAPI MachineSet availability guard, apply it to dependent tests, remove a local OS image stream readiness helper, and make empty MachineSet retrieval fail explicitly.

Changes

MAPI MachineSet test gating

Layer / File(s) Summary
Shared availability guard
test/extended-priv/util/clusters.go
Adds SkipIfNoMAPIMachineSets, which queries administrative MachineSets, fails on query errors, and skips when none exist.
MachineSet-dependent test setup
test/extended-priv/mco_bootimages_aws_marketplace.go, test/extended-priv/mco_bootimages_skew.go, test/extended/osImageStream.go
Applies the shared guard to boot image and OS image stream tests. Removes the local OS image stream readiness helper and its unused import.
Empty retrieval assertion
test/extended-priv/machineset.go
GetAllOrFail now fails when no MachineSets exist in the requested namespace.

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

Suggested reviewers: dkhater-redhat, umohnani8

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adapting boot image tests for CAPI migration.
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 The diff adds only setup guards and an assertion; all Ginkgo Describe/It titles remain literal static strings with no runtime values, names, dates, IPs, or generated identifiers.
Test Structure And Quality ✅ Passed Affected tests retain lifecycle cleanup, all Eventually and helper waits are bounded, and new assertions include diagnostic messages; the added guard creates no resources.
Microshift Test Compatibility ✅ Passed The diff adds no new Ginkgo test declarations; it only modifies existing tests and adds a helper, so this new-test compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The patch adds no new Ginkgo tests or multi-node assumptions; the modified skew tests are already wrapped by SkipOnSingleNodeTopology, and other changes only add MAPI availability skips.
Topology-Aware Scheduling Compatibility ✅ Passed The diff changes only Go test utilities and test setup. It adds MAPI presence checks and removes a local API check; it adds no manifests, controllers, or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The HEAD diff adds no fmt/log/klog/stdout writes; new helper calls occur in JustBeforeEach or It blocks, which the contract excludes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The diff adds no Ginkgo test declarations or network operations; new code only lists cluster MAPI resources, with no IPv4 literals or external URLs added.
No-Weak-Crypto ✅ Passed The five changed Go files add only MachineSet checks and skip logic; the diff contains no MD5, SHA1, DES, RC4, Blowfish, ECB, crypto APIs, or secret comparisons.
Container-Privileges ✅ Passed The patch changes only five .go test files. It adds no Kubernetes manifests, container specs, privilege settings, host namespaces, SYS_ADMIN capability, or root execution settings.
No-Sensitive-Data-In-Logs ✅ Passed The added output contains only fixed test-skip text and a namespace; MachineSet names are not logged, and no passwords, credentials, tokens, PII, or customer data are emitted.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@djoshy: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview-2of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/e1635e90-8f44-11f1-8435-de5fc12003da-0

@djoshy
djoshy force-pushed the capi-disruptive-fix branch from fbac8b4 to 9966bce Compare August 3, 2026 14:29
@djoshy

djoshy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/payload-abort

@djoshy

djoshy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview

@djoshy

djoshy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/payload-abort

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@djoshy: aborted 1 active payload job(s) for pull request #6363

@djoshy

djoshy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@djoshy: trigger 3 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview-1of3
  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview-2of3
  • periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview-3of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/31572570-8f4b-11f1-931d-b50f9837e47a-0

@djoshy

djoshy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 3, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@djoshy: This pull request references Jira Issue OCPBUGS-100458, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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.

@isabella-janssen isabella-janssen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

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

Copy link
Copy Markdown
Contributor

Pipeline controller notification

No second-stage tests were triggered for this PR.

This can happen when:

  • The changed files don't match any pipeline_run_if_changed patterns
  • All files match pipeline_skip_if_only_changed patterns
  • No pipeline-controlled jobs are defined for the main branch

Use /test ? to see all available tests.

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: djoshy, isabella-janssen

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:
  • OWNERS [djoshy,isabella-janssen]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@djoshy

djoshy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

/verified by disruptive suites

The AWS TechPreview disruptive suite is now passing. Shard 3 is timing out, which was a known issue before CAPI was enabled for AWS.

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

Copy link
Copy Markdown
Contributor

@djoshy: This PR has been marked as verified by disruptive suites.

Details

In response to this:

/verified by disruptive suites

The AWS TechPreview disruptive suite is now passing. Shard 3 is timing out, which was a known issue before CAPI was enabled for AWS.

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

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@djoshy: 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 279723f into openshift:main Aug 3, 2026
9 checks passed
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@djoshy: Jira Issue Verification Checks: Jira Issue OCPBUGS-100458
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-100458 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

- What I did
This PR skips the Automatic mode skew enforcement tests if no MAPI resources are detected. This is necessary on AWS because openshift has migrated to using CAPI resources on 5.0 tech preview installations. Once the boot image controller is updated to handle these cases, these tests can be updated alongside.

- How to verify it
Running the AWS disruptive test against this should be sufficient to verify this.

Summary by CodeRabbit

  • Bug Fixes
  • Improved validation when no MachineSets are available by reporting the affected namespace.
  • Prevented unsupported upgrade, boot-image, and OS image tests from running when legacy MachineSets are unavailable.
  • Standardized MachineSet availability checks across tests.
  • Test setup now distinguishes unavailable cluster data from command failures, providing clearer outcomes.

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-robot

Copy link
Copy Markdown
Contributor

Fix included in release 5.0.0-0.nightly-2026-08-04-103952

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.

4 participants