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

cmd/manager/main.go:119:11: undefined: metrics.ExposeMetricsPort #1619

Closed
bingosummer opened this issue Jul 1, 2019 · 8 comments
Closed
Labels
triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@bingosummer
Copy link

Bug Report

What did you do?
Create and deploy an app-operator

What did you expect to see?
operator-sdk new app-operator should succeed.

What did you see instead? Under which circumstances?

$ operator-sdk new app-operator
INFO[0000] Creating new Go operator 'app-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
# github.com/bingosummer/app-operator/cmd/manager
cmd/manager/main.go:119:11: undefined: metrics.ExposeMetricsPort
Error: failed to exec []string{"go", "build", "./..."}: exit status 2

#1560 breaks the released version. Please release a new version.

Environment

  • operator-sdk version:
    $ operator-sdk version
    operator-sdk version: v0.8.0-46-gc8ead552, commit: c8ead55
  • go version:
  • Kubernetes version information:
  • Kubernetes cluster kind:

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

Possible Solution

Additional context
Add any other context about the problem here.

@lilic
Copy link
Member

lilic commented Jul 1, 2019

@bingosummer hello, yes this is expected, as stated in the CHANGELOG we have removed this and instead use metrics. OperatorPortName

Can you explain how you ran into this problem? As if I use master branch to create a new operator that works fine for me. Same if I use a release.

@lilic lilic added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jul 1, 2019
@bingosummer
Copy link
Author

Thanks @lilic for your quick response.
My bad. I thought I was using a release version. But actually I was using a version v0.8.0-46-gc8ead552, commit: c8ead55 which is a version in master branch. I think, that's why I ran into the problem.
I've tried the latest master and v0.8.1, and both work.

BTW, the version is v0.8.0-74-g4d7b8537 if building from source, but it's lower than the latest release v0.8.1. Is it expected? From my understanding, the dev version should be higher than the release version.

@lilic
Copy link
Member

lilic commented Jul 1, 2019

@bingosummer building from source of master or a different branch?

@bingosummer
Copy link
Author

master

@bingosummer
Copy link
Author

@lilic
Copy link
Member

lilic commented Jul 1, 2019

@bingosummer weird, I built from master as well and it worked fine for me. Can you provide details on how you built from master to get the above error, thanks!

@bingosummer
Copy link
Author

The initial issue is gone. As I mentioned, I've tried the latest master and v0.8.1, and both work. So it worked fine for me. So I closed the issue.

A new question is about the version https://github.com/operator-framework/operator-sdk/blob/master/version/version.go. The version is lower than the version of the latest release v0.8.1. Just to confirm whether it's expected or not. :)

@lilic
Copy link
Member

lilic commented Jul 1, 2019

The version is lower than the version of the latest release v0.8.1. Just to confirm whether it's expected or not. :)

Yes pretty sure that should have been updated, already pinged @joelanford who was doing the release in case there is a specific reason why it wasn't. Thanks for spotting that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

2 participants