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

Add more kubernetes integration tests #18138

Merged
merged 5 commits into from
May 4, 2020

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Apr 30, 2020

What does this PR do?

Adds more kubernetes intergration tests for kubelet, proxy, and scheduler metricsets.

Why is it important?

For better integration test coverage for kubernetes.

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

MODULE=kubernetes mage goIntegTest

Related issues

@blakerouse blakerouse added enhancement Team:Platforms Label for the Integrations - Platforms team labels Apr 30, 2020
@blakerouse blakerouse requested a review from a team April 30, 2020 18:07
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 30, 2020
@blakerouse
Copy link
Contributor Author

I found that I duplicated kuberemote.go in my previous branch, so that is also removed in this branch, as well as moving kubectl.go into the mage/kubernetes module.

@blakerouse blakerouse removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 30, 2020
@jsoriano jsoriano added [zube]: In Review needs_backport PR is waiting to be backported to other branches. review v7.8.0 labels Apr 30, 2020
@jsoriano
Copy link
Member

It LGTM, but could you also change here the tag of the golang image to use GoVersion()?
https://github.com/elastic/beats/blob/3aff7d0f65bae0f13ddf09cf21ceb3ebce3db429/dev-tools/mage/kubernetes/kuberemote.go#L208

@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 30, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 7670
Skipped 1210
Total 8880

Steps errors

Expand to view the steps failures

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 6 sec<

    • Start Time: 2020-05-04T13:21:05.640+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 1 min 32 sec<

    • Start Time: 2020-05-04T13:23:41.812+0000

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 8 sec<

    • Start Time: 2020-05-04T13:25:53.524+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 1 min 21 sec<

    • Start Time: 2020-05-04T13:28:43.974+0000

Log output

Expand to view the last 100 lines of log output

[2020-05-04T14:41:08.538Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-04T14:41:08.538Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-04T14:41:08.538Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-04T14:41:08.538Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-04T14:41:08.538Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-04T14:41:08.538Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-04T14:41:10.362Z] Failed in branch Auditbeat x-pack
[2020-05-04T14:41:10.691Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats
[2020-05-04T14:41:11.239Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-04T14:41:11.318Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Lint
[2020-05-04T14:41:11.491Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-05-04T14:41:11.775Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-05-04T14:41:11.984Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-04T14:41:12.215Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-04T14:41:12.431Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-04T14:41:12.646Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-04T14:41:12.901Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-04T14:41:13.116Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-05-04T14:41:13.308Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-04T14:41:13.519Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-04T14:41:13.839Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-04T14:41:14.069Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-04T14:41:14.309Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-05-04T14:41:14.580Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-04T14:41:14.836Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-04T14:41:15.192Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-04T14:41:15.433Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-05-04T14:41:15.631Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-04T14:41:15.847Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-05-04T14:41:16.078Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-04T14:41:16.244Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-05-04T14:41:16.466Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-04T14:41:16.707Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-04T14:41:16.932Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-04T14:41:17.189Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-04T14:41:17.444Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Filebeat-x-pack
[2020-05-04T14:41:17.641Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-04T14:41:17.799Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Auditbeat-Mac-OS-X
[2020-05-04T14:41:17.983Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Filebeat-oss
[2020-05-04T14:41:18.150Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-04T14:41:18.357Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-04T14:41:18.547Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Libbeat-oss
[2020-05-04T14:41:18.715Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-04T14:41:18.876Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-04T14:41:19.148Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-05-04T14:41:19.377Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Auditbeat-Windows
[2020-05-04T14:41:19.603Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-05-04T14:41:19.945Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-04T14:41:20.235Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-04T14:41:20.890Z] + cat
[2020-05-04T14:41:20.890Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-04T14:41:20.890Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-04T14:41:26.939Z] runbld>>> runbld started
[2020-05-04T14:41:26.939Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-04T14:41:28.782Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-18138' in order of occurrence in the config (last value wins).
[2020-05-04T14:41:30.078Z] runbld>>> Debug logging enabled.
[2020-05-04T14:41:30.078Z] runbld>>> Storing result
[2020-05-04T14:41:30.419Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-04T14:41:30.419Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200504144129-52732F4D
[2020-05-04T14:41:30.419Z] runbld>>> Adding system facts.
[2020-05-04T14:41:31.166Z] runbld>>> Adding vcs info for the latest commit:  36da24c02a73e8ff55db918871b60511c89fe942
[2020-05-04T14:41:31.166Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-04T14:41:31.166Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-04T14:41:31.501Z] Processing JUnit reports with runbld...
[2020-05-04T14:41:31.501Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-04T14:41:31.839Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-04T14:41:31.839Z] runbld>>> DURATION: 20ms
[2020-05-04T14:41:31.839Z] runbld>>> STDOUT: 40 bytes
[2020-05-04T14:41:31.839Z] runbld>>> STDERR: 49 bytes
[2020-05-04T14:41:31.839Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-04T14:41:31.839Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats
[2020-05-04T14:41:33.034Z] runbld>>> Storing build metadata: 
[2020-05-04T14:41:33.035Z] runbld>>> Adding test report.
[2020-05-04T14:41:33.035Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats
[2020-05-04T14:41:34.199Z] runbld>>> Found 101 test output files
[2020-05-04T14:41:34.995Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-04T14:41:34.995Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-04T14:41:34.995Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-04T14:41:34.995Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-04T14:41:35.352Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-04T14:41:35.352Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-04T14:41:36.084Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-04T14:41:36.084Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-04T14:41:36.420Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 8730 Skipped: 1006
[2020-05-04T14:41:36.420Z] runbld>>> Storing result
[2020-05-04T14:41:36.420Z] runbld>>> FAILURES: 0
[2020-05-04T14:41:36.758Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-04T14:41:36.758Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200504144129-52732F4D
[2020-05-04T14:41:36.758Z] runbld>>> Email notification disabled by environment variable.
[2020-05-04T14:41:36.758Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-04T14:41:37.735Z] Body did not finish within grace period; terminating with extreme prejudice
[2020-05-04T14:41:37.834Z] ERROR: runbld post build action failed.
[2020-05-04T14:41:37.834Z] Timeout has been exceeded
[2020-05-04T14:41:38.788Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18138
[2020-05-04T14:41:39.180Z] [INFO] getVaultSecret: Getting secrets
[2020-05-04T14:41:39.322Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-04T14:41:40.648Z] + chmod 755 generate-build-data.sh
[2020-05-04T14:41:40.648Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18138/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18138/runs/5 ABORTED 7415636
[2020-05-04T14:41:41.559Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18138/runs/5/steps/?limit=10000 -o steps-info.json
[2020-05-04T14:41:42.903Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18138/runs/5/tests/?status=FAILED -o tests-errors.json

@blakerouse
Copy link
Contributor Author

It LGTM, but could you also change here the tag of the golang image to use GoVersion()?
https://github.com/elastic/beats/blob/3aff7d0f65bae0f13ddf09cf21ceb3ebce3db429/dev-tools/mage/kubernetes/kuberemote.go#L208

Heck yes! I didn't know we had that function, because I was originally searching for a way to do something like that.

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 7707
Skipped 1210
Total 8917

Steps errors

Expand to view the steps failures

  • Name: Report to Codecov

    • Description: curl -sSLo codecov https://codecov.io/bash for i in auditbeat filebeat heartbeat libbeat metricbeat packetbeat winlogbeat journalbeat do FILE="${i}/build/coverage/full.cov" if [ -f "${FILE}" ]; then bash codecov -f "${FILE}" fi done

    • Result: FAILURE

    • Duration: 2 min 23 sec<

    • Start Time: 2020-05-04T17:43:34.958+0000

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 15 sec<

    • Start Time: 2020-05-04T17:37:37.473+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 0 min 29 sec<

    • Start Time: 2020-05-04T17:45:16.232+0000

  • Name: Make -C generator/_templates/metricbeat test

    • Description: make -C generator/_templates/metricbeat test

    • Result: FAILURE

    • Duration: 1 min 11 sec<

    • Start Time: 2020-05-04T17:53:38.870+0000

  • Name: Make -C generator/_templates/beat test

    • Description: make -C generator/_templates/beat test

    • Result: FAILURE

    • Duration: 1 min 29 sec<

    • Start Time: 2020-05-04T17:57:22.304+0000

@blakerouse blakerouse merged commit 64f6e80 into elastic:master May 4, 2020
@blakerouse blakerouse deleted the more-kubernetes-testing branch May 4, 2020 19:00
blakerouse added a commit to blakerouse/beats that referenced this pull request May 4, 2020
* Performing testing on kubelet metrics.

* Add integration tests for kubelet, proxy, and scheduler.

* mage fmt

* Update to use GoVersion in pods create.

* Fix kubelet hosts string to connect with kind.

(cherry picked from commit 64f6e80)
@blakerouse blakerouse removed the needs_backport PR is waiting to be backported to other branches. label May 4, 2020
blakerouse added a commit that referenced this pull request May 4, 2020
* Performing testing on kubelet metrics.

* Add integration tests for kubelet, proxy, and scheduler.

* mage fmt

* Update to use GoVersion in pods create.

* Fix kubelet hosts string to connect with kind.

(cherry picked from commit 64f6e80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement review Team:Platforms Label for the Integrations - Platforms team v7.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants