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

Docker container build fails on 'undefined: pometheus.Handler' in redoctober.go line 27 #202

Open
jtmorrisbytes opened this issue Aug 21, 2021 · 1 comment

Comments

@jtmorrisbytes
Copy link

jtmorrisbytes commented Aug 21, 2021

(trying to reference the current commit)
99c99a8

It looks like prometheus has changed its dependency tree, and when I download the repo from this commit and run 'make' it fails with the above error.

updating prometheus:

- import "github.com/prometheus/client_golang/prometheus"
+  import "github.com/prometheus/client_golang/prometheus/promhttp"

and changing line 27

- Handler: prometheus.Handler()
+ Handler: promhttp.Hanlder()

fixes the error, but then introduces new dependency issues.
The build then fails on go version 1.7 due to the missing math/bits standard library.
Updating to go 1.9 fixes the math/bits dependency but is missing bits.Add64 and bits.Mul64
Updating to go 1.12 fixes the dependency issues without breaking dep

Conclusion: updating to go 1.12 and the above patches allows the container to build and run
Should I submit a pull request with the above changes?

@nickysemenza
Copy link
Member

ah so looking at the linked commit we're running tests on 1.12, but the dockerfile (which make runs) has a much older version?

bumping prometheus, and go to 1.12 sounds great, but also if migrating from dep to modules is easy go 1.17 is great too! (assuming there's not more breaking changes to stdlib)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants