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

Unable to build Lagrande due to missing dependency #3

Open
avanier opened this issue Aug 19, 2020 · 6 comments
Open

Unable to build Lagrande due to missing dependency #3

avanier opened this issue Aug 19, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@avanier
Copy link

avanier commented Aug 19, 2020

It seems a dependency is declared to aleveille/telegraf in publisher/timescalePublisher.go, but that repository is either non-existent or private.

@aleveille
Copy link
Owner

aleveille commented Aug 19, 2020

Thanks for reporting! It got removed as I was cleaning stuff up so I'll change the dependency.

@aleveille aleveille self-assigned this Aug 19, 2020
@aleveille aleveille added the bug Something isn't working label Aug 19, 2020
@avanier
Copy link
Author

avanier commented Aug 19, 2020

Ok, right. I figured it out. I think I can PR for this sometime by lunchtime tomorrow. 🤞

Thanks for the comments in the code! 🙏

@aleveille
Copy link
Owner

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 😅)

@avanier
Copy link
Author

avanier commented Aug 19, 2020

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. 😅

You can see what I got wired up so far here.

I'll give it another go tomorrow. 😛

avanier pushed a commit to avanier/lagrande that referenced this issue Aug 19, 2020
Until aleveille#3 is fixed, this code can't be built.
@aleveille
Copy link
Owner

aleveille commented Aug 19, 2020

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.

@avanier
Copy link
Author

avanier commented Aug 20, 2020

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/[email protected]: 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...

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