Skip to content

Conversation

@patrickdillon
Copy link
Contributor

@patrickdillon patrickdillon commented Nov 4, 2025

Vendors capi v1.11

Not all providers have upgraded to v1.11 so this uses the following unmerged PRs to unstick us:

As much as vendoring these PRs smells, the alternative of being stuck, unable to vendor is worse. These packages are only used in the installer to generate manifests--the controllers themselves are untouched (note that this PR does not bump the controllers for the providers that have already migrated to v1.11, which we should do, but can do in a separate PR as this one has grown very large). So the risk seems low, with the major downside being that we are stuck to update that provider until these PRs get merge. We would update these packages back to the provider as quickly as possible after the merge.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 4, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 4, 2025

@patrickdillon: This pull request references CORS-4262 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 bug to target the "4.21.0" version, but no target version was set.

In response to this:

Vendors capi v1.11

Not all providers have upgraded to v1.11 so this uses WIP PRs to unstick us

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.

@patrickdillon
Copy link
Contributor Author

oh no, the units tests!

/this-is-fine

@patrickdillon
Copy link
Contributor Author

/hold
need to iterate on 6741582

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 4, 2025
@patrickdillon
Copy link
Contributor Author

/hold need to iterate on 6741582

Instead of trying to upgrade all our usage of cluster to v1beta2 at this time, I implemented a simpler workaround in 587e814

Of course we need to move to v1beta2. I haven't looked very closely yet, but it looks like a boilerplate update of all providers.

@vr4manta
Copy link
Contributor

vr4manta commented Nov 4, 2025

/assign @vr4manta

@patrickdillon
Copy link
Contributor Author

kubernetes/apimachinery@c58e197 has broken A LOT of unit tests

@patrickdillon
Copy link
Contributor Author

I went down a rabbit hole of trying to bump capi to v1beta2 as v1beta1 is flagged by the linter. It's a pretty big effort so I will nolint it and create a jira.

Also still need to fix a few unit tests.

@patrickdillon
Copy link
Contributor Author

/test e2e-ibmcloud-ovn e2e-nutanix-ovn

@patrickdillon patrickdillon force-pushed the capi-one-eleven branch 3 times, most recently from a6a1014 to 6257c12 Compare November 6, 2025 21:55
CAPI divided the API into subpackages.

For example:
sigs.k8s.io/cluster-api/exp/ipam/api/v1beta1 ->
sigs.k8s.io/cluster-api/api/ipam/v1beta1

sigs.k8s.io/cluster-api/api/v1beta1 ->
sigs.k8s.io/cluster-api/api/core/v1beta1

See: kubernetes-sigs/cluster-api#12262

This updates the import paths accordingly.
Featuregate was removed from openshift/api in
openshift/api#2494
capi v1.11 removed support for v1beta1 clusters in the GenerateSecret
function. This institutes a simple workaround of creating a private
copy of the function until we are ready to upgrade all of our usage
to v1beta2.
Changes in the apimachinery and client-go packages broke our unit
tests after upgrade. client-go stopped serializing the empty
preferences: {} field for the kubeconfig. apimachinery, with
kubernetes/apimachinery@c58e197
caused much more extensive breakage by changing the format with
which errors are returned, and our unit tests hard code the
expected error messages.

For the most part, I used claude to fix these issues, and here
is the summary it created:

Changes Made
Root Cause: The k8s apimachinery package (errors.go:93-96) now uses json.Marshal()
to format BadValue in error messages instead of Go's native format. Error Format Changes:

Arrays: []string{"a", "b"} → ["a","b"] (JSON format, no spaces)
Nil values: []string(nil) → null
Structs: aws.Subnet{ID:"x", Roles:...} → {"id":"x"} (JSON with lowercase keys)
Custom types: gcp.OSImage{Name:"x", Project:"y"} → {"name":"x","project":"y"}
RunMain is deprecated. Putting a nolint on it and created
https://issues.redhat.com/browse/OCPBUGS-64696 to ask the
agent team to fix eventually.
go generate ./pkg/types/installconfig.go
@patrickdillon patrickdillon force-pushed the capi-one-eleven branch 2 times, most recently from 809dfa0 to 51d83c3 Compare November 7, 2025 19:20
@patrickdillon
Copy link
Contributor Author

/hold cancel

Rebased. Linter should be fixed. Good to go!

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 11, 2025

@sadasu: This pull request references CORS-4262 which is a valid jira issue.

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.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 11, 2025
@sadasu
Copy link
Contributor

sadasu commented Nov 11, 2025

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sadasu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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 Nov 11, 2025
@tthvo
Copy link
Member

tthvo commented Nov 11, 2025

/retest

Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

/lgtm

Hope we won't run into this again... 😅

This bumps openshift/api to latest and bumps cluster-api to v1.11.

CAPI v1.11 contains breaking changes and not all providers have
completed migrating to v1.11 yet. Unfortunately this breaks us and
makes it so we are unable to update openshift/api (due to conflicts
with the latest apimachinery package which is incompatible with older
versions of CAPI).

Therefore, I am vendoring in the work-in-progress changes in CAPA,
CAPZ, & CAPX. The installer only uses this code to generate the
manifests (the controllers are vendored separately), so the risk
here is relatively low. This is meant as a temporary measure to
unblock us from making progress. Once these providers have
completed the merge to v1.11, we should be fine to remove
these replaces and vendor as usual.
Upgrading from capi v1beta1 -> v1beta2 will take a not
insignificant amount of work. I have captured that work in
https://issues.redhat.com/browse/CORS-3563
and set nolint to disable the linters from failing on this package.
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 11, 2025
Copy link
Member

@tthvo tthvo 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 lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Nov 11, 2025
Copy link
Member

@tthvo tthvo 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 Nov 11, 2025
@tthvo
Copy link
Member

tthvo commented Nov 12, 2025

/retest

@patrickdillon
Copy link
Contributor Author

/verified by multiple e2e tests

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Nov 12, 2025
@openshift-ci-robot
Copy link
Contributor

@patrickdillon: This PR has been marked as verified by multiple e2e tests.

In response to this:

/verified by multiple e2e tests

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.

@patrickdillon
Copy link
Contributor Author

/skip

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5a9edbb and 2 for PR HEAD 1071658 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 13, 2025

@patrickdillon: 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-nutanix-ovn 1071658 link false /test e2e-nutanix-ovn
ci/prow/e2e-openstack-proxy 1071658 link false /test e2e-openstack-proxy
ci/prow/e2e-metal-ovn-two-node-fencing 1071658 link false /test e2e-metal-ovn-two-node-fencing
ci/prow/e2e-azurestack 1071658 link false /test e2e-azurestack
ci/prow/e2e-agent-two-node-fencing-ipv4 1071658 link false /test e2e-agent-two-node-fencing-ipv4
ci/prow/e2e-aws-ovn-heterogeneous 1071658 link false /test e2e-aws-ovn-heterogeneous
ci/prow/e2e-metal-assisted 1071658 link false /test e2e-metal-assisted
ci/prow/e2e-ibmcloud-ovn 1071658 link false /test e2e-ibmcloud-ovn
ci/prow/e2e-azure-ovn-shared-vpc 1071658 link false /test e2e-azure-ovn-shared-vpc

Full PR test history. Your PR dashboard.

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 4180662 into openshift:main Nov 13, 2025
75 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants