Skip to content

Conversation

@patrickdillon
Copy link
Contributor

Vendors capi v1.11

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

@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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 5, 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 ask for approval from vr4manta. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@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
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.
@patrickdillon
Copy link
Contributor Author

/hold cancel

Rebased. Linter should be fixed. Good to go!

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

openshift-ci bot commented Nov 8, 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-azure-ovn-shared-vpc 51d83c3 link false /test e2e-azure-ovn-shared-vpc
ci/prow/e2e-metal-assisted 51d83c3 link false /test e2e-metal-assisted
ci/prow/azure-private 51d83c3 link false /test azure-private
ci/prow/e2e-aws-ovn 51d83c3 link true /test e2e-aws-ovn
ci/prow/e2e-gcp-custom-dns 51d83c3 link false /test e2e-gcp-custom-dns
ci/prow/e2e-openstack-ovn 51d83c3 link true /test e2e-openstack-ovn
ci/prow/e2e-agent-sno-ipv6 51d83c3 link false /test e2e-agent-sno-ipv6
ci/prow/e2e-aws-ovn-heterogeneous 51d83c3 link false /test e2e-aws-ovn-heterogeneous
ci/prow/e2e-metal-ovn-two-node-fencing 51d83c3 link false /test e2e-metal-ovn-two-node-fencing
ci/prow/aws-private 51d83c3 link false /test aws-private
ci/prow/e2e-azurestack 51d83c3 link false /test e2e-azurestack
ci/prow/e2e-agent-ha-dualstack 51d83c3 link false /test e2e-agent-ha-dualstack
ci/prow/e2e-azure-ovn 51d83c3 link true /test e2e-azure-ovn
ci/prow/e2e-agent-two-node-fencing-ipv4 51d83c3 link false /test e2e-agent-two-node-fencing-ipv4
ci/prow/e2e-agent-compact-ipv6-minimaliso 51d83c3 link false /test e2e-agent-compact-ipv6-minimaliso
ci/prow/e2e-nutanix-ovn 51d83c3 link false /test e2e-nutanix-ovn
ci/prow/e2e-aws-ovn-single-node 51d83c3 link false /test e2e-aws-ovn-single-node

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants