Replace glide vendoring with govendor #3843
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Glide is currently broken in the beats repo and adding dependencies is painful. I initially tried out
dep
(https://github.com/golang/dep) but it is not working with our nested vendor directories as it always tries to do auto discovery. It is not possible to add a single package at the moment. I would like to stick with local vendor directories as it allows to build modules outside of metricbeat for example and add a module by just copy/pasting the directory.govendor allows to exactly do that but also allows to use autodiscovery if needed. One nice part about govendor is that it also strips testing files etc. from the repo and allows only import a package and not necessarily the full repository.
In a first step I'm using govendor for the mysql metricbeat module. In a second step, all dependencies have to be added with govendor.
The following command is used to add a dependency:
Further changes:
vendor.json
file was already in the top vendor directory. It seems it was commited in the past by accident. The file is removed.