tommyulfsparre / aurora_exporter

Prometheus Aurora exporter
Apache License 2.0
11 stars 10 forks source link

Build broken with latest prometheus/client_golang #16

Open byxorna opened 7 years ago

byxorna commented 7 years ago

A recent change to prometheus/client_golang has broken this build. (https://github.com/prometheus/client_golang/commit/2fee50beaa152342e8347c41edf2202c3bd5f858) Would be nice if your external dependencies were explicitly versioned to ensure new users dont run into compatibility issues as your dependent libraries update.

GOROOT=/Users/gabe/code/go/src/github.com/tommyulfsparre/aurora_exporter/.build/go1.7.1 GOPATH=/Users/gabe/code/go/src/github.com/tommyulfsparre/aurora_exporter/.build/gopath /Users/gabe/code/go/src/github.com/tommyulfsparre/aurora_exporter/.build/go1.7.1/bin/go build  -o aurora_exporter
# _/Users/gabe/code/go/src/github.com/tommyulfsparre/aurora_exporter
./vars.go:503: metric.(prometheus.Counter).Set undefined (type prometheus.Counter has no field or method Set)
make: *** [aurora_exporter] Error 2

The workaround:

[19:13:40] [gabe@dev-96dbecdb] ( 2 ) ~/.gvm/pkgsets/go1.7/global/src/github.com/tommyulfsparre/aurora_exporter master
-> $ cd .build/gopath/src/github.com/prometheus/client_golang/
~/.gvm/pkgsets/go1.7/global/src/github.com/tommyulfsparre/aurora_exporter/.build/gopath/src/github.com/prometheus/client_golang master
-> $ git reset --hard 2fee50beaa152342e8347c41edf2202c3bd5f858^
HEAD is now at 6450fc5 Convert process collector to const metrics
[19:14:14] [gabe@dev-96dbecdb] ( 0 ) ~/.gvm/pkgsets/go1.7/global/src/github.com/tommyulfsparre/aurora_exporter master
-> $ make
GOROOT=/home/gabe/.gvm/pkgsets/go1.7/global/src/github.com/tommyulfsparre/aurora_exporter/.build/go1.7.1 GOPATH=/home/gabe/.gvm/pkgsets/go1.7/global/src/github.com/tommyulfsparre/aurora_exporter/.build/gopath /home/gabe/.gvm/pkgsets/go1.7/global/src/github.com/tommyulfsparre/aurora_exporter/.build/go1.7.1/bin/go build  -o aurora_exporter
tommyulfsparre commented 7 years ago

Hey @byxorna this should be fixed by #14.

And yes, vendoring dependencies is something I have deferred here and will do later.

byxorna commented 7 years ago

@tommyulfsparre hmm, i just tried to build today and hit this issue (including #14). Have you tried a build with latest prometheus/client_golang?

tommyulfsparre commented 7 years ago

@byxorna yes, built with latest https://github.com/prometheus/client_golang/commit/f9f18f54ddbde9a27263903508dc6554a3bd8ccc

StephanErb commented 7 years ago

@tommyulfsparre would you mind creating a release including this change?

tommyulfsparre commented 7 years ago

@StephanErb not at all: v0.3.1