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

"make test" target is broken #4856

Closed
fjammes opened this issue May 1, 2021 · 2 comments
Closed

"make test" target is broken #4856

fjammes opened this issue May 1, 2021 · 2 comments
Labels
language/go Issue is related to a Go operator project

Comments

@fjammes
Copy link

fjammes commented May 1, 2021

Bug Report

What did you do?

Update my Makefile according to "https://sdk.operatorframework.io/docs/building-operators/golang/references/envtest-setup/"
and run "make test"

What did you expect to see?

Unit tests should pass.

What did you see instead? Under which circumstances?

I get an error message:

$ make test
home/fjammes/go/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
goimports -w api
go fmt ./...
go vet ./...
/home/fjammes/go/bin/controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
goimports -w api
mkdir -p /home/fjammes/src/qserv-operator/testbin
test -f /home/fjammes/src/qserv-operator/testbin/setup-envtest.sh || curl -sSLo /home/fjammes/src/qserv-operator/testbin/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/master/hack/setup-envtest.sh
source /home/fjammes/src/qserv-operator/testbin/setup-envtest.sh; fetch_envtest_tools /home/fjammes/src/qserv-operator/testbin; setup_envtest_env /home/fjammes/src/qserv-operator/testbin; go test ./... -coverprofile cover.out
/home/fjammes/src/qserv-operator/testbin/setup-envtest.sh: line 1: 404:: command not found
/bin/bash: fetch_envtest_tools: command not found
/bin/bash: setup_envtest_env: command not found

A script is missing here:

$ curl -sSLo /home/fjammes/src/qserv-operator/testbin/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/master/hack/setup-envtest.sh
$ cat testbin/setup-envtest.sh 
404: Not Found%                 

Environment

Operator type:

/language go

Kubernetes cluster type:

kind

$ operator-sdk version
operator-sdk version: "v1.5.0", commit: "98f30d59ade2d911a7a8c76f0169a7de0dec37a0", kubernetes version: "1.19.4", go version: "go1.15.5", GOOS: "linux", GOARCH: "amd64"

$ go version (if language is Go)
go version go1.16.3 linux/amd64

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"9e991415386e4cf155a24b1da15becaa390438d8", GitTreeState:"clean", BuildDate:"2020-03-25T14:58:59Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-21T01:11:42Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

Possible Solution

Update documentation at https://sdk.operatorframework.io/docs/building-operators/golang/references/envtest-setup/

Possible temporary hack: in documenation, use file https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.8.3/hack/setup-envtest.sh instead of https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/master/hack/setup-envtest.sh

Additional context

@openshift-ci-robot openshift-ci-robot added the language/go Issue is related to a Go operator project label May 1, 2021
@burmanm
Copy link

burmanm commented May 2, 2021

This is the PR that broke it: kubernetes-sigs/controller-runtime#1488

@estroz
Copy link
Member

estroz commented May 3, 2021

Fixed in #4835. See the migration guide for details.

@estroz estroz closed this as completed May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/go Issue is related to a Go operator project
Projects
None yet
Development

No branches or pull requests

4 participants