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

Check host fields type before converting to common.MapStr #20791

Merged
merged 1 commit into from
Aug 27, 2020
Merged

Check host fields type before converting to common.MapStr #20791

merged 1 commit into from
Aug 27, 2020

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Aug 26, 2020

What does this PR do?

This PR is to address comment for checking hostFields type before converting to common.MapStr. Directly converting to common.MapStr will panic if the host field is not a common.MapStr.

Why is it important?

Filebeat can handle arbitrary data so it's not guaranteed host field is common.MapStr type and this will cause a panic.

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.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 26, 2020
@kaiyan-sheng kaiyan-sheng self-assigned this Aug 26, 2020
@kaiyan-sheng kaiyan-sheng added needs_backport PR is waiting to be backported to other branches. review Team:Platforms Label for the Integrations - Platforms team labels Aug 26, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 26, 2020
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20791 opened]

  • Start Time: 2020-08-26T03:00:23.123+0000

  • Duration: 69 min 49 sec

Test stats 🧪

Test Results
Failed 0
Passed 19602
Skipped 1830
Total 21432

@kaiyan-sheng kaiyan-sheng merged commit ad7689c into elastic:master Aug 27, 2020
@kaiyan-sheng kaiyan-sheng deleted the host_metadata branch August 27, 2020 14:00
@kaiyan-sheng kaiyan-sheng added v7.10.0 and removed needs_backport PR is waiting to be backported to other branches. labels Aug 27, 2020
kaiyan-sheng added a commit that referenced this pull request Aug 31, 2020
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Platforms Label for the Integrations - Platforms team v7.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants