Skip to content
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

Change to use the updated deepcopy generation program #584

Closed
wants to merge 4 commits into from

Conversation

wangkuiyi
Copy link

@wangkuiyi wangkuiyi commented Feb 3, 2018

Fix #585

@wangkuiyi
Copy link
Author

It is a little strange here that the CI passes but my local build doesn't:

glide install --strip-vendor
go test $(glide nv)
?   	github.com/PaddlePaddle/cloud/go/cfs	[no test files]
# github.com/PaddlePaddle/cloud/go/pkg/apis/paddlepaddle/v1alpha1
pkg/apis/paddlepaddle/v1alpha1/register.go:25:16: cannot use TrainingJob literal (type *TrainingJob) as type runtime.Object in argument to scheme.AddKnownTypes:
	*TrainingJob does not implement runtime.Object (missing DeepCopyObject method)
pkg/apis/paddlepaddle/v1alpha1/register.go:26:20: cannot use TrainingJobList literal (type *TrainingJobList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*TrainingJobList does not implement runtime.Object (missing DeepCopyObject method)

@typhoonzero
Copy link
Collaborator

go/edl/resource/deepcopy_gen.sh seems not used any more. Newly checked in code by @m3ngyang try to define CRD resources, need to run bash ./vendor/k8s.io/code-generator/generate-groups.sh "deepcopy,client,informer,lister" github.com/PaddlePaddle/cloud/go/pkg/client github.com/PaddlePaddle/cloud/go/pkg/apis paddlepaddle:v1alpha1 before running go test, see: https://github.com/PaddlePaddle/cloud/blob/develop/.travis.yml#L16

@typhoonzero
Copy link
Collaborator

And, develop branch is going on to CRD, if we want to build TPR version, we have to checkout the previous release tag. Only CRD need to generate DeepCopy codes.

@wangkuiyi
Copy link
Author

Does this mean that what this PR should do is to remove deepcopy_gen.sh and zz_generated.deepcopy.go?

@typhoonzero
Copy link
Collaborator

Yes, we can remove these files.

@typhoonzero
Copy link
Collaborator

Sorry, seems these two files can not be removed for now, because we have already updated the Kubernetes API dependency to 1.8, the resource defination must require generated DeepCopy file.

I'll try to go over the code again tomorrow to fix this problem.

@m3ngyang
Copy link
Member

m3ngyang commented Feb 4, 2018

As discussed under pr #565 , the problem of deepcopy generation will be solved ASAP.

@wangkuiyi
Copy link
Author

Thanks to @m3ngyang . I am closing this PR.

@wangkuiyi wangkuiyi closed this Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants