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 #20455 to 7.x: Make implementing Close required by reader.Reader #20581

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Aug 13, 2020

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

What does this PR do?

This PR changes the reader.Reader interface to require readers implement a Close function.

Why is it important?

This lets Filebeat clean-up the goroutine in TimeoutReader.

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

Closes #19193

@kvch kvch added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Aug 13, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 13, 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 Aug 13, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 13, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20581 updated]

  • Start Time: 2020-08-26T16:01:20.210+0000

  • Duration: 87 min 12 sec

Test stats 🧪

Test Results
Failed 3
Passed 19549
Skipped 1850
Total 21402

Test errors

Expand to view the tests failures

  • Name: Build and Test / Auditbeat oss Mac OS X / TestEventReader – file_integrity

    • Age: 1
    • Duration: 1.02
    • Error Details: Failed
  • Name: Build and Test / Auditbeat oss Mac OS X / TestEventReader/created – file_integrity

    • Age: 1
    • Duration: 1
    • Error Details: Failed
  • Name: Build and Test / Auditbeat oss Mac OS X / TestRaces – file_integrity

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

Steps errors

Expand to view the steps failures

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 4 min 58 sec

    • Start Time: 2020-08-26T16:35:37.313+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 1 min 38 sec

    • Start Time: 2020-08-26T16:39:48.197+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-08-26T17:27:54.197Z] + tar -xpf source.tgz
[2020-08-26T17:28:04.508Z] + rm source.tgz
[2020-08-26T17:28:04.520Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats
[2020-08-26T17:28:04.540Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Lint
[2020-08-26T17:28:04.637Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Winlogbeat-oss
[2020-08-26T17:28:04.719Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-08-26T17:28:04.801Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-08-26T17:28:04.875Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/dockerlogbeat
[2020-08-26T17:28:04.950Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-08-26T17:28:05.030Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Journalbeat
[2020-08-26T17:28:05.110Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-08-26T17:28:05.187Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Packetbeat-Linux
[2020-08-26T17:28:05.262Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-08-26T17:28:05.340Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-08-26T17:28:05.419Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-08-26T17:28:05.495Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Heartbeat-oss
[2020-08-26T17:28:05.572Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Heartbeat-Windows
[2020-08-26T17:28:05.654Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-08-26T17:28:05.728Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-08-26T17:28:05.805Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-08-26T17:28:05.881Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-08-26T17:28:05.956Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-08-26T17:28:06.035Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-08-26T17:28:06.114Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-08-26T17:28:06.187Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-08-26T17:28:06.268Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Filebeat-Windows
[2020-08-26T17:28:06.347Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Packetbeat-Windows
[2020-08-26T17:28:06.430Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-08-26T17:28:06.504Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-08-26T17:28:06.584Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Libbeat-x-pack
[2020-08-26T17:28:06.657Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-08-26T17:28:06.731Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Functionbeat-Windows
[2020-08-26T17:28:06.811Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-08-26T17:28:06.890Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-08-26T17:28:06.969Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-08-26T17:28:07.048Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-08-26T17:28:07.122Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Packetbeat-Mac-OS-X
[2020-08-26T17:28:07.195Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-08-26T17:28:07.268Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-08-26T17:28:07.343Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-Windows
[2020-08-26T17:28:07.417Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-08-26T17:28:07.495Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-08-26T17:28:07.575Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Filebeat-x-pack
[2020-08-26T17:28:07.661Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Filebeat-oss
[2020-08-26T17:28:07.737Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests
[2020-08-26T17:28:07.811Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Libbeat-oss
[2020-08-26T17:28:07.887Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-OSS-Python-Integration-tests
[2020-08-26T17:28:07.960Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-08-26T17:28:08.036Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-08-26T17:28:08.118Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-08-26T17:28:08.198Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-08-26T17:28:08.596Z] + cat
[2020-08-26T17:28:08.596Z] + /usr/local/bin/runbld ./runbld-script --job-name elastic+beats+pull-request
[2020-08-26T17:28:08.596Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-08-26T17:28:15.192Z] runbld>>> runbld started
[2020-08-26T17:28:15.192Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-08-26T17:28:16.596Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-08-26T17:28:16.596Z] runbld>>> Matches in the system config:
[2020-08-26T17:28:16.596Z] runbld>>> - Matched ^elastic\+beats
[2020-08-26T17:28:16.596Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-08-26T17:28:18.008Z] runbld>>> Debug logging enabled.
[2020-08-26T17:28:18.008Z] runbld>>> Storing result
[2020-08-26T17:28:18.272Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-08-26T17:28:18.272Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200826172817-5E9E4850
[2020-08-26T17:28:18.272Z] runbld>>> Adding system facts.
[2020-08-26T17:28:19.214Z] runbld>>> Adding vcs info for the latest commit:  3808fcee0ea2f206aecf6859db551e997bdc30cd
[2020-08-26T17:28:19.214Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-08-26T17:28:19.214Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-08-26T17:28:19.214Z] + echo 'Processing JUnit reports with runbld...'
[2020-08-26T17:28:19.214Z] Processing JUnit reports with runbld...
[2020-08-26T17:28:19.785Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-08-26T17:28:19.785Z] runbld>>> DURATION: 40ms
[2020-08-26T17:28:19.785Z] runbld>>> STDOUT: 40 bytes
[2020-08-26T17:28:19.785Z] runbld>>> STDERR: 49 bytes
[2020-08-26T17:28:19.785Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-08-26T17:28:19.785Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-20581
[2020-08-26T17:28:20.728Z] runbld>>> Storing build metadata: 
[2020-08-26T17:28:20.728Z] runbld>>> Adding test report.
[2020-08-26T17:28:20.728Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats
[2020-08-26T17:28:21.300Z] runbld>>> Found 139 test output files
[2020-08-26T17:28:23.848Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-08-26T17:28:23.848Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-08-26T17:28:23.848Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-08-26T17:28:23.848Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-08-26T17:28:23.848Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-08-26T17:28:24.111Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-08-26T17:28:24.111Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20581/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-08-26T17:28:24.373Z] runbld>>> Test output logs contained: Errors: 0 Failures: 3 Tests: 21251 Skipped: 1569
[2020-08-26T17:28:24.634Z] runbld>>> Storing result
[2020-08-26T17:28:24.634Z] runbld>>> FAILURES: 3
[2020-08-26T17:28:25.205Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-08-26T17:28:25.205Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200826172817-5E9E4850
[2020-08-26T17:28:25.465Z] runbld>>> Email notification disabled by environment variable.
[2020-08-26T17:28:25.465Z] runbld>>> Slack notification disabled by environment variable.
[2020-08-26T17:28:31.170Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-20581
[2020-08-26T17:28:31.395Z] [INFO] getVaultSecret: Getting secrets
[2020-08-26T17:28:31.462Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-08-26T17:28:32.281Z] + chmod 755 generate-build-data.sh
[2020-08-26T17:28:32.281Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20581/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20581/runs/3 FAILURE 5231811
[2020-08-26T17:28:32.281Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20581/runs/3/steps/?limit=10000 -o steps-info.json

@kvch
Copy link
Contributor Author

kvch commented Aug 14, 2020

Failing tests are unrelated.

Copy link

@urso urso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the changelog files correct?

@kvch
Copy link
Contributor Author

kvch commented Aug 14, 2020

Shoot. No.

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog looks good now.

This PR changes the `reader.Reader` interface to require readers implement a `Close` function.

This lets Filebeat clean-up the goroutine in `TimeoutReader`.

Closes elastic#19193
(cherry picked from commit 315a17e)
@kvch kvch merged commit d22a1cc into elastic:7.x Aug 26, 2020
@zube zube bot removed the [zube]: Done label Nov 25, 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.

4 participants