-
Notifications
You must be signed in to change notification settings - Fork 637
🐛 fix: CAPA v1beta1 to v1beta2 generated conversion webhook #5739
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
🐛 fix: CAPA v1beta1 to v1beta2 generated conversion webhook #5739
Conversation
|
Skipping CI for Draft Pull Request. |
|
Looks good to me @damdo 👍 Ping when its out of draft/wip |
|
This needs a |
|
/test pull-cluster-api-provider-aws-verify (verify it should require a make generate-go |
47a002d to
1542112
Compare
|
go mod tidy also seems to be missing :D |
|
/test pull-cluster-api-provider-aws-verify |
1542112 to
cea2975
Compare
cea2975 to
4938d7b
Compare
|
@chrischdi @richardcase @AndiDog #5740 merged It should be ready to go now |
|
/test pull-cluster-api-provider-aws-test |
|
/test ? |
|
@damdo: The following commands are available to trigger required jobs: The following commands are available to trigger optional jobs: Use In response to this:
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. |
|
/test pull-cluster-api-provider-aws-e2e |
|
/hold For testing |
|
/assign @richardcase @AndiDog @chrischdi |
chrischdi
left a comment
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.
Nice cleanup
/lgtm
|
LGTM label has been added. Git tree hash: b317edcd6830e2795968f41c3b43270840e54770
|
|
/approve |
|
/cherry-pick release-2.9 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: richardcase 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 |
|
@chrischdi: once the present PR merges, I will cherry-pick it on top of In response to this:
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. |
|
/unhold |
|
/cherry-pick release-2.9 |
|
@chrischdi: #5739 failed to apply on top of branch "release-2.9": In response to this:
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. |
|
@damdo : needs a manual cherry-pick |
|
Manual backport done in #5744 |
/kind regression
This PR addresses a conversion webhook failure introduced in CAPA v2.9.x.
Users upgrading from CAPA v1.x (who have v1beta1 resources like AWSClusterControllerIdentity still stored in etcd) are unable to access these resources after upgrading to v2.9.x.
Any attempt to get these objects fails with an invalid groupVersion error, as the webhook incorrectly returns a v1beta1 object when v1beta2 is expected.
The root cause was identified in our old and custom copy of the upstream conversion-gen tooling.
A change (introduced in PR #5447 ) caused the generator to incorrectly add
out.TypeMeta = in.TypeMetato the generated conversion functions (zz_generated.conversion.go).This line improperly copies the
apiVersionfrom thev1beta1input object to thev1beta2output object, causing the webhook to return an invalid payload.This pull request resolves the issue by removing the old custom copy of the upstream conversion-gen, in favour of the up-to-date/latest mainline conversion-gen.
It follow that up with a regeneration of the conversion code which removes the problematic TypeMeta assignment.
More details in the Slack thread: https://kubernetes.slack.com/archives/CD6U2V71N/p1762863174053729