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

Issue with prometheus client @v0.9.1 when running test #21

Closed
lvrach opened this issue Feb 24, 2019 · 2 comments
Closed

Issue with prometheus client @v0.9.1 when running test #21

lvrach opened this issue Feb 24, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@lvrach
Copy link

lvrach commented Feb 24, 2019

Issue

I get the following error when running the tests of a specific package:

go test ./async   
# github.com/prometheus/client_golang/prometheus
../../go/pkg/mod/github.com/prometheus/client_golang@v0.9.1/prometheus/collector.go:62:17: undefined: Metric
../../go/pkg/mod/github.com/prometheus/client_golang@v0.9.1/prometheus/collector.go:102:7: undefined: Metric
FAIL    github.com/thebeatapp/patron/async [build failed]

However when I run:
go test ./... It succeeds, but first updates my go.mod file :

github.com/prometheus/client_golang v0.9.1 h1:K47Rk0v/fkEfwfQet2KWhscE0cJzjgCCDBG2KHZoVno=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
+github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=

It a bit wired behavior, If I had to guess is something related with this one:
prometheus/client_golang#501

After adding the v0.9.2, everything works fine

Solution

I would suggest upgrading the client_golang to v0.9.2

@lvrach lvrach added the bug Something isn't working label Feb 24, 2019
@mantzas
Copy link

mantzas commented Feb 25, 2019

I have ran the same tests on master but could not confirm the problem.
It seems rather unusual that from 0.9.1 to 0.9.2 something like the Metric was undefined.
@lvrach pls provide the exact way to reproduce the problem.
@cosmix @k0st1s could you pls confirm the problem too?

@mantzas
Copy link

mantzas commented Mar 13, 2019

this is not reproducable

@mantzas mantzas closed this as completed Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants