-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚠️ Generate v1alpha4 types #3749
Conversation
Skipping CI for Draft Pull Request. |
/test pull-cluster-api-verify |
da37543
to
ea5ef0d
Compare
@vincepri what's the deal with the |
65c6fbf
to
807a363
Compare
@vincepri Running into a similar issue with auto generated conversion functions in |
That's normal that it's failing, it detects breaking changes from the previous commit, it's also an optional job
Let's sync up today, @ncdc updated the related issue yesterday with more details. I can't think of any immediate workaround, unless we can overwrite the conversion functions that are referring cross package types |
@srm09 @vincepri this is what I think we need to do to generate & use the right conversions:
All of these changes can be made in the Makefile. Here's a start to the conversion-gen calls that we'll need
Basically start with the foundation and then build up, adding extra-peer-dirs as needed. |
bd12032
to
0877908
Compare
@ncdc The changes that you suggested above to add |
@ncdc Is this waiting on any more changes to be merged to the default branch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/assign @ncdc
for final lgtm
@srm09 let me give it another 👀 before merging. |
/approve cancel |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri 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 |
Had to fix tests after rebase |
/test pull-cluster-api-test-main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srm09 thanks for your hard work on this! A few questions:
- Do we need to update cmd/clusterctl/... in this PR (it still imports v1alpha3 and the CRDs it owns are still v1alpha3)?
- test/framework/clusterctl/... still has v1alpha3 imports?
- Some of the files in test/infrastructure/docker/{examples,templates} still use v1alpha3?
- controllers/cluster_controller.go imports sigs.k8s.io/cluster-api/exp/api/v1alpha3 - this probably needs to be change to v1alpha4 and let's update the import alias to expv1?
- The following still have sample/test data using v1alpha3 (may be ok, though?)
- util/util_test.go
- util/yaml/yaml_test.go
- controlplane/kubeadm/internal/machinefilters/machine_filters_test.go
- controlplane/kubeadm/controllers/helpers_test.go
- exp/controllers/machinepool_controller_phases_test.go
- exp/controllers/machinepool_controller_test.go
- controllers/machine_controller_phases_test.go
- controllers/mdutil/util_test.go
- controllers/machine_controller_test.go
controlplane/kubeadm/api/v1alpha4/kubeadm_control_plane_types.go
Outdated
Show resolved
Hide resolved
The issue did not list the creation of the
same as above
UPDATE: Replaced the changes in the test files to use |
- Updates config/CRDs with the new generated types - Updates the config/webhook for validations of v1alpha4 types - Set the kubebuilder:storageversion for the v1alpha4 types and reset the one for v1alpha3 types - Adds v1alpha4 as the conversion hub and v1alpha3 as the spoke - Removes the webhooks for v1alpha3 types - Updates the PROJECT file Signed-off-by: Sagar Muchhal <[email protected]>
- Sets the storage version only for the v1alpha4 types - Regenerates the manifests under the config directory - Marks v1alpha4 as the conversion hub - Removes webhooks for v1alpha3 types - Updates the types in PROJECT file Signed-off-by: Sagar Muchhal <[email protected]>
- Sets the storage version only for the v1alpha4 types - Regenerates the manifests under the config directory - Marks the v1alpha4 version as conversion hub - Removes webhooks for v1alpha3 types - Updates the types in PROJECT file Signed-off-by: Sagar Muchhal <[email protected]>
- Sets the storage version only for the v1alpha4 types - Generates the conversion webhook for v1alpha3 -> v1alpha4 - Generates the v1alpha4 equivalents for exp API types - Regenerates the manifests under the config directory - Removes webhooks for v1alpha3 types - Updates the types in PROJECT file Signed-off-by: Sagar Muchhal <[email protected]>
- Generates v1alpha4 types for exp and exp/addons dir - Updates manifests and webhook configs - Updates PROJECT files to include alpha4 types - Updates Makefile to generate conversion files - Removes webhooks for v1alpha3 types Signed-off-by: Sagar Muchhal <[email protected]>
- Replace v1alpha3 imports with v1alpha4 ones - Removes v1alpha2 types Updates PROJECT files for core and bootstrap Update the manifests to remove v1alpha2 types Remove refs of v1alpha2 from Makefile - Removes v1alpha3 webhooks from manager - Updates code-gen Makefile targets Before running the conversion-gen, we delete the existing generated files to ensure clean generation of API conversion code. Signed-off-by: Sagar Muchhal <[email protected]> Co-authored-by: Vince Prignano <[email protected]>
/lgtm 🚀 🎉 🎂 |
@srm09: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
/test pull-cluster-api-test-main |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #3428
Fixes #3800