Update metricbeat to use mage for all scenarios along with Makefile shim#17799
Update metricbeat to use mage for all scenarios along with Makefile shim#17799blakerouse merged 15 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/integrations-platforms (Team:Platforms) |
|
Pinging @elastic/integrations-services (Team:Services) |
|
@andrewkroh This is probably of interest to you. |
jsoriano
left a comment
There was a problem hiding this comment.
I love this change, I have added some comments by now, I will try it also locally before approving.
Let's wait to have some greener builds too. Some failures in CI are fixed in master.
b575258 to
f4f04df
Compare
|
@jsoriano I added the I rebased with master, so hopefully it will go all green. |
|
run beats-ci/package |
|
run beats-ci/package |
8c9a979 to
41cc42a
Compare
|
@jsoriano Been trying since yesterday to get all green, no matter what there always seems to be something random. At least this time Travis passed completely. The filebeat tests are un-related to any changes here. |
|
run beats-ci/package |
|
CI looks good, yes, I don't think the failures in OSX are related to this change. |
jsoriano
left a comment
There was a problem hiding this comment.
It LGTM, but I would like to see a second opinion. @andrewkroh could you take a quick look in case we are missing something? 😇
41cc42a to
8c83203
Compare
andrewkroh
left a comment
There was a problem hiding this comment.
Nice improvements. Let some comments and questions. Nothing major.
dev-tools/make/mage.mk
Outdated
There was a problem hiding this comment.
Since this is a new target, I don't think update should be required. The unitTest targets should have the appropriate dependencies wired up already. In most cases I think they do now, like requiring the Fields before running the python tests.
There was a problem hiding this comment.
The diff is wierd, because this is actually just xpack.mk that was renamed to mage.mk because now its not only x-pack projects that use the file.
I will remove it but it does affect, all x-pack projects. Hopefully those do the correct thing.
dev-tools/make/mage.mk
Outdated
There was a problem hiding this comment.
Why are you adding new targets to the file as opposed to directly invoking mage from Travis without any shim? Is it because the Travis file isn't setup to do that?
There was a problem hiding this comment.
The goes with my comment above. This is really just xpack.mk renamed to mage.mk. These targets are the same targets shared with the other x-pack beats. The travis file does use these a lot.
If we want to remove the use of a Makefile shim completely, then I think we should move that to a different PR. This is currently trying to make metricbeat just like x-pack/metricbeat.
There was a problem hiding this comment.
The reason I asked was that unit-tests and system-tests were not in the former xpack.mk. But I see that this file is now being used to shim targets used from metricbeat/Makefile. So no problem. We'll be able to remove this shim makefile soon.
metricbeat/Makefile
Outdated
|
@andrewkroh Ready for another look. |
|
This is an issue in the generator tests w.r.t. the It might be something I broke. |
|
@andrewkroh I fixed the generator test, the other failures are unrelated to my change. |
… less time and not run over the timeline.
19d7ba8 to
8ec4512
Compare
…him (elastic#17799) * Update metricbeat to use mage and the mage make targets. * Run update and fmt. * Remove assets.go as its no longer used. * Split apart the metricbeat tests in travis into multiple jobs to take less time and not run over the timeline. * Add back in create-metricset with mage. * Re-add test_xpack_base.py. * Add kafka to requirements.txt. * Fix kafka to work with python 3.7. * Remove the extra kafka-python from rebase on master. * Fix issues from code review. * Add back in comment from merge. * Fix comment spacing. * Fix update target in generate metricbeat. * Update magefile in metricbeat generator. * Run fmt and update. (cherry picked from commit 8786d05)
…arios along with Makefile shim (#17951) * Update metricbeat to use mage for all scenarios along with Makefile shim (#17799) * Update metricbeat to use mage and the mage make targets. * Run update and fmt. * Remove assets.go as its no longer used. * Split apart the metricbeat tests in travis into multiple jobs to take less time and not run over the timeline. * Add back in create-metricset with mage. * Re-add test_xpack_base.py. * Add kafka to requirements.txt. * Fix kafka to work with python 3.7. * Remove the extra kafka-python from rebase on master. * Fix issues from code review. * Add back in comment from merge. * Fix comment spacing. * Fix update target in generate metricbeat. * Update magefile in metricbeat generator. * Run fmt and update. (cherry picked from commit 8786d05) * Fix merge issue. * Run fmt and update.
What does this PR do?
Update's
metricbeatto usemagefor all scenarios and replaceMakefilewith themageMakefileshim.Why is it important?
While working on #17656 I ran into issues with running the integration tests because the current
Makefilewould override the usage ofdocker-composeinstead of using the logic that was already in themagework.This ensures that the same logic is used for
x-pack/metricbeatandmetricbeat.Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksI have added an entry inCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
cd metricbeat && mage update build test