Skip to content

OCPCLOUD-3541: Use feature gates consistently#603

Open
mdbooth wants to merge 6 commits into
openshift:mainfrom
openshift-cloud-team:OCPCLOUD-3541
Open

OCPCLOUD-3541: Use feature gates consistently#603
mdbooth wants to merge 6 commits into
openshift:mainfrom
openshift-cloud-team:OCPCLOUD-3541

Conversation

@mdbooth

@mdbooth mdbooth commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

This change removes various hard-coded assumptions in the code about which
platforms are supported and uses feature gates exclusively for feature
enablement. Specifically:

  • When ClusterAPIMachineMigration is enabled we now always run the operator,
    regardless of whether the platform has support.
  • Consequently we always install core CAPI, even if platform support is not yet
    enabled.
  • The revision controller now checks the per-platform feature gate before
    enabling any platform-specific profiles.
  • The machine-api-migration entrypoint now uses the MachineAPIMigration
    featuregate and the per-platform MachineAPIMigration instead of hard-coding
    AWS and OpenStack.

Summary by CodeRabbit

  • New Features
    • Added feature-gate–aware platform handling for revision component selection, filtering platform-scoped providers/components when gates are disabled.
    • Added platform-specific MAPI migration enablement helper.
  • Bug Fixes
    • ClusterOperator status is now consistently reported without unsupported-platform-specific messaging.
    • Installer deployment reconciliation no longer branches into unsupported-platform deletion behavior.
  • Refactor
    • Machine API migration controller now registers reconcilers only when feature-gates and platform support allow it.
    • Platform type resolution now returns only infra types.
  • Chores
    • Updated OpenShift API/klog dependencies and refreshed related tests/webhook validation and fuzzing behavior.

@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

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 1150ecd0-3047-4905-a5cc-aab7fa6ee76a

📥 Commits

Reviewing files that changed from the base of the PR and between ab9a2a5 and 6ed7510.

⛔ Files ignored due to path filters (89)
  • e2e/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • manifests-gen/go.sum is excluded by !**/*.sum
  • openshift-tests-extension/go.sum is excluded by !**/*.sum
  • vendor/github.com/openshift/api/.ci-operator.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/Dockerfile.ocp is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/Makefile is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_apiserver.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_authentication.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_cluster_operator.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_image.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_infrastructure.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_kmsencryption.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_network.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/types_tlssecurityprofile.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_apiservers-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_images.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_networks-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/console/v1/types_console_plugin.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/console/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/features.md is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/features/features.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/install.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machine/v1beta1/types_machineset.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/openapi/generated_openapi/zz_generated.openapi.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1/types_authentication.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/types_etcd.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/types_ingresscontroller.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/types_kmsencryption.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_12_etcd_01_etcds-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_20_kube-apiserver_01_kubeapiservers-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_20_kube-apiserver_01_kubeapiservers-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_20_kube-apiserver_01_kubeapiservers-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_20_kube-apiserver_01_kubeapiservers-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_20_kube-apiserver_01_kubeapiservers-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_30_openshift-apiserver_01_openshiftapiservers-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_30_openshift-apiserver_01_openshiftapiservers-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_30_openshift-apiserver_01_openshiftapiservers-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_30_openshift-apiserver_01_openshiftapiservers-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_30_openshift-apiserver_01_openshiftapiservers-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_authentication_01_authentications-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_authentication_01_authentications-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_authentication_01_authentications-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_authentication_01_authentications-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_authentication_01_authentications-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-CustomNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-Default.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-DevPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-OKD.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-TechPreviewNoUpgrade.crd.yaml is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/security/v1/generated.proto is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/security/v1/types.go is excluded by !**/vendor/**, !vendor/**
  • vendor/github.com/openshift/api/security/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go is excluded by !**/vendor/**, !vendor/**, !**/zz_generated*
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (22)
  • cmd/capi-controllers/main.go
  • cmd/capi-installer/main.go
  • cmd/capi-operator/main.go
  • cmd/machine-api-migration/main.go
  • e2e/go.mod
  • e2e/webhook_test.go
  • go.mod
  • manifests-gen/go.mod
  • openshift-tests-extension/go.mod
  • pkg/controllers/clusteroperator/clusteroperator_controller.go
  • pkg/controllers/clusteroperator/clusteroperator_controller_test.go
  • pkg/controllers/installerdeployment/controller.go
  • pkg/controllers/installerdeployment/controller_test.go
  • pkg/controllers/machinesetsync/machineset_sync_controller_test.go
  • pkg/controllers/machinesync/aws_test.go
  • pkg/controllers/machinesync/machine_sync_controller_test.go
  • pkg/controllers/revision/helpers_test.go
  • pkg/controllers/revision/revision_controller.go
  • pkg/controllers/revision/revision_controller_test.go
  • pkg/conversion/test/fuzz/fuzz.go
  • pkg/util/featuregates.go
  • pkg/util/platform.go
✅ Files skipped from review due to trivial changes (2)
  • pkg/controllers/machinesync/aws_test.go
  • pkg/controllers/machinesync/machine_sync_controller_test.go
🚧 Files skipped from review as they are similar to previous changes (19)
  • e2e/webhook_test.go
  • pkg/util/featuregates.go
  • manifests-gen/go.mod
  • pkg/controllers/machinesetsync/machineset_sync_controller_test.go
  • pkg/conversion/test/fuzz/fuzz.go
  • pkg/controllers/revision/helpers_test.go
  • cmd/capi-controllers/main.go
  • e2e/go.mod
  • pkg/controllers/revision/revision_controller.go
  • pkg/util/platform.go
  • pkg/controllers/clusteroperator/clusteroperator_controller.go
  • pkg/controllers/installerdeployment/controller.go
  • pkg/controllers/clusteroperator/clusteroperator_controller_test.go
  • pkg/controllers/installerdeployment/controller_test.go
  • cmd/capi-installer/main.go
  • cmd/capi-operator/main.go
  • go.mod
  • cmd/machine-api-migration/main.go
  • pkg/controllers/revision/revision_controller_test.go

Walkthrough

The PR updates platform helper return shapes, removes unsupported-platform fields from controllers, adds feature-gate-aware revision filtering, refactors machine-api-migration controller selection, and bumps OpenShift API dependencies across modules.

Changes

Platform and Feature-Gate Cleanup

Layer / File(s) Summary
Utility signatures and call sites
pkg/util/platform.go, pkg/util/featuregates.go, cmd/capi-controllers/main.go, e2e/webhook_test.go, pkg/controllers/machinesetsync/machineset_sync_controller_test.go, pkg/controllers/machinesync/aws_test.go, pkg/controllers/machinesync/machine_sync_controller_test.go, pkg/conversion/test/fuzz/fuzz.go
GetCAPITypesForInfrastructure now returns only infra types and error, and its callers update destructuring accordingly; IsMAPIMigrationEnabledForPlatform is added; the fuzz helper clears LabelSelector.
Platform fields removed from controllers
pkg/controllers/clusteroperator/clusteroperator_controller.go, pkg/controllers/clusteroperator/clusteroperator_controller_test.go, pkg/controllers/installerdeployment/controller.go, pkg/controllers/installerdeployment/controller_test.go
ClusterOperatorController drops IsUnsupportedPlatform and always sets availability with an empty message. InstallerDeploymentReconciler drops SupportedPlatform and no longer deletes the deployment on unsupported platforms.
Revision controller feature gates
pkg/controllers/revision/helpers_test.go, pkg/controllers/revision/revision_controller.go, pkg/controllers/revision/revision_controller_test.go
RevisionController gains FeatureGates and filters platform-scoped providers by gate enablement. Tests build feature-gate fixtures and cover enabled/disabled provider selection cases.
Controller startup wiring
cmd/capi-installer/main.go, cmd/capi-operator/main.go, cmd/machine-api-migration/main.go
capi-installer loads feature gates during setup and passes them to RevisionController. capi-operator removes logger/cancel wiring and platform flags. machine-api-migration registers controllers from a new selector helper.
Dependency and module updates
go.mod, e2e/go.mod, manifests-gen/go.mod, openshift-tests-extension/go.mod
github.com/openshift/api is updated across modules, and go.mod replaces k8s.io/klog with k8s.io/klog/v2.

Sequence Diagram(s)

sequenceDiagram
  participant main as machine-api-migration main()
  participant getControllers
  participant util.GetFeatureGates
  participant allControllers
  participant SetupWithManager

  main->>getControllers: request controller map
  getControllers->>util.GetFeatureGates: load feature gates
  util.GetFeatureGates-->>getControllers: feature gates or error
  alt controllers enabled
    getControllers->>allControllers: build reconcilers
    allControllers-->>main: controller map
    main->>SetupWithManager: register each controller
  else disabled or unsupported
    getControllers-->>main: empty controller map
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • nrb
  • racheljpg
🚥 Pre-merge checks | ✅ 13 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Microshift Test Compatibility ⚠️ Warning New e2e Ginkgo tests in machine_migration*/machineset_migration*/machine_sync_test.go use machine.openshift.io Machine/MachineSet APIs without MicroShift/apigroup guards. Add [apigroup:machine.openshift.io] or [Skipped:MicroShift] tags, or guard these specs with exutil.IsMicroShiftCluster() before running on MicroShift.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main theme of replacing hard-coded platform checks with consistent feature-gate handling.
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 Changed Ginkgo titles are static literals; dynamic names only appear in test setup, not in test names.
Test Structure And Quality ✅ Passed The touched Ginkgo tests keep one-behavior specs, existing cleanup hooks, and suite/Node timeouts; no new structural or timeout regressions were introduced.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only existing webhook specs were touched; the change just updates helper return-value handling and adds no multi-node/SNO assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed No modified file adds topology-sensitive scheduling rules; the only control-plane selector/1-replica deployment is preexisting and unchanged.
Ote Binary Stdout Contract ✅ Passed No new process-level stdout writes were added; touched mains use logger/error paths, and shared startup config routes klog to stderr.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The added/updated e2e webhook tests only use in-cluster CRDs and client calls; no IPv4 literals or public endpoints appear in the test file.
No-Weak-Crypto ✅ Passed No MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons appear in the touched files.
Container-Privileges ✅ Passed No PR changes add privileged/hostPID/hostNetwork/hostIPC/SYS_ADMIN/allowPrivilegeEscalation settings; the deployment manifests inspected are clean.
No-Sensitive-Data-In-Logs ✅ Passed Reviewed the touched logging sites; they only emit platform, feature-gate, and revision metadata, with no passwords/tokens/PII/session IDs/customer data.

✏️ 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.

@openshift-ci

openshift-ci Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nrb 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

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 18, 2026
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 19, 2026
@mdbooth mdbooth changed the title OCPCLOUD 3541: Use feature gates consistently OCPCLOUD-3541: Use feature gates consistently Jun 19, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 19, 2026

Copy link
Copy Markdown

@mdbooth: This pull request references OCPCLOUD-3541 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

This change removes various hard-coded assumptions in the code about which
platforms are supported and uses feature gates exclusively for feature
enablement. Specifically:

  • When ClusterAPIMachineMigration is enabled we now always run the operator,
    regardless of whether the platform has support.
  • Consequently we always install core CAPI, even if platform support is not yet
    enabled.
  • The revision controller now checks the per-platform feature gate before
    enabling any platform-specific profiles.
  • The machine-api-migration entrypoint now uses the MachineAPIMigration
    featuregate and the per-platform MachineAPIMigration instead of hard-coding
    AWS and OpenStack.

Summary by CodeRabbit

  • New Features

  • Added feature-gate–aware platform handling for revision component selection, filtering platform-scoped providers when gates are disabled.

  • Bug Fixes

  • ClusterOperator status is now consistently reported without an unsupported-platform-specific message.

  • Installer deployment reconciliation no longer branches on unsupported-platform deletion behavior.

  • Refactor

  • Machine API migration controller startup now only registers reconcilers when feature-gates and platform support allow it.

  • Chores

  • Updated OpenShift API dependencies.

  • Updated tests and webhook validations to match the updated infrastructure/platform type resolution behavior.

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 Jun 19, 2026
@mdbooth

mdbooth commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-capi-disconnected-techpreview
/test e2e-aws-capi-techpreview
/test e2e-aws-capi-techpreview-post-install
/test e2e-aws-ovn-techpreview
/test e2e-aws-ovn-techpreview-upgrade
/test e2e-azure-capi-techpreview
/test e2e-azure-ovn-techpreview
/test e2e-azure-ovn-techpreview-upgrade
/test e2e-gcp-capi-techpreview
/test e2e-gcp-ovn-techpreview
/test e2e-metal3-capi-techpreview
/test e2e-openstack-capi-techpreview
/test e2e-vsphere-capi-techpreview
/test regression-clusterinfra-aws-ipi-techpreview-capi

@mdbooth

mdbooth commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/pipeline auto

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

The pipeline-auto label has been added to this PR. Second-stage tests will be triggered automatically when all first-stage tests pass.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-capi-disconnected-techpreview
/test e2e-aws-capi-techpreview
/test e2e-aws-capi-techpreview-post-install
/test e2e-aws-ovn-techpreview
/test e2e-aws-ovn-techpreview-upgrade
/test e2e-azure-capi-techpreview
/test e2e-azure-ovn-techpreview
/test e2e-azure-ovn-techpreview-upgrade
/test e2e-gcp-capi-techpreview
/test e2e-gcp-ovn-techpreview
/test e2e-metal3-capi-techpreview
/test e2e-openstack-capi-techpreview
/test e2e-vsphere-capi-techpreview
/test regression-clusterinfra-aws-ipi-techpreview-capi

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

mdbooth added 6 commits June 24, 2026 09:45
The revision controller now checks platform-specific CAPI feature gates
when building the component list. Platform-specific provider profiles are
only included when the corresponding feature gate is enabled.
Remove the IsSupportedPlatform/SupportedPlatform guards from the
capi-operator entrypoint. The operator is deployed by CVO only when
the ClusterAPIMachineManagement feature gate is enabled, so all
controllers should run whenever the operator is deployed.

Platform-specific provider selection is handled independently by the
revision controller.
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@mdbooth: 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-azure-ovn-techpreview ab9a2a5 link false /test e2e-azure-ovn-techpreview
ci/prow/e2e-openstack-capi-techpreview ab9a2a5 link true /test e2e-openstack-capi-techpreview
ci/prow/e2e-azure-ovn-techpreview-upgrade ab9a2a5 link true /test e2e-azure-ovn-techpreview-upgrade
ci/prow/e2e-aws-capi-disconnected-techpreview ab9a2a5 link false /test e2e-aws-capi-disconnected-techpreview
ci/prow/e2e-aws-ovn-techpreview-upgrade ab9a2a5 link true /test e2e-aws-ovn-techpreview-upgrade
ci/prow/e2e-aws-ovn-techpreview ab9a2a5 link true /test e2e-aws-ovn-techpreview

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.

@mdbooth

mdbooth commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

/test images

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. pipeline-auto

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants