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

Code Generation is not working #1218

Closed
faiq opened this issue Dec 21, 2019 · 4 comments · Fixed by #1229
Closed

Code Generation is not working #1218

faiq opened this issue Dec 21, 2019 · 4 comments · Fixed by #1229

Comments

@faiq
Copy link
Contributor

faiq commented Dec 21, 2019

What happened:
I git cloned the repository and ran make all as according to the instructions. I ran into issues here

./hack/update_codegen.sh
Using cached code generator version: 8e001e5d1894
Generating deepcopy funcs
Generating clientset for kudo:v1beta1 at github.com/kudobuilder/kudo/pkg/client/clientset
Generating listers for kudo:v1beta1 at github.com/kudobuilder/kudo/pkg/client/listers
Generating informers for kudo:v1beta1 at github.com/kudobuilder/kudo/pkg/client/informers
golangci-lint run
WARN [runner] Can't run linter goanalysis_metalinter: vrp: failed prerequisites: buildssa@github.com/kudobuilder/kudo/pkg/engine/health 
WARN [runner] Can't run linter unused: buildssa: analysis skipped: errors in package: [/home/faiq/go/src/github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go:188:26: in.client.DeepCopyClient undefined (type client.Client has no field or method DeepCopyClient) /home/faiq/go/src/github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go:193:9: (*in).DeepCopyInto undefined (type *admission.Decoder has no field or method DeepCopyInto) -: could not load export data: no export data for "github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1"] 
# developer convenience for platform they are running
go build -ldflags "-X github.com/kudobuilder/kudo/pkg/version.gitVersion=0.9.0 -X github.com/kudobuilder/kudo/pkg/version.gitCommit=61e21945 -X github.com/kudobuilder/kudo/pkg/version.buildDate=2019-12-21T00:42:09Z" -o bin/manager github.com/kudobuilder/kudo/cmd/manager
# github.com/kudobuilder/kudo/pkg/apis/kudo/v1beta1
pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go:188:25: in.client.DeepCopyClient undefined (type client.Client has no field or method DeepCopyClient)
pkg/apis/kudo/v1beta1/zz_generated.deepcopy.go:193:8: (*in).DeepCopyInto undefined (type *admission.Decoder has no field or method DeepCopyInto)
make: *** [Makefile:61: manager] Error 2

my environment was set correctly. proof:

$ env | grep GO
GOPATH=/home/faiq/go

What you expected to happen:
I expected it to build.

How to reproduce it (as minimally and precisely as possible):
run make all on master

Anything else we need to know?:
I'm building on a linux 64 bit system. I'm happy to close this one if you chose to reopen #1051

Environment:

  • Kubernetes version (use kubectl version):
  • Kudo version (use kubectl kudo version):
  • Operator:
  • operatorVersion:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@faiq faiq added the kind/bug label Dec 21, 2019
@kensipe
Copy link
Member

kensipe commented Dec 22, 2019

thanks for the report... looking.

@kensipe kensipe self-assigned this Dec 27, 2019
@kensipe kensipe added this to the 0.10.0 milestone Dec 27, 2019
@kensipe
Copy link
Member

kensipe commented Dec 27, 2019

The issue was introduced on a refactor #1207
with the inclusion of:

type InstanceValidator struct {
var _ kudo.Validator = &Instance{}		client  client.Client
	decoder *admission.Decoder
}

in pkg/apis/kudo/v1beta1/instance_validator.go

@kensipe
Copy link
Member

kensipe commented Dec 27, 2019

fixed with reverting refactor code: #1229

@kensipe
Copy link
Member

kensipe commented Dec 27, 2019

Thanks @faiq ! fix is merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants