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

Move generator packages of Filebeat from scripts/generator to generator #9147

Merged

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Nov 19, 2018

From now on generator functions are located under generator package.
This PR is the reincarnation of #7506 It includes the refactoring requested previously.

@kvch kvch added in progress Pull request is currently in progress. review Filebeat Filebeat blocked :Generator Related to code generators for building custom Beats or modules. labels Nov 19, 2018
@kvch kvch requested a review from ruflin November 19, 2018 12:40
filebeat/generator/module/module.go Show resolved Hide resolved
filebeat/generator/fileset/fileset.go Show resolved Hide resolved
filebeat/generator/fields/fields.go Outdated Show resolved Hide resolved
filebeat/generator/fields/fields.go Outdated Show resolved Hide resolved
filebeat/generator/fields/fields.go Outdated Show resolved Hide resolved
filebeat/generator/fields/fields.go Show resolved Hide resolved
filebeat/generator/fields/fields.go Outdated Show resolved Hide resolved
@ruflin
Copy link
Member

ruflin commented Nov 23, 2018

I assume as soon as #9097 is merged, this Diff becomes much smaller?

@kvch
Copy link
Contributor Author

kvch commented Nov 23, 2018

Yes. And it also needs a rebase.

@kvch kvch removed the review label Nov 23, 2018
@kvch kvch force-pushed the refactoring-move-generator-packages-from-scripts branch from 6d36ba5 to bcaf493 Compare November 27, 2018 14:28
@kvch kvch force-pushed the refactoring-move-generator-packages-from-scripts branch from bcaf493 to 07d7801 Compare November 27, 2018 14:35
@kvch kvch added review and removed blocked in progress Pull request is currently in progress. labels Nov 27, 2018
Copy link
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, add an entry to CHANGELOG-developper.asciidoc

I've built this PR locally and create a few module/fileset, and they are the same as before.

@kvch kvch changed the title Refactoring move generator packages from scripts Move generator packages of Filebeat from scripts Dec 3, 2018
@kvch kvch changed the title Move generator packages of Filebeat from scripts Move generator packages of Filebeat from scripts/generator to generator Dec 3, 2018
@kvch
Copy link
Contributor Author

kvch commented Dec 3, 2018

Previously green. I only added a changelog entry.

@kvch kvch merged commit 571acd2 into elastic:master Dec 3, 2018
kvch added a commit that referenced this pull request Feb 8, 2019
This PR exposes the existing Filebeat module generators as `generate` subcommand.
```
$ ./filebeat generate -h
Generate Filebeat modules, filesets and fields.yml

Usage:
  filebeat generate [command]

Available Commands:
  fields      Generates a new fields.yml file for fileset
  fileset     Generates a new fileset
  module      Generates a new module
```

The subcommands `module`, `fileset` and `fields` use the same code as the scripts.

I added E2E tests to validate the functionality.

Blocked by #9147 as it contains the refactorings of that PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat :Generator Related to code generators for building custom Beats or modules. review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants