-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Panic when generating api: invalid memory address or nil pointer dereference #1675
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
Comments
@mogren thanks for reporting this, we will look into this. I can't seem to reproduce this locally, for me it works fine. Does this happen always, or under certain conditions? Thanks! |
Things that are useful information are:
thanks! |
@mogren I had similar problem. Just make sure that you have properly set GOROOT env variable |
Hi, I'm able to reproduce the issue by following the README (just had to add
Some contextual info:
Edit: just saw the comment of snowerem: indeed setting |
+1, setting |
Using Archlinux here, and it seems like setting And indeed:
Seems like relying on the environment variable is not the way to go (no pun intended). |
this is due to a problem in gengo as described in issue #1545 (comment) Closing as the issue was resolved, thanks @snowerem for the solution! |
operator-sdk breaks when this is not set. operator-framework/operator-sdk#1675
This works around operator-framework/operator-sdk#1675 Signed-off-by: Stephen Kitt <[email protected]>
Bug Report
What did you do?
Tried to generate a new API using the latest operator-framework sdk. The project was built using v0.0.7, so it's about time to update. Ran the following command in the root directory:
What did you expect to see?
All files I need generated in
pkg/apis/
What did you see instead? Under which circumstances?
Environment
operator-sdk version: v0.9.0, commit: 560208d
go version go1.12.6 darwin/amd64
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-20T04:51:35Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.7-eks-c57ff8", GitCommit:"c57ff8e35590932c652433fab07988da79265d5b", GitTreeState:"clean", BuildDate:"2019-06-07T20:43:03Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Kubernetes cluster kind: EKS
Are you writing your operator in ansible, helm, or go?
In go.
Additional context
The project is in
$GOPATH/src
and hasGO111MODULE=on
set. The error looks similar to the one mentioned in #1480, but I thought go modules was supposed to work with v0.9.0? #1432 is also related.eniconfigs_v1alpha1_eniconfig_cr.yaml
content:eniconfigs_v1alpha1_eniconfig_crd.yaml
is empty.The text was updated successfully, but these errors were encountered: