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 shows source: not found #4203

Closed
sayboras opened this issue Nov 7, 2020 · 9 comments
Closed

make test shows source: not found #4203

sayboras opened this issue Nov 7, 2020 · 9 comments
Assignees
Labels
language/go Issue is related to a Go operator project lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Milestone

Comments

@sayboras
Copy link

sayboras commented Nov 7, 2020

Bug Report

make test shows below error for golang project

/bin/sh: 1: source: not found
/bin/sh: 1: fetch_envtest_tools: not found
/bin/sh: 1: setup_envtest_env: not found

What did you do?

Follow steps in https://sdk.operatorframework.io/docs/building-operators/golang/quickstart/, and run make test

What did you expect to see?

make test should not show any error

What did you see instead? Under which circumstances?

make test
...
/bin/sh: 1: source: not found
/bin/sh: 1: fetch_envtest_tools: not found
/bin/sh: 1: setup_envtest_env: not found
...

Environment

Operator type:

/language go

Kubernetes cluster type:

NA

$ operator-sdk version

operator-sdk version: "v1.1.0", commit: "9d27e224efac78fcc9354ece4e43a50eb30ea968", kubernetes version: "v1.18.2", go version: "go1.15 linux/amd64", GOOS: "linux", GOARCH: "amd64"

$ go version (if language is Go)

go version go1.15.3 linux/amd64

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}

Possible Solution

Makefile uses /bin/sh as default shell, override it by adding default line in Makefile

SHELL := /bin/bash

Additional context

@openshift-ci-robot openshift-ci-robot added the language/go Issue is related to a Go operator project label Nov 7, 2020
sayboras added a commit to sayboras/operator-sdk that referenced this issue Nov 7, 2020
This commit is to set default shell as bash for Makefile.

Some of the targets (e.g. test) in Make is source command, which is not available
in default Makefile shell (e.g. /bin/sh).

Closes operator-framework#4203
sayboras added a commit to sayboras/operator-sdk that referenced this issue Nov 7, 2020
This commit is to set default shell as bash for Makefile.

Some of the targets (e.g. test) in Make is source command, which is not available
in default Makefile shell (e.g. /bin/sh).

Closes operator-framework#4203
@jberkhahn jberkhahn added this to the Backlog milestone Nov 9, 2020
@jmrodri
Copy link
Member

jmrodri commented Nov 9, 2020

@sayboras out of curiosity what Linux version are you using? uname -a

@sayboras
Copy link
Author

oh right, I am running with ubuntu

$ uname -a                         
Linux ubuntu20 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

sayboras added a commit to sayboras/operator-sdk that referenced this issue Nov 10, 2020
This commit is to set default shell as bash for Makefile.

Some of the targets (e.g. test) in Make is source command, which is not available
in default Makefile shell (e.g. /bin/sh).

Closes operator-framework#4203
sayboras added a commit to sayboras/operator-sdk that referenced this issue Nov 10, 2020
This commit is to set default shell as bash for Makefile.

Some of the targets (e.g. test) in Make is source command, which is not available
in default Makefile shell (e.g. /bin/sh).

Closes operator-framework#4203
sayboras added a commit to sayboras/operator-sdk that referenced this issue Nov 10, 2020
This commit is to set default shell as bash for Makefile.

Some of the targets (e.g. test) in Make is source command, which is not available
in default Makefile shell (e.g. /bin/sh).

Closes operator-framework#4203
@jmrodri
Copy link
Member

jmrodri commented Nov 10, 2020

oh right, I am running with ubuntu

$ uname -a                         
Linux ubuntu20 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Thanks. So based on the default Ubuntu installation /bin/sh is a symlink to dash a different shell. Changing source SCRIPT to . SCRIPT would work but that can't be done in the SDK. I'll look at your PR now.

@estroz
Copy link
Member

estroz commented Dec 18, 2020

Relates to kubernetes-sigs/controller-runtime#1300

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 18, 2021
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci-robot openshift-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 17, 2021
@estroz
Copy link
Member

estroz commented Apr 19, 2021

This will be fixed by kubernetes-sigs/kubebuilder#2149

@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci
Copy link

openshift-ci bot commented May 19, 2021

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot closed this as completed May 19, 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 lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants