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 #19406 to 7.x: Input v2 stateless manager #19729

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

urso
Copy link

@urso urso commented Jul 8, 2020

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

  • Enhancement

What does this PR do?

This change introduced an InputManager for stateless inputs, that do not
require end-to-end ACK or or state stored between restarts

The current state of the full implementation can be seen here and sample inputs based on the new API.

The full list of changes will include:

Test coverage report:

gocov test ./... | gocov report
ok  	github.com/elastic/beats/v7/filebeat/input/v2/input-stateless	0.008s	coverage: 72.2% of statements

github.com/elastic/beats/v7/filebeat/input/v2/input-stateless/stateless.go	 configuredInput.Run	 100.00% (6/6)
github.com/elastic/beats/v7/filebeat/input/v2/input-stateless/stateless.go	 NewInputManager	 100.00% (1/1)
github.com/elastic/beats/v7/filebeat/input/v2/input-stateless/stateless.go	 InputManager.Create	 75.00% (3/4)
github.com/elastic/beats/v7/filebeat/input/v2/input-stateless/stateless.go	 @76:8			 75.00% (3/4)
github.com/elastic/beats/v7/filebeat/input/v2/input-stateless/stateless.go	 InputManager.Init	 0.00% (0/1)
github.com/elastic/beats/v7/filebeat/input/v2/input-stateless/stateless.go	 configuredInput.Name	 0.00% (0/1)
github.com/elastic/beats/v7/filebeat/input/v2/input-stateless/stateless.go	 configuredInput.Test	 0.00% (0/1)
github.com/elastic/beats/v7/filebeat/input/v2/input-stateless			 --------------------	 72.22% (13/18)

Why is it important?

Filebeat input v2 API support

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

@urso urso added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Jul 8, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 8, 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 8, 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 #19729 opened]

  • Start Time: 2020-07-08T10:41:49.158+0000

  • Duration: 122 min 26 sec

Test stats 🧪

Test Results
Failed 1
Passed 3547
Skipped 677
Total 4225

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.275
    • 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: 8 min 40 sec

    • Start Time: 2020-07-08T11:07:30.377+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 0 min 13 sec

    • Start Time: 2020-07-08T11:17:58.803+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-07-08T12:43:48.501Z] 		at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:265)
