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

Always return a non nil instrumentation object #19355

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

jalvz
Copy link
Contributor

@jalvz jalvz commented Jun 24, 2020

What does this PR do?

Fixes a bug when instrumentation is explicitly disabled (not commented out).

Why is it important?

Because otherwise it panics.

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.

How to test this PR locally

Run any beat with -E instrumentation.enabled=false

Related issues

Fixes up #18360

@jalvz jalvz added bug Team:Integrations Label for the Integrations team Team:apm APM Server team issues/PRs labels Jun 24, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jun 24, 2020
@jalvz jalvz requested a review from urso June 24, 2020 09:14
@elasticmachine
Copy link
Collaborator

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19355 opened]

  • Start Time: 2020-06-24T09:14:25.061+0000

  • Duration: 74 min 5 sec

Test stats 🧪

Test Results
Failed 2
Passed 9456
Skipped 1570
Total 11028

Test errors

Expand to view the tests failures

  • Name: Build and Test / Metricbeat x-pack / Metricbeat x-pack / TestData – performance

    • Age: 1
    • Duration: 209.19
    • Error Details: Failed
  • Name: Build and Test / Metricbeat x-pack / Metricbeat x-pack / TestData – tablespace

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

Steps errors

Expand to view the steps failures

  • Name: Install Go 1.13.10

    • Description: .ci/scripts/install-go.sh

    • Duration: 1 min 58 sec

    • Start Time: 2020-06-24T09:36:35.652+0000

    • log

  • Name: Mage build test

    • Description: mage build test

    • Duration: 28 min 21 sec

    • Start Time: 2020-06-24T09:41:15.824+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-06-24T10:25:58.608Z]   GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
[2020-06-24T10:25:58.608Z]  docker-init:
[2020-06-24T10:25:58.608Z]   Version:          0.18.0
[2020-06-24T10:25:58.608Z]   GitCommit:        fec3683
[2020-06-24T10:27:58.793Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats
[2020-06-24T10:27:59.125Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-06-24T10:27:59.148Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Lint
[2020-06-24T10:27:59.298Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-06-24T10:27:59.452Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Winlogbeat-oss
[2020-06-24T10:27:59.600Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-06-24T10:27:59.749Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-06-24T10:27:59.900Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Dockerlogbeat
[2020-06-24T10:28:00.048Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-06-24T10:28:00.197Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Journalbeat-oss
[2020-06-24T10:28:00.351Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-06-24T10:28:00.505Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-06-24T10:28:00.653Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-06-24T10:28:00.804Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-06-24T10:28:00.957Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-06-24T10:28:01.111Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-06-24T10:28:01.265Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-06-24T10:28:01.417Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-06-24T10:28:01.564Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-06-24T10:28:01.710Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Heartbeat-oss
[2020-06-24T10:28:01.860Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-06-24T10:28:02.006Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-06-24T10:28:02.159Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-06-24T10:28:02.311Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Libbeat-x-pack
[2020-06-24T10:28:02.561Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-06-24T10:28:02.708Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-06-24T10:28:02.869Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-06-24T10:28:03.019Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-06-24T10:28:03.165Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-06-24T10:28:03.313Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-06-24T10:28:03.467Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Packetbeat-oss
[2020-06-24T10:28:03.617Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Filebeat-Windows
[2020-06-24T10:28:03.767Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-Windows
[2020-06-24T10:28:03.915Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Filebeat-x-pack
[2020-06-24T10:28:04.062Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-06-24T10:28:04.208Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-06-24T10:28:04.356Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-06-24T10:28:04.506Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Filebeat-oss
[2020-06-24T10:28:04.656Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-06-24T10:28:04.800Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Heartbeat-Windows
[2020-06-24T10:28:04.948Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-06-24T10:28:05.093Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-06-24T10:28:05.241Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Functionbeat-Windows
[2020-06-24T10:28:05.387Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Libbeat-oss
[2020-06-24T10:28:05.534Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-06-24T10:28:05.686Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-06-24T10:28:05.838Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-06-24T10:28:05.992Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-06-24T10:28:06.422Z] + cat
[2020-06-24T10:28:06.422Z] + /usr/local/bin/runbld ./runbld-script
[2020-06-24T10:28:06.422Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-06-24T10:28:13.006Z] runbld>>> runbld started
[2020-06-24T10:28:13.006Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-06-24T10:28:14.390Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19355' in order of occurrence in the config (last value wins).
[2020-06-24T10:28:15.775Z] runbld>>> Debug logging enabled.
[2020-06-24T10:28:15.775Z] runbld>>> Storing result
[2020-06-24T10:28:16.034Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-06-24T10:28:16.034Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200624102815-6AE9D74D
[2020-06-24T10:28:16.034Z] runbld>>> Adding system facts.
[2020-06-24T10:28:16.978Z] runbld>>> Adding vcs info for the latest commit:  987e0c6ecd128c91e8209badab9936126c1020b1
[2020-06-24T10:28:16.978Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-06-24T10:28:16.978Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-06-24T10:28:16.978Z] Processing JUnit reports with runbld...
[2020-06-24T10:28:16.978Z] + echo 'Processing JUnit reports with runbld...'
[2020-06-24T10:28:17.242Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-06-24T10:28:17.242Z] runbld>>> DURATION: 24ms
[2020-06-24T10:28:17.242Z] runbld>>> STDOUT: 40 bytes
[2020-06-24T10:28:17.242Z] runbld>>> STDERR: 49 bytes
[2020-06-24T10:28:17.242Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-06-24T10:28:17.242Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats
[2020-06-24T10:28:18.628Z] runbld>>> Storing build metadata: 
[2020-06-24T10:28:18.628Z] runbld>>> Adding test report.
[2020-06-24T10:28:18.628Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats
[2020-06-24T10:28:20.010Z] runbld>>> Found 114 test output files
[2020-06-24T10:28:20.580Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-06-24T10:28:20.580Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-06-24T10:28:20.839Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-06-24T10:28:20.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-06-24T10:28:20.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-06-24T10:28:20.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-06-24T10:28:20.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-06-24T10:28:20.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-06-24T10:28:22.218Z] runbld>>> Test output logs contained: Errors: 0 Failures: 2 Tests: 10878 Skipped: 1335
[2020-06-24T10:28:22.218Z] runbld>>> Storing result
[2020-06-24T10:28:22.218Z] runbld>>> FAILURES: 2
[2020-06-24T10:28:23.162Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-06-24T10:28:23.162Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200624102815-6AE9D74D
[2020-06-24T10:28:23.162Z] runbld>>> Email notification disabled by environment variable.
[2020-06-24T10:28:23.162Z] runbld>>> Slack notification disabled by environment variable.
[2020-06-24T10:28:28.747Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19355
[2020-06-24T10:28:28.920Z] [INFO] getVaultSecret: Getting secrets
[2020-06-24T10:28:28.987Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-06-24T10:28:30.060Z] + chmod 755 generate-build-data.sh
[2020-06-24T10:28:30.060Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19355/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19355/runs/1 FAILURE 4444677
[2020-06-24T10:28:30.060Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19355/runs/1/steps/?limit=10000 -o steps-info.json
[2020-06-24T10:28:31.922Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19355/runs/1/tests/?status=FAILED -o tests-errors.json

@jalvz jalvz merged commit 1498938 into elastic:master Jun 24, 2020
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Team:apm APM Server team issues/PRs Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants