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 #20791 to 7.x: Check host fields type before converting to common.MapStr #20834

Merged
merged 1 commit into from
Aug 31, 2020
Merged

Cherry-pick #20791 to 7.x: Check host fields type before converting to common.MapStr #20834

merged 1 commit into from
Aug 31, 2020

Conversation

kaiyan-sheng
Copy link
Contributor

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

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

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.

@kaiyan-sheng kaiyan-sheng added [zube]: In Review backport Team:Platforms Label for the Integrations - Platforms team labels Aug 27, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 27, 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 27, 2020
@kaiyan-sheng kaiyan-sheng self-assigned this Aug 27, 2020
@elasticmachine
Copy link
Collaborator

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20834 opened]

  • Start Time: 2020-08-27T18:50:57.203+0000

  • Duration: 76 min 51 sec

Test stats 🧪

Test Results
Failed 2
Passed 19460
Skipped 1851
Total 21313

Test errors

Expand to view the tests failures

  • Name: Build and Test / Libbeat / Libbeat oss / TestOutputReload – pipeline

    • Age: 1
    • Duration: 66.73
    • Error Details: Failed
  • Name: Build and Test / Libbeat / Libbeat oss / TestOutputReload/client – pipeline

    • Age: 1
    • Duration: 38.53
    • Error Details: Failed

Steps errors

Expand to view the steps failures

  • Name: Mage build test
    • Description: mage build test

    • Duration: 22 min 54 sec

    • Start Time: 2020-08-27T19:17:34.348+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-08-27T20:06:03.153Z] + tar -xpf source.tgz
[2020-08-27T20:06:13.533Z] + rm source.tgz
[2020-08-27T20:06:13.559Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats
[2020-08-27T20:06:13.612Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Lint
[2020-08-27T20:06:13.795Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-08-27T20:06:13.990Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Winlogbeat-oss
[2020-08-27T20:06:14.160Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-08-27T20:06:14.337Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-08-27T20:06:14.501Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/dockerlogbeat
[2020-08-27T20:06:14.677Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-08-27T20:06:14.849Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-08-27T20:06:15.018Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Journalbeat
[2020-08-27T20:06:15.198Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-08-27T20:06:15.373Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-08-27T20:06:15.568Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-08-27T20:06:15.776Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-08-27T20:06:15.966Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Packetbeat-Linux
[2020-08-27T20:06:16.172Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-08-27T20:06:16.420Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-08-27T20:06:16.645Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-08-27T20:06:17.007Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-08-27T20:06:17.229Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-08-27T20:06:17.428Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-08-27T20:06:17.685Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Heartbeat-oss
[2020-08-27T20:06:17.902Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-08-27T20:06:18.114Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Heartbeat-Windows
[2020-08-27T20:06:18.338Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-08-27T20:06:18.564Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-08-27T20:06:18.780Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Packetbeat-Mac-OS-X
[2020-08-27T20:06:18.994Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-08-27T20:06:19.203Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-08-27T20:06:19.399Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Libbeat-x-pack
[2020-08-27T20:06:19.617Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-08-27T20:06:19.865Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-08-27T20:06:20.088Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Filebeat-Windows
[2020-08-27T20:06:20.416Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-08-27T20:06:20.654Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Functionbeat-Windows
[2020-08-27T20:06:20.891Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Packetbeat-Windows
[2020-08-27T20:06:21.134Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-08-27T20:06:21.404Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-Windows
[2020-08-27T20:06:21.707Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-08-27T20:06:22.002Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-08-27T20:06:22.251Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Libbeat-oss
[2020-08-27T20:06:22.507Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Filebeat-x-pack
[2020-08-27T20:06:22.826Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Filebeat-oss
[2020-08-27T20:06:23.049Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests
[2020-08-27T20:06:23.282Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-08-27T20:06:23.481Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-OSS-Python-Integration-tests
[2020-08-27T20:06:23.699Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-08-27T20:06:24.320Z] + cat
[2020-08-27T20:06:24.320Z] + /usr/local/bin/runbld ./runbld-script --job-name elastic+beats+pull-request
[2020-08-27T20:06:24.320Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-08-27T20:06:30.922Z] runbld>>> runbld started
[2020-08-27T20:06:30.922Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-08-27T20:06:32.841Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-08-27T20:06:32.841Z] runbld>>> Matches in the system config:
[2020-08-27T20:06:32.841Z] runbld>>> - Matched ^elastic\+beats
[2020-08-27T20:06:32.841Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-08-27T20:06:34.232Z] runbld>>> Debug logging enabled.
[2020-08-27T20:06:34.232Z] runbld>>> Storing result
[2020-08-27T20:06:34.232Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-08-27T20:06:34.232Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200827200633-642BF0B9
[2020-08-27T20:06:34.232Z] runbld>>> Adding system facts.
[2020-08-27T20:06:35.620Z] runbld>>> Adding vcs info for the latest commit:  3ef1baa740a629f17efedaad0d398aaafedead11
[2020-08-27T20:06:35.620Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-08-27T20:06:35.620Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-08-27T20:06:35.620Z] + echo 'Processing JUnit reports with runbld...'
[2020-08-27T20:06:35.620Z] Processing JUnit reports with runbld...
[2020-08-27T20:06:35.881Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-08-27T20:06:35.881Z] runbld>>> DURATION: 30ms
[2020-08-27T20:06:35.881Z] runbld>>> STDOUT: 40 bytes
[2020-08-27T20:06:35.881Z] runbld>>> STDERR: 49 bytes
[2020-08-27T20:06:35.881Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-08-27T20:06:35.881Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-20834
[2020-08-27T20:06:36.824Z] runbld>>> Storing build metadata: 
[2020-08-27T20:06:36.824Z] runbld>>> Adding test report.
[2020-08-27T20:06:36.824Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats
[2020-08-27T20:06:37.396Z] runbld>>> Found 139 test output files
[2020-08-27T20:06:39.951Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-08-27T20:06:39.951Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-08-27T20:06:39.951Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-08-27T20:06:39.951Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-08-27T20:06:39.951Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-08-27T20:06:40.525Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-08-27T20:06:40.525Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20834/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-08-27T20:06:40.790Z] runbld>>> Test output logs contained: Errors: 0 Failures: 2 Tests: 21162 Skipped: 1570
[2020-08-27T20:06:40.790Z] runbld>>> Storing result
[2020-08-27T20:06:40.790Z] runbld>>> FAILURES: 2
[2020-08-27T20:06:41.363Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-08-27T20:06:41.363Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200827200633-642BF0B9
[2020-08-27T20:06:41.624Z] runbld>>> Email notification disabled by environment variable.
[2020-08-27T20:06:41.624Z] runbld>>> Slack notification disabled by environment variable.
[2020-08-27T20:06:47.146Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-20834
[2020-08-27T20:06:47.326Z] [INFO] getVaultSecret: Getting secrets
[2020-08-27T20:06:47.412Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-08-27T20:06:48.603Z] + chmod 755 generate-build-data.sh
[2020-08-27T20:06:48.603Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20834/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20834/runs/1 FAILURE 4551120
[2020-08-27T20:06:48.603Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20834/runs/1/steps/?limit=10000 -o steps-info.json
[2020-08-27T20:06:51.086Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20834/runs/1/tests/?status=FAILED -o tests-errors.json
[2020-08-27T20:06:51.086Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20834/runs/1/log/ -o pipeline-log.txt

@kaiyan-sheng kaiyan-sheng merged commit 9a31ce1 into elastic:7.x Aug 31, 2020
@kaiyan-sheng kaiyan-sheng deleted the backport_20791_7.x branch August 31, 2020 13:30
@zube zube bot removed the [zube]: Done label Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants