Remove hack/tools/third_party/conversion-gen fork #5153
Labels
kind/bug
Categorizes issue or PR as related to a bug.
needs-priority
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
/kind bug
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
Currently, we have a forked version of the
conversion_gen
tool, added in commit 4274a5aThe comment states
Temporarily disable duplicate static conversion detection
.When updating to CAPI 1.8 in #5061, Kubernetes 1.30 introduced new changes to the
conversion_gen
tool, as all of them had been refactored. See this post on the mailing list: https://groups.google.com/a/kubernetes.io/g/dev/c/Ix-ACY9DhEs/m/vEoBkBs9AAAJI have removed the forked copy and configured the Makefile to use the upstream
conversion_gen
tool, however, when I ran themake .build/generate-go-apis
command, I received the following error.What did you expect to happen:
Moving back to the upstream version of
conversion-gen
should have worked; however, they still have the offending error at https://github.com/kubernetes/code-generator/blob/release-1.30/cmd/conversion-gen/generators/conversion.go#L184.Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
I think this is happening because we have the
exp
directory, which is the experimental APIs.I'll note that the core CAPI project has an
exp/api
directory (https://github.com/kubernetes-sigs/cluster-api/tree/release-1.8/exp/api/v1beta1), but it is not breaking. I have not done a thorough reading of the code, but I suspect they're unaffected because they do not have a type defined in both, whereas this project hasv1beta2.Instance
in both ourexp/api
andapi
directories.Also, it wasn't immediately obvious to me why the collision was happening in our code, since the
Instance
type is in two different packages.The problem is that the conversion file goes into the
v1beta1
package, and anything other than the API version and type name are omitted in the function. Thus,v1beta1.Instance
can only be converted to onev1beta2.Instance
.See the signature found:
The text was updated successfully, but these errors were encountered: