Skip to content

Conversation

@huali9
Copy link
Contributor

@huali9 huali9 commented Dec 16, 2025

https://issues.redhat.com/browse/OCPCLOUD-3188 and https://issues.redhat.com/browse/OCPBUGS-55337 closed, so update the code to reflect it.
tested locally passed. @sunzhaohua2 @miyadav @damdo PTAL, thanks!

liuhuali@Lius-MacBook-Pro cluster-capi-operator % go run ./vendor/github.com/onsi/ginkgo/v2/ginkgo -v --focus="Create MAPI MachineSets" ./e2e/...
Running Suite: Cluster API Suite - /Users/liuhuali/project/cluster-capi-operator/e2e
====================================================================================
Random Seed: 1765864497

Will run 13 of 78 specs
------------------------------
[BeforeSuite] 
/Users/liuhuali/project/cluster-capi-operator/e2e/e2e_test.go:15
[BeforeSuite] PASSED [2.384 seconds]
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSS
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration MAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: MachineAPI and existing CAPI MachineSet with same name should reject creation of MAPI MachineSet with same name as existing CAPI MachineSet
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_mapi_authoritative_test.go:58
  STEP: Creating CAPI MachineSet capi-machineset-authoritativeapi-mapi with 0 replicas @ 12/16/25 13:55:10.286
  STEP: Creating AWS machine template @ 12/16/25 13:55:10.867
  STEP: Creating MachineSet "capi-machineset-authoritativeapi-mapi" @ 12/16/25 13:55:11.285
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Waiting for CAPI MachineSet machines "capi-machineset-authoritativeapi-mapi" to enter Running phase @ 12/16/25 13:55:11.656
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 Machine is deprecated; use cluster.x-k8s.io/v1beta2 Machine"
  STEP: Verifying there is an AWSMachineTemplate with prefix capi-machineset-authoritativeapi-mapi @ 12/16/25 13:55:12.233
  STEP: Attempting to create a MAPI MachineSet with the same name as existing CAPI MachineSet @ 12/16/25 13:55:12.519
  STEP: Verifying creation is rejected by ValidatingAdmissionPolicy @ 12/16/25 13:55:13.171
  STEP: Cleaning up Context 'with spec.authoritativeAPI: MachineAPI and existing CAPI MachineSet with same name' resources @ 12/16/25 13:55:13.463
  STEP: Deleting CAPI MachineSet capi-machineset-authoritativeapi-mapi @ 12/16/25 13:55:13.463
  STEP: Deleting MachineSet "capi-machineset-authoritativeapi-mapi" @ 12/16/25 13:55:13.463
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Waiting for MachineSet "capi-machineset-authoritativeapi-mapi" to be deleted @ 12/16/25 13:55:13.765
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 Machine is deprecated; use cluster.x-k8s.io/v1beta2 Machine"
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Deleting awsMachineTemplate capi-machineset-authoritativeapi-mapi @ 12/16/25 13:55:14.334
  STEP: Deleting awsMachineTemplate "capi-machineset-authoritativeapi-mapi" @ 12/16/25 13:55:14.334
