Possible bug with beats 5.3 and glide?

I am developing a custom beat and was testing the build on a clean directory when I hit a problem with glide. Note that I only have this problem with glide when using version 5.3 of beats. If I use version 5.2 glide does not have any problems.

In my beat's glide.yml file I had included beats like this:

- package: github.com/elastic/beats
  version: ^5.1.4
  subpackages:
  - libbeat/beat
  - libbeat/common
  - libbeat/logp
  - libbeat/publisher

When I did "glide up", glide selected version 5.3 of beats. Then it tried to import github.com/elastic/beats/libbeat/plugin. At that point, it printed the following error:

[DEBUG]	Package github.com/elastic/beats/libbeat/beat imports github.com/elastic/beats/libbeat/plugin
[DEBUG]	Missing github.com/elastic/beats/libbeat/plugin. Trying to resolve.
[DEBUG]	Trying to open github.com/elastic/beats/libbeat/plugin (/Users/rebeccarelyea/.glide/cache/src/https-github.com-elastic-beats/libbeat/plugin)
[DEBUG]	Package github.com/elastic/beats/libbeat/plugin imports github.com/elastic/beats/libbeat/logp
[DEBUG]	Package github.com/elastic/beats/libbeat/plugin imports plugin
[DEBUG]	Missing plugin. Trying to resolve.
[INFO]	--> Fetching plugin.
[WARN]	Unable to checkout plugin
[ERROR]	Error looking for plugin: Cannot detect VCS

When I change my glide.yml file to this, glide is able to update successfully:

- package: github.com/elastic/beats
  version: 5.2
  subpackages:
  - libbeat/beat
  - libbeat/common
  - libbeat/logp
  - libbeat/publisher

Is this possibly because the load.go file in the plugin package also imports the plugin package?

Hi Rebecca,

You're right: the plugin package was released in go1.8, are you using that version?

https://golang.org/doc/go1.8#plugin

Oh - I see! Yes, I'm using Go 1.7.4. That explains it. Thank you!

Should the Dockerfile in 5.3 depend on 1.8 instead of 1.7.4, then?

5.3 is intentionally on 1.7 as we didn't wanted to switch to 1.8 too early. Still we added plugin support for experts that one the one hand know how to compile beats on their own in 1.8. We also didn't change master to 1.8 yet. If you want to test plugins, best ignore our Dockerfiles for the moment :wink:

Good catch Rebecca! That Dockerfile was stale and got removed at 3a86e7f

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.