-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
go mod
not working with master
#11850
Comments
Two of our dependencies need
Same issue mentioned here: #10791 (comment) While looking at our dependencies, I found an incorrect vendor entry: {
"path": "plugin",
"revision": ""
} I am opening a PR to remove it. PR: #11853 |
I ran into the same issues, looking at the path I do not see anything with the capital S. |
Well this seems a rabbit hole golang/go#28489 |
looking at docker it seems fixed in master https://github.com/moby/moby/blob/master/pkg/fileutils/fileutils.go |
Not a fun dependencies experience. @jordansissel I have a workaround for you, If you do the following.
You should get a warning but that should work, I need to upgrade the docker vendor of beats and the versioning that docker uses doesn't play well with |
Well, the goods new I was able to migrate the code to the latest version of docker from https://github.com/moby/moby the bad news is.. when looking at our vendor.json I found out that we have actually forked the project to add support to netbsd in http://github.com/exekias/moby/. So I was like simple enough I will just try to apply that patch to the latest code base and I've discovered that they actually dropped solaris support. At the moment we do not actually support solaris or even netbsd. |
What about sending our patch to the upstream repo? |
Since Docker doesn't support netbsd or solaris can we put some build tags in place or stubs to make docker features conditional on the GOOS? We need to address this soon to be able to start using I think we need to move at a minimum to moby/moby@8af4db6#diff-8a5da52ed126447d359e70c05721a8aa (it's about 2 months later than our current docker/docker version). But if we can do it without too much disruption then we can go to an even newer version. We use a weird mix of sources and commits for Docker in vendor.json. Going forward we should not mix and match upstream sources and commits for a single repo ( BTW from a third-part repo that includes beats as a dep this is the error I get that shows the tree of how
|
Has there been any discussion around switching the project to use Go modules? |
Okay great 👍 |
This bumps up the version of all vendored github.com/docker/docker packages to 8af4db6f002ac907b6ef8610b237879dfcaa5b7a. This does impact netbsd, because this version of Docker doesn't compile for netbsd. This is earliest version of Docker that fixes the github.com/Sirupsen/logrus issue causing problems with go.mod in elastic#11850. I was trying to minimize the amount of changes to the Docker libraries to avoid breaking changes.
…es (#13415) * Update github/docker/docker to a consistent version across all packages This bumps up the version of all vendored github.com/docker/docker packages to `github.com/docker/engine@v19.03.2`. This does impact netbsd, because this version of Docker doesn't compile for netbsd. But we will add the appropriate build tags in a follow-up change. github.com/docker/engine is a fork of github.com/moby/moby but with release tags. (source: moby/moby#39302 (comment)) Ran command: govendor fetch github.com/docker/docker/...::github.com/docker/engine@v19.03.2 This fixes the github.com/Sirupsen/logrus issue causing problems with go.mod in #11850. And ensures that all sub-packages are coming from the same repo (another go.mod requirement). * Add integration build tag to Metricbeat docker/image metricset test * Run script/clean_vendor.sh
Resolved in #13415 |
I thought beats was using go modules, but go build does not work. Why vendor dir and no go.module after a master branch clone? $ go version So, I ran go mod init (even though it should've been done out of the box; not users responsibility IMHO) $ go mod init $ go build So I removed the etcd line from the generated go.module to see if go build would sort itself out but I got: $ go build Next, I removed certificate-transparency-go from go.module (again to see if go build could sort it out) $ go build Is it or will it ever be possible to get beats to build with native go tooling? |
Beats is not yet using go modules, thus we do not provide a Regarding your question about building beats with native go tooling, as it was mentioned in the discuss question, it is also in progress. Our goal is to remove all python dependencies when building Beats. But it is not related to this issue. |
I saw #11330 merged and am trying against master, but it still fails with
go mod
:I'm not sure why logrus is still attempted. I've checked beats master and my beater code and neither import logrus.
While fiddling, I tried
go mod init
in beats master:vendor.json, eh?
logrus is still mentioned here. I don't know if this is the problem, though. The go tooling for debugging dependency problems like this seem to be pretty scarce because go fails while trying to build the dependency graph, so things like
go graph
andgo why
don't work for this.The text was updated successfully, but these errors were encountered: