Skip to content

Conversation

@adriansr
Copy link
Contributor

@adriansr adriansr commented Nov 2, 2021

What does this PR do?

Fixes the processors configuration option for windows and o365 packages.

Before this change, trying to add custom processors to any of their data streams resulted in the following error:

image

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • [ ] If I'm introducing a new feature, I have modified the Kibana version constraint in my package's manifest.yml file to point to the latest Elastic stack release (e.g. ^7.13.0).
@adriansr adriansr added bug Something isn't working, use only for issues Team:Security-External Integrations labels Nov 2, 2021
@adriansr adriansr requested a review from a team November 2, 2021 18:26
@elasticmachine
Copy link

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

@adriansr adriansr changed the title Fix processors conf Fix processors configuration in windows and o365 packages Nov 2, 2021
Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM, but I did have a question.

ignore_missing: true
ignore_failure: true
map_ecs_fields: true
{{#if processors.length}}
Copy link
Member

Choose a reason for hiding this comment

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

This is using if processors.length while others are using if processors. Any idea why? And could we change this one to be consistent with the others without impacting behavior.

Copy link
Contributor Author

@adriansr adriansr Nov 3, 2021

Choose a reason for hiding this comment

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

I see we have 300 usages of if processors and 10 for processors.length. I have no idea what the difference is but both worked fine in my tests.

For now I think it's better to leave this PR as is, each package using its original condition, and evaluate separately if we need to change all packages to use the better of the two kinds of conditions.

/cc @marc-gr as I think he added all the processors.length conditions.

@elasticmachine
Copy link

💚 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 preview

Expand to view the summary

Build stats

  • Start Time: 2021-11-02T18:26:53.888+0000

  • Duration: 17 min 13 sec

  • Commit: cac0ab0

Test stats 🧪

Test Results
Failed 0
Passed 152
Skipped 0
Total 152

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.
@adriansr adriansr merged commit 1fbc3c0 into elastic:master Nov 4, 2021
@adriansr adriansr deleted the fix_processors_conf branch November 4, 2021 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working, use only for issues

3 participants