[2020-07-08T12:43:48.501Z] 		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
[2020-07-08T12:43:48.501Z] 		at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
[2020-07-08T12:43:48.501Z] 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2020-07-08T12:43:48.501Z] 		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-07-08T12:43:48.501Z] 		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-07-08T12:43:48.501Z] 		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-07-08T12:43:48.501Z] 		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-07-08T12:43:48.501Z] Caused: hudson.FilePath$TunneledInterruptedException
[2020-07-08T12:43:48.501Z] 	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3075)
[2020-07-08T12:43:48.501Z] 	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
[2020-07-08T12:43:48.501Z] 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
[2020-07-08T12:43:48.501Z] 	at hudson.remoting.Request$2.run(Request.java:369)
[2020-07-08T12:43:48.501Z] 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
[2020-07-08T12:43:48.501Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-07-08T12:43:48.501Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-07-08T12:43:48.501Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-07-08T12:43:48.501Z] 	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
[2020-07-08T12:43:48.501Z] Caused: java.lang.InterruptedException: java.lang.InterruptedException: no matches found within 10000
[2020-07-08T12:43:48.501Z] 	at hudson.FilePath.act(FilePath.java:1071)
[2020-07-08T12:43:48.501Z] 	at hudson.FilePath.act(FilePath.java:1058)
[2020-07-08T12:43:48.501Z] 	at hudson.FilePath.validateAntFileMask(FilePath.java:2684)
[2020-07-08T12:43:48.501Z] 	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:265)
[2020-07-08T12:43:48.501Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
[2020-07-08T12:43:48.501Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
[2020-07-08T12:43:48.501Z] 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2020-07-08T12:43:48.501Z] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-07-08T12:43:48.501Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-07-08T12:43:48.501Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-07-08T12:43:48.501Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-07-08T12:43:48.501Z] 	at java.lang.Thread.run(Thread.java:748)
[2020-07-08T12:43:48.502Z] No artifacts found that match the file pattern "**/build/TEST*.out". Configuration error?
[2020-07-08T12:43:49.039Z] + curl -sSLo codecov https://codecov.io/bash
[2020-07-08T12:43:49.309Z] + FILE=auditbeat/build/coverage/full.cov
[2020-07-08T12:43:49.309Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-07-08T12:43:49.309Z] + FILE=filebeat/build/coverage/full.cov
[2020-07-08T12:43:49.309Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-07-08T12:43:49.309Z] + FILE=heartbeat/build/coverage/full.cov
[2020-07-08T12:43:49.309Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-07-08T12:43:49.309Z] + FILE=libbeat/build/coverage/full.cov
[2020-07-08T12:43:49.309Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-07-08T12:43:49.309Z] + FILE=metricbeat/build/coverage/full.cov
[2020-07-08T12:43:49.309Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-07-08T12:43:49.309Z] + FILE=packetbeat/build/coverage/full.cov
[2020-07-08T12:43:49.309Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-07-08T12:43:49.309Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-07-08T12:43:49.309Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-07-08T12:43:49.309Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-08T12:43:49.309Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-07-08T12:43:50.685Z] Failed in branch Filebeat oss
[2020-07-08T12:43:52.607Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats
[2020-07-08T12:43:52.945Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-08T12:43:52.969Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats/Lint
[2020-07-08T12:43:53.124Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-07-08T12:43:53.297Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-07-08T12:43:53.454Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-07-08T12:43:53.616Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats/Filebeat-Windows
[2020-07-08T12:43:53.792Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats/Filebeat-x-pack
[2020-07-08T12:43:53.953Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats/Filebeat-oss
[2020-07-08T12:43:54.394Z] + cat
[2020-07-08T12:43:54.394Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-08T12:43:54.394Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-08T12:44:00.986Z] runbld>>> runbld started
[2020-07-08T12:44:00.986Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-08T12:44:01.928Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19729' in order of occurrence in the config (last value wins).
[2020-07-08T12:44:03.314Z] runbld>>> Debug logging enabled.
[2020-07-08T12:44:03.314Z] runbld>>> Storing result
[2020-07-08T12:44:03.314Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-08T12:44:03.314Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200708124402-8579DA02
[2020-07-08T12:44:03.314Z] runbld>>> Adding system facts.
[2020-07-08T12:44:03.887Z] runbld>>> Adding vcs info for the latest commit:  1127002fb5378da1b38c674b9b6a4038e61784e9
[2020-07-08T12:44:03.887Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-08T12:44:04.147Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-08T12:44:04.147Z] Processing JUnit reports with runbld...
[2020-07-08T12:44:04.147Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-08T12:44:04.408Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-08T12:44:04.408Z] runbld>>> DURATION: 19ms
[2020-07-08T12:44:04.408Z] runbld>>> STDOUT: 40 bytes
[2020-07-08T12:44:04.408Z] runbld>>> STDERR: 49 bytes
[2020-07-08T12:44:04.408Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-08T12:44:04.408Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats
[2020-07-08T12:44:05.792Z] runbld>>> Storing build metadata: 
[2020-07-08T12:44:05.792Z] runbld>>> Adding test report.
[2020-07-08T12:44:05.792Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729/src/github.com/elastic/beats
[2020-07-08T12:44:06.364Z] runbld>>> Found 11 test output files
[2020-07-08T12:44:07.304Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 4225 Skipped: 653
[2020-07-08T12:44:07.565Z] runbld>>> Storing result
[2020-07-08T12:44:07.565Z] runbld>>> FAILURES: 1
[2020-07-08T12:44:07.826Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-08T12:44:07.826Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200708124402-8579DA02
[2020-07-08T12:44:08.087Z] runbld>>> Email notification disabled by environment variable.
[2020-07-08T12:44:08.087Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-08T12:44:13.680Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19729
[2020-07-08T12:44:13.855Z] [INFO] getVaultSecret: Getting secrets
[2020-07-08T12:44:13.935Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-08T12:44:15.007Z] + chmod 755 generate-build-data.sh
[2020-07-08T12:44:15.007Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19729/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19729/runs/1 FAILURE 7345578
[2020-07-08T12:44:15.007Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19729/runs/1/steps/?limit=10000 -o steps-info.json
[2020-07-08T12:44:15.918Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19729/runs/1/tests/?status=FAILED -o tests-errors.json
[2020-07-08T12:44:16.169Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19729/runs/1/log/ -o pipeline-log.txt

@urso urso merged commit 80735bb into elastic:7.x Jul 8, 2020
@urso urso deleted the backport_19406_7.x branch July 8, 2020 14:33
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 [zube]: Done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants