-
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
Update metricbeat to use mage for all scenarios along with Makefile shim #17799
Conversation
Pinging @elastic/integrations-platforms (Team:Platforms) |
Pinging @elastic/integrations-services (Team:Services) |
@andrewkroh This is probably of interest to you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvements. Let some comments and questions. Nothing major.
dev-tools/make/mage.mk
Outdated
|
||
.PHONY: unit-tests | ||
unit-tests: mage | ||
mage update unitTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@-mage -clean | ||
endif | ||
@true | ||
# This is a minimal Makefile for Beats that are built with Mage. Its only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
||
# Collects all module configs | ||
.PHONY: configs | ||
configs: python-env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay. 👏
@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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
LGTM.
…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
metricbeat
to usemage
for all scenarios and replaceMakefile
with themage
Makefile
shim.Why is it important?
While working on #17656 I ran into issues with running the integration tests because the current
Makefile
would override the usage ofdocker-compose
instead of using the logic that was already in themage
work.This ensures that the same logic is used for
x-pack/metricbeat
andmetricbeat
.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.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
cd metricbeat && mage update build test