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 #19405 to 7.x: Add more helpers to pipeline/testing package #19711

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

urso
Copy link

@urso urso commented Jul 7, 2020

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

  • Enhancement

What does this PR do?

The pipeline/testing package provides some helpers for mocking/faking a
beat.Pipeline or beat.Client. This change adds some more helpers that
can be reused throughout beats.

Why is it important?

I introduced these helpers in the Filebeat v2 input refactoring, to share some common helpers based on the existing ones.

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.

Related issues

@urso urso added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Jul 7, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

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

botelastic bot commented Jul 7, 2020

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

@urso urso added the blocked label Jul 7, 2020
@urso
Copy link
Author

urso commented Jul 7, 2020

Requires: #19708

Needs a rebase, but required tests already did succeed.

@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.'}

Pipeline View Test View Changes Artifacts

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19711 updated]

  • Start Time: 2020-07-07T23:44:05.691+0000

  • Duration: 124 min 19 sec

Test stats 🧪

Test Results
Failed 1
Passed 9059
Skipped 1565
Total 10625

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: 0.721
    • 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: 6 min 4 sec

    • Start Time: 2020-07-08T00:07:06.426+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 0 min 11 sec

    • Start Time: 2020-07-08T00:15:13.444+0000

    • log

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 9 min 0 sec

    • Start Time: 2020-07-08T00:09:35.337+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-07-08T01:47:17.443Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-08T01:47:17.443Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-07-08T01:47:18.688Z] Failed in branch Filebeat x-pack
[2020-07-08T01:47:57.788Z] Body did not finish within grace period; terminating with extreme prejudice
[2020-07-08T01:47:57.992Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats
[2020-07-08T01:47:58.316Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-08T01:47:58.332Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Lint
[2020-07-08T01:47:58.427Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-07-08T01:47:58.506Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Winlogbeat-oss
[2020-07-08T01:47:58.585Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-07-08T01:47:58.662Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-07-08T01:47:58.742Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-07-08T01:47:58.822Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Dockerlogbeat
[2020-07-08T01:47:58.900Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-07-08T01:47:58.978Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-07-08T01:47:59.055Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-07-08T01:47:59.133Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Journalbeat-oss
[2020-07-08T01:47:59.213Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-07-08T01:47:59.292Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-07-08T01:47:59.375Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-07-08T01:47:59.454Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-07-08T01:47:59.535Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-07-08T01:47:59.614Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-07-08T01:47:59.694Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-07-08T01:47:59.775Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-07-08T01:47:59.854Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Heartbeat-oss
[2020-07-08T01:47:59.934Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-07-08T01:48:00.012Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-07-08T01:48:00.092Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-07-08T01:48:00.170Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-07-08T01:48:00.251Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Libbeat-x-pack
[2020-07-08T01:48:00.330Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-07-08T01:48:00.411Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Filebeat-Windows
[2020-07-08T01:48:00.490Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-07-08T01:48:00.570Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-07-08T01:48:00.649Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Packetbeat-oss
[2020-07-08T01:48:00.728Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-07-08T01:48:00.807Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-07-08T01:48:00.886Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-Windows
[2020-07-08T01:48:00.966Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-07-08T01:48:01.043Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Functionbeat-Windows
[2020-07-08T01:48:01.122Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Heartbeat-Windows
[2020-07-08T01:48:01.202Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-07-08T01:48:01.284Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-07-08T01:48:01.361Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Libbeat-oss
[2020-07-08T01:48:01.439Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-07-08T01:48:01.516Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-07-08T01:48:01.668Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-07-08T01:48:01.746Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-07-08T01:48:01.835Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-07-08T01:48:01.916Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Filebeat-oss
[2020-07-08T01:48:01.996Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Filebeat-x-pack
[2020-07-08T01:48:02.358Z] + cat
[2020-07-08T01:48:02.358Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-08T01:48:02.358Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-08T01:48:09.032Z] runbld>>> runbld started
[2020-07-08T01:48:09.032Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-08T01:48:10.428Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19711' in order of occurrence in the config (last value wins).
[2020-07-08T01:48:11.828Z] runbld>>> Debug logging enabled.
[2020-07-08T01:48:11.828Z] runbld>>> Storing result
[2020-07-08T01:48:11.828Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-08T01:48:11.828Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200708014811-5C17FC98
[2020-07-08T01:48:11.828Z] runbld>>> Adding system facts.
[2020-07-08T01:48:12.781Z] runbld>>> Adding vcs info for the latest commit:  3d51280ff83c9b559b591a3c73c59330d6da0feb
[2020-07-08T01:48:12.781Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-08T01:48:12.781Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-08T01:48:13.043Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-08T01:48:13.043Z] Processing JUnit reports with runbld...
[2020-07-08T01:48:13.306Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-08T01:48:13.306Z] runbld>>> DURATION: 20ms
[2020-07-08T01:48:13.306Z] runbld>>> STDOUT: 40 bytes
[2020-07-08T01:48:13.306Z] runbld>>> STDERR: 49 bytes
[2020-07-08T01:48:13.306Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-08T01:48:13.306Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats
[2020-07-08T01:48:14.693Z] runbld>>> Storing build metadata: 
[2020-07-08T01:48:14.693Z] runbld>>> Adding test report.
[2020-07-08T01:48:14.693Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats
[2020-07-08T01:48:15.269Z] runbld>>> Found 112 test output files
[2020-07-08T01:48:15.531Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-07-08T01:48:15.531Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-07-08T01:48:15.531Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-07-08T01:48:15.531Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-07-08T01:48:15.799Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-07-08T01:48:17.194Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-07-08T01:48:17.194Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-07-08T01:48:17.455Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 10475 Skipped: 1328
[2020-07-08T01:48:17.716Z] runbld>>> Storing result
[2020-07-08T01:48:17.716Z] runbld>>> FAILURES: 1
[2020-07-08T01:48:17.977Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-08T01:48:17.977Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200708014811-5C17FC98
[2020-07-08T01:48:18.239Z] runbld>>> Email notification disabled by environment variable.
[2020-07-08T01:48:18.239Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-08T01:48:23.773Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19711
[2020-07-08T01:48:23.878Z] [INFO] getVaultSecret: Getting secrets
[2020-07-08T01:48:23.941Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-08T01:48:24.688Z] + chmod 755 generate-build-data.sh
[2020-07-08T01:48:24.688Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19711/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19711/runs/2 ABORTED 7458735
[2020-07-08T01:48:24.688Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19711/runs/2/steps/?limit=10000 -o steps-info.json
[2020-07-08T01:48:28.811Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19711/runs/2/tests/?status=FAILED -o tests-errors.json
[2020-07-08T01:48:29.722Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19711/runs/2/log/ -o pipeline-log.txt

@urso urso merged commit 9c79938 into elastic:7.x Jul 8, 2020
@urso urso deleted the backport_19405_7.x branch July 8, 2020 10:31
@zube zube bot removed the [zube]: Done label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants