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

Cherry-pick #23763 to 7.x: [Filebeat] Check if processor is supported by ES version #24044

Merged
merged 5 commits into from
Feb 15, 2021

Conversation

P1llus
Copy link
Member

@P1llus P1llus commented Feb 15, 2021

Cherry-pick of PR #23763 to 7.x branch. Original message:

What does this PR do?

A new function to make it easy to set minimum versions for processors. This allows modules to have pipelines that includes newer processors, while having a fallback if the ES version is too old.

Compared to existing functions which checks for specific options inside a processor, this checks for processors as a whole.

This PR is needed to close #22768 .

Why is it important?

Allows Filebeat modules to use newer ingest pipeline processors while not having to worry about backwards compatibility with the processor itself.

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.

* adding possibility to remove processor if its unsupported

* removing unused function while testing

* was initially testing with a separate function, removed that for now

* moving it to its own function

* rewriting SetProcessors logic to be more extendable

* added testcases for uri parts

* stashing changes

* Fix assert.NoError usages

These should have been require.NoError otherwise panics occur.

* Package cleanup

Errors should not begin with capitals.
Avoid double logging errors (both logging and returning them).
Fix usage of deprecated logp functions.
Remove unused code (ML module).
Removed unneeded import alias.
Avoid allocating empty slices.
Add missing error check for config Unpack.

* Add changelog

Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
(cherry picked from commit 9dbfd44)
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Feb 15, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Feb 15, 2021
@botelastic
Copy link

botelastic bot commented Feb 15, 2021

This pull request doesn't have a Team:<team> label.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 15, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: P1llus commented: jenkins run tests please

  • Start Time: 2021-02-15T21:37:56.986+0000

  • Duration: 55 min 57 sec

  • Commit: e657ea9

Test stats 🧪

Test Results
Failed 0
Passed 12996
Skipped 2047
Total 15043

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 12996
Skipped 2047
Total 15043

@P1llus
Copy link
Member Author

P1llus commented Feb 15, 2021

Needed to add the variable declaration, due to the fact that ML in beats is removed in master but not in 7.x, ref: b1e53e4

@P1llus
Copy link
Member Author

P1llus commented Feb 15, 2021

jenkins run tests please

@P1llus P1llus merged commit a3ad851 into elastic:7.x Feb 15, 2021
@zube zube bot removed the [zube]: Done label May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent Label for the Agent team Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants