Skip to content
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

generator: First time make setup runs, it will fail trying to run the update target #7592

Closed
jordansissel opened this issue Jul 13, 2018 · 4 comments
Labels
bug :Generator Related to code generators for building custom Beats or modules. Stalled Team:Integrations Label for the Integrations team

Comments

@jordansissel
Copy link
Contributor

Tested on beats master.

⓿ toast(/mnt/d/projects/go/src/github.com/elastic) master
% python beats/script/generate.py
...
% cd mybeat
% make setup
mkdir -p vendor/github.com/elastic
cp -R /home/jls/projects/go/src/github.com/elastic/beats vendor/github.com/elastic/
rm -rf vendor/github.com/elastic/beats/.git vendor/github.com/elastic/beats/x-pack
mkdir -p vendor/github.com/magefile
cp -R /home/jls/projects/go/src/github.com/elastic/beats/vendor/github.com/magefile/mage vendor/github.com/magefile
make: *** No rule to make target 'update', needed by 'setup'.  Stop.

I believe this is because update target is provided by a file that doesn't exist the first time make setup runs:

ES_BEATS?=./vendor/github.com/elastic/beats
...
# Path to the libbeat Makefile
-include $(ES_BEATS)/libbeat/scripts/Makefile

This Makefile doesn't exist yet because copy-vendor hasn't run.

Maybe we can change the setup target to do this instead which will ensure a new make is run after copy-vendor happens such that the vendor'd beats Makefile is loaded?

-setup: copy-vendor update git-init
+setup: copy-vendor
+  $(MAKE) update git-init
@kvch kvch added bug :Generator Related to code generators for building custom Beats or modules. labels Jul 13, 2018
@ruflin
Copy link
Member

ruflin commented Jul 13, 2018

I like the idea.

I wonder if we should get rid of the setup call completely and instead change the docs.

First run make which will automatically call the first target copy-vendor and then run make update.

Should we really do the git-init automatically for the users or should it be his decision to run it?

@Crocmagnon
Copy link

I'm still not able to make the generated beat following the docs.
What would the workaround be ?

@jsoriano
Copy link
Member

I think this is not an issue anymore after the migration of the generators to mage/go (#13610), @fearful-symmetry wdyt?

@andresrc andresrc added Team:Integrations Label for the Integrations team and removed Team:Beats labels Mar 6, 2020
@botelastic
Copy link

botelastic bot commented Feb 4, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added the Stalled label Feb 4, 2021
@botelastic botelastic bot closed this as completed Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug :Generator Related to code generators for building custom Beats or modules. Stalled Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

7 participants