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

Mercurial prerequisite missing - release 0.9 #1681

Closed
JaroslavMajera opened this issue Jul 16, 2019 · 9 comments · Fixed by #1683
Closed

Mercurial prerequisite missing - release 0.9 #1681

JaroslavMajera opened this issue Jul 16, 2019 · 9 comments · Fixed by #1683
Assignees
Labels
area/dependency Issues or PRs related to dependency changes

Comments

@JaroslavMajera
Copy link

Hello guys,

I have tried to use release 0.9 and preparation of project ended on:

go: bitbucket.org/ww/[email protected]: hg clone -U https://bitbucket.org/ww/goautoneg . in /home/majera/go/pkg/mod/cache/vcs/59c2185b80ea440a7c3b8c5eff3d8abb68c53dea1f20f615370c924c4150b27f: exec: "hg": executable file not found in $PATH

It works fine after Mercurial installation. It would be good if mercurial is mentioned in prerequisites.

@lilic
Copy link
Member

lilic commented Jul 16, 2019

@JaroslavMajera Did you add an extra dependency to your operator, becausebitbucket.org/ww/goautoneg is not in the default deps for me. Also, I do not have hg command installed and the default operator compiles for me.

@JaroslavMajera
Copy link
Author

@lilic I didn't add an extra dependency. I was creating the example operator from docs.

@lilic
Copy link
Member

lilic commented Jul 16, 2019

@JaroslavMajera Can you please write down all the steps you took, preferably fill out the below, as I can't reproduce this, thanks!

**What did you do?**
A clear and concise description of the steps you took (or insert a code snippet).

**What did you expect to see?**
A clear and concise description of what you expected to happen (or insert a code snippet).

**What did you see instead? Under which circumstances?**
A clear and concise description of what you expected to happen (or insert a code snippet).


**Environment**
* operator-sdk version:

<!--- Insert operator-sdk release or Git SHA here. -->

* go version:

<!--- Insert the output of `go version` here -->

* Kubernetes version information:

<!--- Insert the output of `kubectl version` here -->

* Kubernetes cluster kind: 

* Are you writing your operator in ansible, helm, or go?

**Possible Solution**
<!--- Only if you have suggestions on a fix for the bug -->

**Additional context**
Add any other context about the problem here.

@JaroslavMajera
Copy link
Author

What did you do?
I have installed git, go, dep, operator-sdk and run operator-sdk new memcached-operator.

What did you expect to see?
Finish operator project initialization without error.

What did you see instead? Under which circumstances?
go: bitbucket.org/ww/[email protected]: hg clone -U https://bitbucket.org/ww/goautoneg . in /home/majera/go/pkg/mod/cache/vcs/59c2185b80ea440a7c3b8c5eff3d8abb68c53dea1f20f615370c924c4150b27f: exec: "hg": executable file not found in $PATH

Environment

  • operator-sdk version:

official release v0.9.0, commit: 560208d

  • go version:

1.12.7

  • dep version:

0.5.4

Possible Solution
Install mercurial

Additional context
I tried operator-sdk 0.5 and 0.8.1 before.

@lilic
Copy link
Member

lilic commented Jul 16, 2019

I do not run into this:

operator-sdk version
operator-sdk version: v0.9.0, commit: 560208dc998de497bbf59fea1b63426aec430934

➜  operator-framework operator-sdk new memcached-operator
INFO[0000] Creating new Go operator 'memcached-operator'.
INFO[0000] Created go.mod
INFO[0000] Created tools.go
INFO[0000] Created cmd/manager/main.go
INFO[0000] Created build/Dockerfile
INFO[0000] Created build/bin/entrypoint
INFO[0000] Created build/bin/user_setup
INFO[0000] Created deploy/service_account.yaml
INFO[0000] Created deploy/role.yaml
INFO[0000] Created deploy/role_binding.yaml
INFO[0000] Created deploy/operator.yaml
INFO[0000] Created pkg/apis/apis.go
INFO[0000] Created pkg/controller/controller.go
INFO[0000] Created version/version.go
INFO[0000] Created .gitignore
INFO[0000] Validating project
go: finding github.com/operator-framework/operator-sdk master
INFO[0010] Project validation successful.
INFO[0010] Project creation complete.

And:

➜  memcached-operator hg
zsh: command not found: hg

Can you paste the output of the go.mod and go.sum thanks!

@JaroslavMajera
Copy link
Author

Output of new command:
INFO[0000] Creating new Go operator 'memcached-operator'.
INFO[0000] Created go.mod
INFO[0000] Created tools.go
INFO[0000] Created cmd/manager/main.go
INFO[0000] Created build/Dockerfile
INFO[0000] Created build/bin/entrypoint
INFO[0000] Created build/bin/user_setup
INFO[0000] Created deploy/service_account.yaml
INFO[0000] Created deploy/role.yaml
INFO[0000] Created deploy/role_binding.yaml
INFO[0000] Created deploy/operator.yaml
INFO[0000] Created pkg/apis/apis.go
INFO[0000] Created pkg/controller/controller.go
INFO[0000] Created version/version.go
INFO[0000] Created .gitignore
INFO[0000] Validating project
go: finding github.com/operator-framework/operator-sdk master
go: finding github.com/emicklei/go-restful v2.8.1+incompatible
go: finding github.com/go-openapi/spec v0.18.0
go: finding github.com/googleapis/gnostic v0.2.0
...
go: finding github.com/gogo/protobuf v1.2.0
go: bitbucket.org/ww/[email protected]: hg clone -U https://bitbucket.org/ww/goautoneg . in /home/majera/go/pkg/mod/cache/vcs/59c2185b80ea440a7c3b8c5eff3d8abb68c53dea1f20f615370c924c4150b27f: exec: "hg": executable file not found in $PATH
go: finding github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9
go: finding github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277
go: finding github.com/docker/distribution v2.6.2+incompatible
go: finding github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a
go: finding golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5
go: error loading module requirements
Error: failed to exec []string{"go", "build", "./..."}: exit status 1

go.mod:
`module memcached-operator

require (
github.com/NYTimes/gziphandler v1.0.1 // indirect
github.com/operator-framework/operator-sdk v0.0.0-20190715204459-936584d47ff9
github.com/spf13/pflag v1.0.3
k8s.io/api v0.0.0-20190612125737-db0771252981
k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad
k8s.io/client-go v11.0.0+incompatible
k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 // indirect
sigs.k8s.io/controller-runtime v0.1.12
sigs.k8s.io/controller-tools v0.1.10
)

// Pinned to kubernetes-1.13.4
replace (
k8s.io/api => k8s.io/api v0.0.0-20190222213804-5cb15d344471
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628
k8s.io/client-go => k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4
)

replace (
github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.29.0
k8s.io/kube-state-metrics => k8s.io/kube-state-metrics v1.6.0
sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.1.12
sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde
)

replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.9.0
`

go.sum:

go.sum.log

@lilic
Copy link
Member

lilic commented Jul 16, 2019

hmm maybe this was due to me already having this dependency locally.

cc @estroz any ideas ^

@estroz
Copy link
Member

estroz commented Jul 16, 2019

@lilic @JaroslavMajera you can reproduce this error by running the following:

# dnf remove mercurial -y
$ go clean -modcache
$ operator-sdk new test-project
INFO[0000] Creating new Go operator 'hg-operator'.      
INFO[0000] Created go.mod                               
INFO[0000] Created tools.go                             
INFO[0000] Created cmd/manager/main.go                  
INFO[0000] Created build/Dockerfile                     
INFO[0000] Created build/bin/entrypoint                 
INFO[0000] Created build/bin/user_setup                 
INFO[0000] Created deploy/service_account.yaml          
INFO[0000] Created deploy/role.yaml                     
INFO[0000] Created deploy/role_binding.yaml             
INFO[0000] Created deploy/operator.yaml                 
INFO[0000] Created pkg/apis/apis.go                     
INFO[0000] Created pkg/controller/controller.go         
INFO[0000] Created version/version.go                   
INFO[0000] Created .gitignore                           
INFO[0000] Validating project                           
go: finding github.com/operator-framework/operator-sdk master
go: finding github.com/operator-framework/operator-sdk v0.9.0
...
go: bitbucket.org/ww/[email protected]: hg clone -U https://bitbucket.org/ww/goautoneg . in /home/estroz/go/pkg/mod/cache/vcs/59c2185b80ea440a7c3b8c5eff3d8abb68c53dea1f20f615370c924c4150b27f: exec: "hg": executable file not found in $PATH

I will update the release notes and guides with the mercurial dependency required for v0.9.0.

@estroz estroz self-assigned this Jul 16, 2019
@estroz estroz added the area/dependency Issues or PRs related to dependency changes label Jul 16, 2019
@lilic
Copy link
Member

lilic commented Jul 17, 2019

Thanks for reporting this @JaroslavMajera!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependency Issues or PRs related to dependency changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants