Open avanier opened 4 years ago
Thanks for reporting! It got removed as I was cleaning stuff up so I'll change the dependency.
Ok, right. I figured it out. I think I can PR for this sometime by lunchtime tomorrow. :crossed_fingers:
Thanks for the comments in the code! :pray:
The timescale publisher is not on the upstream (influxdata/telegraf). If you are not looking to test Timescale, you can remove that part of the code for your local build. Otherwise I'll have to see if I have that on a backup somewhere (or just rewrite it, that might actually be faster 😅)
Yeah, there's something I don't get about @svenklemm 's fork. He also requires influxdb/telegraf
that seems to squash what he provides in postgres/plugins/outputs/postgresql
. I'm just not handy enough with go dependencies to grok it on a Wednesday afternoon it seems. :sweat_smile:
You can see what I got wired up so far here.
I'll give it another go tomorrow. :stuck_out_tongue:
For what it's worth, I've re-forked the Telegraf repo. The build is now passing on my machine, so this might be enough to get the build working on your machine, but I haven't run any test yet to ensure if the application is still OK.
So, I tried building with the fork from Docker from Go versions 1.9 to 1.15 and am consistently unable to either go get
the application or build it by copying the source into the container. I'm trying to ascertain whether Go's package picking is influenced by the availability of certain files on your ${GOPATH}/src
. I always get the same error.
for n in {9..15}; do
podman run --rm -it "registry.hub.docker.com/library/golang:1.${n}-alpine" /bin/sh -c "apk add -U git &> /dev/null && go get -v github.com/aleveille/lagrande && echo 'it works' || echo 'it does not work'"
done
It fails with:
package github.com/aleveille/telegraf/plugins/outputs/postgresql: cannot find package "github.com/aleveille/telegraf/plugins/outputs/postgresql" in any of:
/usr/local/go/src/github.com/aleveille/telegraf/plugins/outputs/postgresql (from $GOROOT)
/go/src/github.com/aleveille/telegraf/plugins/outputs/postgresql (from $GOPATH)
I get the same results when building locally. Likewise if I initialize it with go mod
, it also fails, albeit with a slightly different error message. Different wording, same general idea, but with a slightly more detailed explanation why Go doesn't like it.
go: github.com/aleveille/lagrande imports
github.com/aleveille/lagrande/publisher imports
github.com/aleveille/telegraf/metric: github.com/aleveille/telegraf@v1.15.2: parsing go.mod:
module declares its path as: github.com/influxdata/telegraf
but was required as: github.com/aleveille/telegraf
There's something I'm still missing here...
It seems a dependency is declared to
aleveille/telegraf
inpublisher/timescalePublisher.go
, but that repository is either non-existent or private.