• [4.917 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration MAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: MachineAPI and when no existing CAPI MachineSet with same name should find MAPI MachineSet .status.authoritativeAPI to equal MAPI
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_mapi_authoritative_test.go:91
  STEP: Creating MAPI MachineSet with spec.authoritativeAPI: MachineAPI, spec.template.spec.authoritativeAPI: MachineAPI, replicas=0 @ 12/16/25 13:55:14.624
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Verifying there is a CAPI MachineSet mirror for MAPI MachineSet ms-authoritativeapi-mapi @ 12/16/25 13:55:16.364
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Verifying there is an AWSMachineTemplate with prefix ms-authoritativeapi-mapi @ 12/16/25 13:55:16.653
  STEP: Verifying the MachineSet authoritative is MachineAPI @ 12/16/25 13:55:16.977
• [2.660 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration MAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: MachineAPI and when no existing CAPI MachineSet with same name should verify that MAPI MachineSet Paused condition is False
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_mapi_authoritative_test.go:95
  STEP: Verifying MAPI MachineSet is unpaused @ 12/16/25 13:55:17.285
• [0.306 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration MAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: MachineAPI and when no existing CAPI MachineSet with same name should verify that MAPI MachineSet Synchronized condition is True
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_mapi_authoritative_test.go:99
  STEP: Verifying the MAPI MachineSet Synchronized condition is True @ 12/16/25 13:55:17.591
• [0.288 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration MAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: MachineAPI and when no existing CAPI MachineSet with same name should find that MAPI MachineSet has a CAPI MachineSet mirror
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_mapi_authoritative_test.go:103
  STEP: Verifying there is a CAPI MachineSet mirror for MAPI MachineSet ms-authoritativeapi-mapi @ 12/16/25 13:55:17.879
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
• [0.326 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration MAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: MachineAPI and when no existing CAPI MachineSet with same name should verify that the mirror CAPI MachineSet has Paused condition True
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_mapi_authoritative_test.go:107
  STEP: Verifying CAPI MachineSet is paused @ 12/16/25 13:55:18.205
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Cleaning up Context 'with spec.authoritativeAPI: MachineAPI and when no existing CAPI MachineSet with same name' resources @ 12/16/25 13:55:18.5
  STEP: Deleting MAPI MachineSet ms-authoritativeapi-mapi @ 12/16/25 13:55:18.5
  STEP: Deleting awsMachineTemplate ms-authoritativeapi-mapi-58b3dd9d @ 12/16/25 13:55:19.643
  STEP: Deleting awsMachineTemplate "ms-authoritativeapi-mapi-58b3dd9d" @ 12/16/25 13:55:19.644
• [1.724 seconds]
------------------------------
SSSSSSSSSSSSSSSSS
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration CAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: ClusterAPI and existing CAPI MachineSet with same name should verify that MAPI MachineSet has Paused condition True
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_capi_authoritative_test.go:57
  STEP: Creating CAPI MachineSet capi-machineset-authoritativeapi-capi with 0 replicas @ 12/16/25 13:55:20.503
  STEP: Creating AWS machine template @ 12/16/25 13:55:21.077
  STEP: Creating MachineSet "capi-machineset-authoritativeapi-capi" @ 12/16/25 13:55:21.368
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Waiting for CAPI MachineSet machines "capi-machineset-authoritativeapi-capi" to enter Running phase @ 12/16/25 13:55:21.669
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 Machine is deprecated; use cluster.x-k8s.io/v1beta2 Machine"
  STEP: Creating a same name MAPI MachineSet @ 12/16/25 13:55:22.246
  STEP: Creating MAPI MachineSet with spec.authoritativeAPI: ClusterAPI, spec.template.spec.authoritativeAPI: ClusterAPI, replicas=0 @ 12/16/25 13:55:22.246
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Waiting for CAPI MachineSet machines "capi-machineset-authoritativeapi-capi" to enter Running phase @ 12/16/25 13:55:23.43
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 Machine is deprecated; use cluster.x-k8s.io/v1beta2 Machine"
  STEP: Verifying there is an AWSMachineTemplate with prefix capi-machineset-authoritativeapi-capi @ 12/16/25 13:55:24.174
  STEP: Verifying MAPI MachineSet is paused @ 12/16/25 13:55:24.464
• [4.821 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration CAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: ClusterAPI and existing CAPI MachineSet with same name should verify that the non-authoritative MAPI MachineSet providerSpec has been updated to reflect the authoritative CAPI MachineSet mirror values
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_capi_authoritative_test.go:61
  STEP: Verifying MAPI MachineSet capi-machineset-authoritativeapi-capi ProviderSpec @ 12/16/25 13:55:24.751
  STEP: Cleaning up Context 'with spec.authoritativeAPI: ClusterAPI and existing CAPI MachineSet with same name' resources @ 12/16/25 13:55:25.037
  STEP: Deleting CAPI MachineSet capi-machineset-authoritativeapi-capi @ 12/16/25 13:55:25.037
  STEP: Deleting MachineSet "capi-machineset-authoritativeapi-capi" @ 12/16/25 13:55:25.037
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Waiting for MachineSet "capi-machineset-authoritativeapi-capi" to be deleted @ 12/16/25 13:55:25.342
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 Machine is deprecated; use cluster.x-k8s.io/v1beta2 Machine"
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Deleting MAPI MachineSet capi-machineset-authoritativeapi-capi @ 12/16/25 13:55:25.914
E1216 13:55:26.200650   12814 machinesets.go:772] Error querying api for machine object "capi-machineset-authoritativeapi-capi": machinesets.machine.openshift.io "capi-machineset-authoritativeapi-capi" not found, retrying...
  STEP: Deleting awsMachineTemplate capi-machineset-authoritativeapi-capi @ 12/16/25 13:55:27.055
  STEP: Deleting awsMachineTemplate "capi-machineset-authoritativeapi-capi" @ 12/16/25 13:55:27.055
• [2.591 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration CAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: ClusterAPI and no existing CAPI MachineSet with same name should find MAPI MachineSet .status.authoritativeAPI to equal CAPI
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_capi_authoritative_test.go:84
  STEP: Creating MAPI MachineSet with spec.authoritativeAPI: ClusterAPI, spec.template.spec.authoritativeAPI: ClusterAPI, replicas=0 @ 12/16/25 13:55:27.342
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Waiting for CAPI MachineSet machines "ms-authoritativeapi-capi" to enter Running phase @ 12/16/25 13:55:28.508
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 Machine is deprecated; use cluster.x-k8s.io/v1beta2 Machine"
  STEP: Verifying there is a CAPI MachineSet mirror for MAPI MachineSet ms-authoritativeapi-capi @ 12/16/25 13:55:29.084
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Verifying there is an AWSMachineTemplate with prefix ms-authoritativeapi-capi @ 12/16/25 13:55:29.374
  STEP: Verifying the MachineSet authoritative is ClusterAPI @ 12/16/25 13:55:29.677
• [2.624 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration CAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: ClusterAPI and no existing CAPI MachineSet with same name should verify that MAPI MachineSet Paused condition is True
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_capi_authoritative_test.go:88
  STEP: Verifying MAPI MachineSet is paused @ 12/16/25 13:55:29.966
• [0.289 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration CAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: ClusterAPI and no existing CAPI MachineSet with same name should verify that MAPI MachineSet Synchronized condition is True
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_capi_authoritative_test.go:92
  STEP: Verifying the MAPI MachineSet Synchronized condition is True @ 12/16/25 13:55:30.255
• [0.292 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration CAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: ClusterAPI and no existing CAPI MachineSet with same name should verify that the non-authoritative MAPI MachineSet has an authoritative CAPI MachineSet mirror
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_capi_authoritative_test.go:96
  STEP: Verifying there is a CAPI MachineSet mirror for MAPI MachineSet ms-authoritativeapi-capi @ 12/16/25 13:55:30.548
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
• [0.356 seconds]
------------------------------
[sig-cluster-lifecycle][OCPFeatureGate:MachineAPIMigration] MachineSet Migration CAPI Authoritative Tests Create MAPI MachineSets with spec.authoritativeAPI: ClusterAPI and no existing CAPI MachineSet with same name should verify that CAPI MachineSet has Paused condition False
/Users/liuhuali/project/cluster-capi-operator/e2e/machineset_migration_capi_authoritative_test.go:100
  STEP: Verifying CAPI MachineSet is unpaused @ 12/16/25 13:55:30.904
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Cleaning up Context 'with spec.authoritativeAPI: ClusterAPI and no existing CAPI MachineSet with same name' resources @ 12/16/25 13:55:31.193
  STEP: Deleting CAPI MachineSet ms-authoritativeapi-capi @ 12/16/25 13:55:31.193
  STEP: Deleting MachineSet "ms-authoritativeapi-capi" @ 12/16/25 13:55:31.193
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Waiting for MachineSet "ms-authoritativeapi-capi" to be deleted @ 12/16/25 13:55:31.498
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 Machine is deprecated; use cluster.x-k8s.io/v1beta2 Machine"
  "level"=0 "msg"="cluster.x-k8s.io/v1beta1 MachineSet is deprecated; use cluster.x-k8s.io/v1beta2 MachineSet"
  STEP: Deleting MAPI MachineSet ms-authoritativeapi-capi @ 12/16/25 13:55:32.233
E1216 13:55:32.516804   12814 machinesets.go:772] Error querying api for machine object "ms-authoritativeapi-capi": machinesets.machine.openshift.io "ms-authoritativeapi-capi" not found, retrying...
  STEP: Deleting awsMachineTemplate ms-authoritativeapi-capi-58b3dd9d @ 12/16/25 13:55:33.417
  STEP: Deleting awsMachineTemplate "ms-authoritativeapi-capi-58b3dd9d" @ 12/16/25 13:55:33.418
• [2.865 seconds]
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSS

Ran 13 of 78 Specs in 26.447 seconds
SUCCESS! -- 13 Passed | 0 Failed | 0 Pending | 65 Skipped
PASS

Ginkgo ran 1 suite in 35.839826486s
Test Suite Passed

Summary by CodeRabbit

  • Tests
    • Re-enabled previously pending tests for machine set migration scenarios
    • Added validation for proper error handling when creating machine sets with duplicate names across different API implementations

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci-robot
Copy link

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
Copy link

coderabbitai bot commented Dec 16, 2025

Walkthrough

Two E2E test files were modified to enable previously pending tests. One test is reactivated by changing its status from pending to active. The other test implements concrete logic to verify rejection of MAPI MachineSet creation when a CAPI MachineSet with the same name exists.

Changes

Cohort / File(s) Change Summary
Test Re-enablement
e2e/machineset_migration_capi_authoritative_test.go
Changed Ginkgo spec from PIt (pending) to It, transitioning test from skipped to active execution state
Test Implementation
e2e/machineset_migration_mapi_authoritative_test.go
Replaced pending test with concrete test implementation that constructs MachineSetParams, sets conflicting name/labels, and asserts error response for admission policy violation

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

These are straightforward test modifications involving simple spec status changes and basic test assertion logic. No complex logic, interdependencies, or architectural changes are present.

Poem

🐰 A hop and a test come to life today,
Pending specs now dance and play,
Admission rules we'll verify true,
With assertions that bind the new,
Quality hops, both left and right! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title is vague and generic, using non-specific language ('card complete or bug fix', 'update to reflect it') that fails to convey the actual changeset—re-enabling two previously pending e2e tests. Revise the title to clearly describe the main change, such as 'Re-enable MAPI and CAPI MachineSet migration e2e tests' or 'Activate pending test specs for MachineSet migration scenarios'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between bd0557a and 6312013.

📒 Files selected for processing (2)
  • e2e/machineset_migration_capi_authoritative_test.go (1 hunks)
  • e2e/machineset_migration_mapi_authoritative_test.go (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
e2e/machineset_migration_mapi_authoritative_test.go (1)
e2e/framework/machineset.go (1)
  • CreateMachineSet (49-94)
🔇 Additional comments (2)
e2e/machineset_migration_capi_authoritative_test.go (1)

61-63: LGTM! Test re-enablement aligns with bug fixes.

Re-enabling this test is appropriate given the referenced closed issues (OCPCLOUD-3188, OCPBUGS-55337). The test verifies that mirror synchronization works correctly between CAPI and MAPI MachineSets.

e2e/machineset_migration_mapi_authoritative_test.go (1)

58-70: LGTM! Test correctly verifies admission policy enforcement.

The test implementation properly verifies that the ValidatingAdmissionPolicy rejects creation of a MAPI MachineSet when a CAPI MachineSet with the same name already exists. The test logic is sound:

  • Builds parameters using the framework helper
  • Correctly sets the conflicting name and authoritative API fields
  • Expects creation to fail with the specific policy violation message
  • Cleanup is appropriate (empty MAPI MachineSet slice since creation should fail)

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 16, 2025

[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 joelspeed 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

Copy link
Contributor

@chrischdi chrischdi left a comment

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 Dec 16, 2025
@openshift-ci-robot
Copy link

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-capi-techpreview
/test e2e-aws-ovn
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/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-openstack-ovn-techpreview
/test e2e-vsphere-capi-techpreview
/test regression-clusterinfra-aws-ipi-techpreview-capi

@miyadav
Copy link
Member

miyadav commented Dec 16, 2025

@huali9 @sunzhaohua2 @chrischdi , the image we are using here is 4.21 of private tests , which missed the revert(branch cut) .
made the cherry-pick , PTAL when time permits , the QE regression test should pass then .

As far as this PR is concerned this is good.
/lgtm

@huali9
Copy link
Contributor Author

huali9 commented Dec 17, 2025

/retest

2 similar comments
@huali9
Copy link
Contributor Author

huali9 commented Dec 17, 2025

/retest

@damdo
Copy link
Member

damdo commented Jan 9, 2026

/retest

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

/assign @theobarberbany

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

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

machineSetParams.Name = existingCAPIMSAuthorityMAPIName
machineSetParams.Labels[mapiframework.MachineSetKey] = existingCAPIMSAuthorityMAPIName
machineSetParams.MachinesetAuthoritativeAPI = mapiv1beta1.MachineAuthorityMachineAPI
machineSetParams.MachineAuthoritativeAPI = mapiv1beta1.MachineAuthorityMachineAPI
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicate line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, one for MachineSet (spec.authoritativeAPI) and the other for Machine (spec.template.spec.authoritativeAPI)

By("Attempting to create a MAPI MachineSet with the same name as existing CAPI MachineSet")
machineSetParams := mapiframework.BuildMachineSetParams(ctx, cl, 0)
machineSetParams.Name = existingCAPIMSAuthorityMAPIName
machineSetParams.Labels[mapiframework.MachineSetKey] = existingCAPIMSAuthorityMAPIName
Copy link
Contributor

Choose a reason for hiding this comment

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

question/non-blocking nit: why are we setting this? IIUC we don't read any labels to determine VAP enforcement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I copied this from the existing implementation for consistency. I assumed we had reviewed that pattern before. If it's not needed for VAP enforcement, happy to remove it.

@theobarberbany
Copy link
Contributor

Do we have sufficient e2e coverage for the other part of the VAP? so creating a MAPI MachineSet with AuthoritativeAPI ClusterAPI (this should be allowed)

We may not need to add one explicitly, we may be covering this somewhere else already - I'm just not sure :)

@huali9
Copy link
Contributor Author

huali9 commented Jan 15, 2026

Do we have sufficient e2e coverage for the other part of the VAP? so creating a MAPI MachineSet with AuthoritativeAPI ClusterAPI (this should be allowed)

We may not need to add one explicitly, we may be covering this somewhere else already - I'm just not sure :)

Thank you for the asking! We already have this part "creating a MAPI MachineSet with AuthoritativeAPI ClusterAPI (this should be allowed)"

This test focuses on MAPI MachineSet with AuthoritativeAPI MachineAPI, I don't think we have explicit coverage for this scenario. The current VAP e2e tests are limited to Machines (added by Milind). Not sure if we wanted to extend the VAP test coverage to MachineSets as well. @miyadav @sunzhaohua2 Do you have any thoughts on this?

@sunzhaohua2
Copy link
Contributor

Do we have sufficient e2e coverage for the other part of the VAP? so creating a MAPI MachineSet with AuthoritativeAPI ClusterAPI (this should be allowed)
We may not need to add one explicitly, we may be covering this somewhere else already - I'm just not sure :)

Thank you for the asking! We already have this part "creating a MAPI MachineSet with AuthoritativeAPI ClusterAPI (this should be allowed)"

This test focuses on MAPI MachineSet with AuthoritativeAPI MachineAPI, I don't think we have explicit coverage for this scenario. The current VAP e2e tests are limited to Machines (added by Milind). Not sure if we wanted to extend the VAP test coverage to MachineSets as well. @miyadav @sunzhaohua2 Do you have any thoughts on this?

Once pr #440 merged, we can create a similar file for machineset VAP test.

This pr is mostly dup with #415 @huali9 can you add should reject creation of MAPI Machine with the same name as existing CAPI Machine to this pr as well? Or I can modify 415 after merging this one.

@huali9
Copy link
Contributor Author

huali9 commented Jan 20, 2026

This pr is mostly dup with #415 @huali9 can you add should reject creation of MAPI Machine with the same name as existing CAPI Machine to this pr as well? Or I can modify 415 after merging this one.

@sunzhaohua2 Sorry, I didn't notice #415 earlier. Since this PR is mostly a duplicate of #415, I think it makes sense for me to close this one. Feel free to proceed with #415 instead! Thank you!

/close

@openshift-ci openshift-ci bot closed this Jan 20, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

@huali9: Closed this PR.

Details

In response to this:

This pr is mostly dup with #415 @huali9 can you add should reject creation of MAPI Machine with the same name as existing CAPI Machine to this pr as well? Or I can modify 415 after merging this one.

@sunzhaohua2 Sorry, I didn't notice #415 earlier. Since this PR is mostly a duplicate of #415, I think it makes sense for me to close this one. Feel free to proceed with #415 instead! Thank you!

/close

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.

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

Labels

lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants