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

[Filebeat] [tests] Keep host.name in forwarded events #19604

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

adriansr
Copy link
Contributor

@adriansr adriansr commented Jul 2, 2020

What does this PR do?

Updates Filebeat's test_modules.py integration test to not strip the host.name field in events tagged as forwarded.

Why is it important?

So the -expected.json golden files keep the host.name field and errors in modules that populate this field can be detected.

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.

Relates #13920

Update Filebeat's test_modules.py integration test to not strip the
`host.name` field in events marked as forwarded.

Relates elastic#13920
@adriansr adriansr added review Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. :Testing labels Jul 2, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 2, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

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

elasticmachine commented Jul 2, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [andrewkroh commented: run tests]

  • Start Time: 2020-07-06T13:00:02.530+0000

  • Duration: 59 min 15 sec

Test stats 🧪

Test Results
Failed 1
Passed 4217
Skipped 677
Total 4895

Test errors

Expand to view the tests failures

  • Name: Build and Test / Filebeat Mac OS X / test_clean_removed_with_clean_inactive – test_registrar.Test
    • Age: 1
    • Duration: 1.474
    • Error Details:
      -------------------- >> begin captured stdout << ---------------------
      registry size: 2
      registry size after remove: 2

--------------------- >> end captured stdout << ----------------------

Steps errors

Expand to view the steps failures

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 11 min 54 sec

    • Start Time: 2020-07-06T13:24:30.833+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 0 min 12 sec

    • Start Time: 2020-07-06T13:37:13.029+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-07-06T13:58:43.734Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-07-06T13:58:43.734Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-07-06T13:58:43.734Z] 	at java.lang.Thread.run(Thread.java:748)
[2020-07-06T13:58:43.734Z] No artifacts found that match the file pattern "**/build/TEST*.out". Configuration error?
[2020-07-06T13:58:44.099Z] + curl -sSLo codecov https://codecov.io/bash
[2020-07-06T13:58:44.360Z] + FILE=auditbeat/build/coverage/full.cov
[2020-07-06T13:58:44.360Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-07-06T13:58:44.360Z] + FILE=filebeat/build/coverage/full.cov
[2020-07-06T13:58:44.360Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-07-06T13:58:44.360Z] + bash codecov -f filebeat/build/coverage/full.cov
[2020-07-06T13:58:44.360Z] 
[2020-07-06T13:58:44.360Z]   _____          _
[2020-07-06T13:58:44.360Z]  / ____|        | |
[2020-07-06T13:58:44.360Z] | |     ___   __| | ___  ___ _____   __
[2020-07-06T13:58:44.360Z] | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
[2020-07-06T13:58:44.360Z] | |___| (_) | (_| |  __/ (_| (_) \ V /
[2020-07-06T13:58:44.360Z]  \_____\___/ \__,_|\___|\___\___/ \_/
[2020-07-06T13:58:44.360Z]                               Bash-20200629-ffaf297
[2020-07-06T13:58:44.360Z] 
[2020-07-06T13:58:44.360Z] 
[2020-07-06T13:58:44.360Z] ==> Jenkins CI detected.
[2020-07-06T13:58:44.361Z]     project root: .
[2020-07-06T13:58:44.361Z]     Fixing merge commit SHA
[2020-07-06T13:58:44.361Z]     Yaml found at: codecov.yml
[2020-07-06T13:58:44.361Z]     -> Found 1 reports
[2020-07-06T13:58:44.361Z] ==> Detecting git/mercurial file structure
[2020-07-06T13:58:44.623Z] ==> Reading reports
[2020-07-06T13:58:44.623Z]     + filebeat/build/coverage/full.cov bytes=284417
[2020-07-06T13:58:44.623Z] ==> Appending adjustments
[2020-07-06T13:58:44.623Z]     https://docs.codecov.io/docs/fixing-reports
[2020-07-06T13:58:54.706Z]     + Found adjustments
[2020-07-06T13:58:54.706Z] ==> Gzipping contents
[2020-07-06T13:58:54.706Z] ==> Uploading reports
[2020-07-06T13:58:54.707Z]     url: https://codecov.io
[2020-07-06T13:58:54.707Z]     query: branch=PR-19604&commit=bb920aed40ec9fde61a8e4116397be14625925c4&build=3&build_url=https%3A%2F%2Fbeats-ci.elastic.co%2Fjob%2FBeats%2Fjob%2Fbeats-beats-mbp%2Fjob%2FPR-19604%2F3%2F&name=&tag=&slug=elastic%2Fbeats&service=jenkins&flags=&pr=19604&job=
[2020-07-06T13:58:54.707Z] ->  Pinging Codecov
[2020-07-06T13:58:54.707Z] https://codecov.io/upload/v4?package=bash-20200629-ffaf297&token=secret&branch=PR-19604&commit=bb920aed40ec9fde61a8e4116397be14625925c4&build=3&build_url=https%3A%2F%2Fbeats-ci.elastic.co%2Fjob%2FBeats%2Fjob%2Fbeats-beats-mbp%2Fjob%2FPR-19604%2F3%2F&name=&tag=&slug=elastic%2Fbeats&service=jenkins&flags=&pr=19604&job=
[2020-07-06T13:58:54.707Z] HTTP 400
[2020-07-06T13:58:54.707Z] Please provide the repository token to upload reports via `-t :repository-token`
[2020-07-06T13:58:54.707Z] + FILE=heartbeat/build/coverage/full.cov
[2020-07-06T13:58:54.707Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-07-06T13:58:54.707Z] + FILE=libbeat/build/coverage/full.cov
[2020-07-06T13:58:54.707Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-07-06T13:58:54.707Z] + FILE=metricbeat/build/coverage/full.cov
[2020-07-06T13:58:54.707Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-07-06T13:58:54.707Z] + FILE=packetbeat/build/coverage/full.cov
[2020-07-06T13:58:54.707Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-07-06T13:58:54.707Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-07-06T13:58:54.707Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-07-06T13:58:54.707Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-06T13:58:54.707Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-07-06T13:58:55.982Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats
[2020-07-06T13:58:56.294Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-06T13:58:56.307Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats/Lint
[2020-07-06T13:58:56.418Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-07-06T13:58:56.499Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-07-06T13:58:56.601Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-07-06T13:58:56.698Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats/Filebeat-Windows
[2020-07-06T13:58:56.798Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats/Filebeat-x-pack
[2020-07-06T13:58:56.915Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats/Filebeat-oss
[2020-07-06T13:58:57.289Z] + cat
[2020-07-06T13:58:57.290Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-06T13:58:57.290Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-06T13:59:03.862Z] runbld>>> runbld started
[2020-07-06T13:59:03.862Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-06T13:59:05.242Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19604' in order of occurrence in the config (last value wins).
[2020-07-06T13:59:06.179Z] runbld>>> Debug logging enabled.
[2020-07-06T13:59:06.179Z] runbld>>> Storing result
[2020-07-06T13:59:06.439Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-06T13:59:06.439Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200706135906-14FDB842
[2020-07-06T13:59:06.439Z] runbld>>> Adding system facts.
[2020-07-06T13:59:07.377Z] runbld>>> Adding vcs info for the latest commit:  95484dc5e1502ab19b4b0db01588478bfae48b2d
[2020-07-06T13:59:07.377Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-06T13:59:07.377Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-06T13:59:07.377Z] Processing JUnit reports with runbld...
[2020-07-06T13:59:07.377Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-06T13:59:07.945Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-06T13:59:07.945Z] runbld>>> DURATION: 18ms
[2020-07-06T13:59:07.945Z] runbld>>> STDOUT: 40 bytes
[2020-07-06T13:59:07.945Z] runbld>>> STDERR: 49 bytes
[2020-07-06T13:59:07.945Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-06T13:59:07.945Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats
[2020-07-06T13:59:08.884Z] runbld>>> Storing build metadata: 
[2020-07-06T13:59:08.884Z] runbld>>> Adding test report.
[2020-07-06T13:59:08.884Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604/src/github.com/elastic/beats
[2020-07-06T13:59:09.822Z] runbld>>> Found 13 test output files
[2020-07-06T13:59:10.779Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 4895 Skipped: 653
[2020-07-06T13:59:10.779Z] runbld>>> Storing result
[2020-07-06T13:59:10.779Z] runbld>>> FAILURES: 1
[2020-07-06T13:59:11.348Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-06T13:59:11.348Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200706135906-14FDB842
[2020-07-06T13:59:11.348Z] runbld>>> Email notification disabled by environment variable.
[2020-07-06T13:59:11.348Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-06T13:59:16.919Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19604
[2020-07-06T13:59:17.028Z] [INFO] getVaultSecret: Getting secrets
[2020-07-06T13:59:17.095Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-06T13:59:17.956Z] + chmod 755 generate-build-data.sh
[2020-07-06T13:59:17.956Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19604/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19604/runs/3 FAILURE 3555166
[2020-07-06T13:59:17.956Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19604/runs/3/steps/?limit=10000 -o steps-info.json
[2020-07-06T13:59:18.867Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19604/runs/3/tests/?status=FAILED -o tests-errors.json

@andrewkroh
Copy link
Member

run tests

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. Thanks for adding this.

@adriansr adriansr merged commit 156c87b into elastic:master Jul 6, 2020
adriansr added a commit to adriansr/beats that referenced this pull request Jul 6, 2020
Update Filebeat's test_modules.py integration test to not strip the
`host.name` field in events marked as forwarded.

Relates elastic#13920

(cherry picked from commit 156c87b)
@adriansr adriansr added v7.9.0 and removed needs_backport PR is waiting to be backported to other branches. labels Jul 6, 2020
adriansr added a commit that referenced this pull request Jul 14, 2020
Update Filebeat's test_modules.py integration test to not strip the
`host.name` field in events marked as forwarded.

Relates #13920

(cherry picked from commit 156c87b)
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
Update Filebeat's test_modules.py integration test to not strip the
`host.name` field in events marked as forwarded.

Relates elastic#13920
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.

3 participants