craft icon indicating copy to clipboard operation
craft copied to clipboard

Some ERROR logs are labelled as [INFO]

Open supra08 opened this issue 4 years ago • 5 comments

While running the craft create command, it threw some errors in the logs but those were labelled as [INFO]:

INFO[0014] main.go:24:2: package wordpress/controllers is not in GOROOT (/usr/local/opt/go/libexec/src/wordpress/controllers)
INFO[0014] Error: not all generators ran successfully
INFO[0014] run `controller-gen object:headerFile=./hack/boilerplate.go.txt paths=./... -w` to see all available markers, or `controller-gen object:headerFile=./hack/boilerplate.go.txt paths=./... -h` for usage
INFO[0014] make: *** [generate] Error 1
INFO[0014] exit status 2
FATA[0014] exit status 1

supra08 avatar Sep 10 '20 13:09 supra08

Hey @supra08, My guess is kubebuilder isn't installed properly with all the dependencies but to get around this error can you do

go get sigs.k8s.io/controller-tools/cmd/[email protected]

controller-gen should be in your path

vnzongzna avatar Sep 10 '20 15:09 vnzongzna

No still no success. What I suspect is wordpress/controllers is not generated properly. It is empty. It is showing an import error in main.go:

    wordpressv1 "wordpress/api/v1"
      23
✖     24     "wordpress/controllers" compiler: could not import wordpress/controllers (no package for import wordpress/controllers)
      25
      26     "k8s.io/apimachinery/pkg/runtime"

supra08 avatar Sep 10 '20 16:09 supra08

I guess it is failing to build because of this: https://github.com/salesforce/craft/blob/master/cmd/build.go#L128 It supports linux but I am building on mac.

supra08 avatar Sep 10 '20 17:09 supra08

That section of build.goisn't for the user, it's for the container (building the manager binary that we can add in the container) can you tell which version of kubebuilder you are using?

vnzongzna avatar Sep 10 '20 18:09 vnzongzna

Version: version.Version{KubeBuilderVersion:"2.2.0", KubernetesVendor:"1.15.5", GitCommit:"0824a139f59e109c9e418a0b6e71a53c6e9e144f", BuildDate:"2019-11-20T00:00:24Z", GoOs:"unknown", GoArch:"unknown"}

supra08 avatar Sep 10 '20 18:09 supra08