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

[Libbeat] Respect the parameters option defined in the ES output. #18326

Merged
merged 3 commits into from
May 7, 2020

Conversation

ph
Copy link
Contributor

@ph ph commented May 6, 2020

This make sure that any values defined in the parameters option of the
ES output is correctly added to every bulk request query string.

Fixes: #18325

What does this PR do?

Why is it important?

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

This make sure that any values defined in the `parameters` option of the
ES output is correctly added to every bulk request query string.

Fixes: elastic#18325
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 6, 2020
@ph ph requested a review from urso May 6, 2020 19:19
@ph ph self-assigned this May 6, 2020
@ph ph added Ingest Management:alpha1 Group issues for ingest management alpha1 Team:Ingest Management labels May 6, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Team:Ingest Management)

@ph ph added [zube]: In Review blocker review and removed needs_team Indicates that the issue/PR needs a Team:* label labels May 6, 2020
@ph ph added the needs_backport PR is waiting to be backported to other branches. label May 6, 2020
@ph
Copy link
Contributor Author

ph commented May 6, 2020

Adding the prefer_v2_parameters and this PR will allow ES to correctly use the right template.

 │ info [o.e.c.m.MetadataCreateIndexService] [winterfell] applying create index request using v2 template [bar]
   │ info [o.e.c.m.MetadataCreateIndexService] [winterfell] [test-ok] creating index, cause [auto(bulk api)], templates [bar], shards [1]/[2], mappings [_doc]

@elasticmachine
Copy link
Collaborator

elasticmachine commented May 6, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 7759
Skipped 1236
Total 8995

@ph
Copy link
Contributor Author

ph commented May 6, 2020

7.8 backport is ready as part of #18318
going to make a 7.x backport after.

@urso urso merged commit 0575e15 into elastic:master May 7, 2020
ruflin pushed a commit to ruflin/beats that referenced this pull request May 7, 2020
@ruflin
Copy link
Member

ruflin commented May 7, 2020

Backport for 7.8: #18318
Backport for 7.x: #18348

@ph ph added v7.8.0 and removed needs_backport PR is waiting to be backported to other branches. labels May 8, 2020
ph added a commit to ph/beats that referenced this pull request May 8, 2020
This PR add additionnal test over the usager of the `parameters` options
in the Elasticsearch output:

- When preconfigured params are set without local params
- When preconfigured params are set with local params
- When no preconfigured params are configured but local are.
- When no preconfigured or local params are set.

The merge is also done close to the actual calls and will not be
executed if anything fails before the bulk request.

The test assertion is now more solid and take into consideration any
errors.

See discussion in elastic#18318 and elastic#18326
ph added a commit that referenced this pull request May 11, 2020
…18326) (#18348)

(cherry picked from commit 0575e15)

Co-authored-by: Pier-Hugues Pellerin <phpellerin@gmail.com>
ph added a commit that referenced this pull request May 12, 2020
…8393)

* [Libbeat] Add more complete tests for opt parameters in ES output

This PR add additionnal test over the usager of the `parameters` options
in the Elasticsearch output:

- When preconfigured params are set without local params
- When preconfigured params are set with local params
- When no preconfigured params are configured but local are.
- When no preconfigured or local params are set.

The merge is also done close to the actual calls and will not be
executed if anything fails before the bulk request.

The test assertion is now more solid and take into consideration any
errors.

See discussion in #18318 and #18326
ph added a commit to ph/beats that referenced this pull request May 13, 2020
…astic#18393)

* [Libbeat] Add more complete tests for opt parameters in ES output

This PR add additionnal test over the usager of the `parameters` options
in the Elasticsearch output:

- When preconfigured params are set without local params
- When preconfigured params are set with local params
- When no preconfigured params are configured but local are.
- When no preconfigured or local params are set.

The merge is also done close to the actual calls and will not be
executed if anything fails before the bulk request.

The test assertion is now more solid and take into consideration any
errors.

See discussion in elastic#18318 and elastic#18326

(cherry picked from commit 9c8bbaa)
ph added a commit to ph/beats that referenced this pull request May 13, 2020
…astic#18393)

* [Libbeat] Add more complete tests for opt parameters in ES output

This PR add additionnal test over the usager of the `parameters` options
in the Elasticsearch output:

- When preconfigured params are set without local params
- When preconfigured params are set with local params
- When no preconfigured params are configured but local are.
- When no preconfigured or local params are set.

The merge is also done close to the actual calls and will not be
executed if anything fails before the bulk request.

The test assertion is now more solid and take into consideration any
errors.

See discussion in elastic#18318 and elastic#18326

(cherry picked from commit 9c8bbaa)
ph added a commit to ph/beats that referenced this pull request May 13, 2020
…astic#18393)

* [Libbeat] Add more complete tests for opt parameters in ES output

This PR add additionnal test over the usager of the `parameters` options
in the Elasticsearch output:

- When preconfigured params are set without local params
- When preconfigured params are set with local params
- When no preconfigured params are configured but local are.
- When no preconfigured or local params are set.

The merge is also done close to the actual calls and will not be
executed if anything fails before the bulk request.

The test assertion is now more solid and take into consideration any
errors.

See discussion in elastic#18318 and elastic#18326

(cherry picked from commit 9c8bbaa)
ph added a commit to ph/beats that referenced this pull request May 13, 2020
…astic#18393)

* [Libbeat] Add more complete tests for opt parameters in ES output

This PR add additionnal test over the usager of the `parameters` options
in the Elasticsearch output:

- When preconfigured params are set without local params
- When preconfigured params are set with local params
- When no preconfigured params are configured but local are.
- When no preconfigured or local params are set.

The merge is also done close to the actual calls and will not be
executed if anything fails before the bulk request.

The test assertion is now more solid and take into consideration any
errors.

See discussion in elastic#18318 and elastic#18326

(cherry picked from commit 9c8bbaa)
ph added a commit that referenced this pull request May 14, 2020
…8393) (#18491)

* [Libbeat] Add more complete tests for opt parameters in ES output

This PR add additionnal test over the usager of the `parameters` options
in the Elasticsearch output:

- When preconfigured params are set without local params
- When preconfigured params are set with local params
- When no preconfigured params are configured but local are.
- When no preconfigured or local params are set.

The merge is also done close to the actual calls and will not be
executed if anything fails before the bulk request.

The test assertion is now more solid and take into consideration any
errors.

See discussion in #18318 and #18326

(cherry picked from commit 9c8bbaa)
ph added a commit that referenced this pull request May 19, 2020
…8393) (#18492)

* [Libbeat] Add more complete tests for opt parameters in ES output

This PR add additionnal test over the usager of the `parameters` options
in the Elasticsearch output:

- When preconfigured params are set without local params
- When preconfigured params are set with local params
- When no preconfigured params are configured but local are.
- When no preconfigured or local params are set.

The merge is also done close to the actual calls and will not be
executed if anything fails before the bulk request.

The test assertion is now more solid and take into consideration any
errors.

See discussion in #18318 and #18326

(cherry picked from commit 9c8bbaa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Libbeat] The Elasticsearch output doesn't use parameters
4 participants