-
Notifications
You must be signed in to change notification settings - Fork 39k
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
expapi conversion missing convert_v1_PodSpec_To_api_PodSpec and convert_api_PodSpec_To_v1_PodSpec methods #12977
Comments
It would probably be to expose that conversion as a public method (create On Thu, Aug 20, 2015 at 9:24 AM, Maciej Szulik notifications@github.com
Clayton Coleman | Lead Engineer, OpenShift |
I'm not sure if the genconversion tool will properly call the public method. If it does, I think making the method public is the proper way. |
I thought that genconversion should be generating a conversion that calls the handwritten function through s.Convert. I really don't think conversion functions should be made public. |
Yes if there is not much overhead in calling s.Convert, then it seems better to change the generated functions to use s.Convert instead of calling hand-written functions directly. That seems better to me than making the function public. @wojtek-t WDYT? |
@nikhiljindal I agree that changing to "s.Convert" is the cleanest way to do it. But we should measure the impact of that change on performance (and we should wait for watch in apiserver because this can change the result in my opinion - i.e. changing it might have smaller impact and we will be able to change it). |
I believe this must have been resolved, given that we were able to make the experimental group. |
The functions are duplicated in both pkg/apis/experimental/v1alpha1/conversion.go and pkg/api/v1/conversion.go which as OP said allowed us to proceed but is not the cleanest way. |
Frankly said I'm partially happy with the current solution, but I'm guessing nobody has enough time to work it out in a better way so I'm ok with closing it as is. Once we start moving things out of experimental we'll be able to clean it as well. |
This ended up breaking conversion generation in #20847 between Go 1.4 and Go 1.5. Still trying to track which package forces this to get registered first. |
That came up during working on #12910. I'm adding new
Job
resource inpkg/expapi
and while generating conversions for that I'm reachingconvert_v1_PodSpec_To_api_PodSpec
andconvert_api_PodSpec_To_v1_PodSpec
functions which are hand written in pkg/api/v1/conversion.go which results in compilation errors. What should be the right path to proceed with this? For now I've copied those functions manually topkg/expapi/v1/conversion.go
in aforementioned PR but I'm quite it's not the expected way to proceed with that.@wojtek-t @smarterclayton
The text was updated successfully, but these errors were encountered: