Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mage:import doesn't use vendored beats on custom beats #13998

@jsoriano

Description

@jsoriano

Since 7.4.0, custom beats reuse common mage targets from beats, for that they make use of mage:import. This is not using vendored beats in the vendor directory, though other go tools do use it. This causes problems if a different version of beats is in the GOPATH, like this one:

# command-line-arguments
./mage_output_file.go:498:5: undefined: common.AddLicenseHeaders
./mage_output_file.go:518:5: undefined: common.CheckLicenseHeaders
Error: error compiling magefiles

It was reported in the mage repository (magefile/mage#244). Migration of Beats to go modules is proposed there as solution.

We will need to look for another solution in the meantime. Or look for an alternative way of reusing targets.

For confirmed bugs, please report:

  • Version: >= 7.4.0
  • Steps to Reproduce: Create a new beat from a version of beats that makes use of mage:import in magefiles, and checkout a different version in the GOPATH.

// cc: @radoondas

Metadata

Metadata

Labels

:GeneratorRelated to code generators for building custom Beats or modules.Team:IntegrationsLabel for the Integrations teambug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions