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

Update go version to 1.14.4 #19753

Merged
merged 8 commits into from
Jul 9, 2020
Merged

Update go version to 1.14.4 #19753

merged 8 commits into from
Jul 9, 2020

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Jul 8, 2020

What does this PR do?

This PR adds support for Golang 1.14.4 in Beats. The dependency golang.org/x/tools is pinned to release-branch.go1.14.

The generated Beats no longer contain a vendor folder.

Why is it important?

Go 1.14 has been out for quite some time. It is high time we update.

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 #18829
Closes #16566

@kvch kvch requested a review from a team as a code owner July 8, 2020 17:36
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 8, 2020
@kvch kvch added [zube]: In Review Team:Services (Deprecated) Label for the former Integrations-Services team labels 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
@@ -178,12 +178,12 @@ func TestFetchTimeout(t *testing.T) {
elapsed := time.Since(start)
var found bool
for _, err := range errs {
if strings.Contains(err.Error(), "request canceled (Client.Timeout exceeded") {
if strings.Contains(err.Error(), "context deadline exceeded (Client.Timeout exceeded") {
Copy link

Choose a reason for hiding this comment

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

maybe for another PR, but better check for err == context.X. There are constants for this. Checking errors by error string is kind of a no-go.

@kvch kvch added the needs_backport PR is waiting to be backported to other branches. label Jul 8, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 8, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #19753 updated]

  • Start Time: 2020-07-09T12:27:32.613+0000

  • Duration: 82 min 12 sec

Test stats 🧪

Test Results
Failed 2
Passed 9733
Skipped 1579
Total 11314

Test errors

Expand to view the tests failures

  • Name: Build and Test / Filebeat Mac OS X / test_rotating_file_inode – test_registrar.Test

    • Age: 1
    • Duration: 4.584
    • Error Details:
  • Name: Build and Test / Filebeat oss / test_rotating_file_inode – test_registrar.Test

    • Age: 1
    • Duration: 4.501
    • Error Details:

Steps errors

Expand to view the steps failures

  • Name: Make -C filebeat testsuite

    • Description: make -C filebeat testsuite

    • Duration: 34 min 5 sec

    • Start Time: 2020-07-09T12:52:54.932+0000

    • log

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Duration: 13 min 8 sec

    • Start Time: 2020-07-09T12:57:48.880+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 1

    • Duration: 1 min 40 sec

    • Start Time: 2020-07-09T13:11:14.324+0000

    • log

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

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

    • Duration: 7 min 16 sec

    • Start Time: 2020-07-09T12:56:26.830+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-07-09T13:49:15.174Z] + FILE=metricbeat/build/coverage/full.cov
[2020-07-09T13:49:15.174Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-07-09T13:49:15.174Z] + FILE=packetbeat/build/coverage/full.cov
[2020-07-09T13:49:15.174Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-07-09T13:49:15.174Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-07-09T13:49:15.174Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-07-09T13:49:15.174Z] + FILE=journalbeat/build/coverage/full.cov
[2020-07-09T13:49:15.174Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-07-09T13:49:16.685Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats
[2020-07-09T13:49:16.994Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-09T13:49:17.008Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Lint
[2020-07-09T13:49:17.090Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-07-09T13:49:17.182Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-07-09T13:49:17.279Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-07-09T13:49:17.377Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Winlogbeat-oss
[2020-07-09T13:49:17.463Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-07-09T13:49:17.632Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-07-09T13:49:17.716Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Dockerlogbeat
[2020-07-09T13:49:17.805Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-07-09T13:49:17.951Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-07-09T13:49:18.042Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-07-09T13:49:18.123Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Journalbeat-oss
[2020-07-09T13:49:18.219Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-07-09T13:49:18.319Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-07-09T13:49:18.418Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-07-09T13:49:18.507Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-07-09T13:49:18.594Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-07-09T13:49:18.687Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-07-09T13:49:18.779Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-07-09T13:49:18.868Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-07-09T13:49:18.947Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-07-09T13:49:19.042Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-07-09T13:49:19.129Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Heartbeat-oss
[2020-07-09T13:49:19.220Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Filebeat-Windows
[2020-07-09T13:49:19.310Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-07-09T13:49:19.411Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-07-09T13:49:19.521Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Libbeat-x-pack
[2020-07-09T13:49:19.616Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-07-09T13:49:19.718Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-07-09T13:49:19.814Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-Windows
[2020-07-09T13:49:19.912Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-07-09T13:49:20.006Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Packetbeat-oss
[2020-07-09T13:49:20.103Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Filebeat-x-pack
[2020-07-09T13:49:20.203Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-07-09T13:49:20.296Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Functionbeat-Windows
[2020-07-09T13:49:20.380Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Heartbeat-Windows
[2020-07-09T13:49:20.469Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Filebeat-oss
[2020-07-09T13:49:20.559Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-07-09T13:49:20.659Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-07-09T13:49:20.761Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-07-09T13:49:20.849Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Libbeat-oss
[2020-07-09T13:49:20.948Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-07-09T13:49:21.045Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-07-09T13:49:21.418Z] + cat
[2020-07-09T13:49:21.418Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-09T13:49:21.418Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-09T13:49:29.565Z] runbld>>> runbld started
[2020-07-09T13:49:29.565Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-09T13:49:30.137Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-19753' in order of occurrence in the config (last value wins).
[2020-07-09T13:49:31.526Z] runbld>>> Debug logging enabled.
[2020-07-09T13:49:31.526Z] runbld>>> Storing result
[2020-07-09T13:49:31.786Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-09T13:49:31.786Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200709134931-D2BBE12E
[2020-07-09T13:49:31.786Z] runbld>>> Adding system facts.
[2020-07-09T13:49:32.726Z] runbld>>> Adding vcs info for the latest commit:  9e473a79c9dc71a33ec2d217062c4ed7cd709a52
[2020-07-09T13:49:32.726Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-09T13:49:32.726Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-09T13:49:32.726Z] Processing JUnit reports with runbld...
[2020-07-09T13:49:32.726Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-09T13:49:33.295Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-09T13:49:33.296Z] runbld>>> DURATION: 22ms
[2020-07-09T13:49:33.296Z] runbld>>> STDOUT: 40 bytes
[2020-07-09T13:49:33.296Z] runbld>>> STDERR: 49 bytes
[2020-07-09T13:49:33.296Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-09T13:49:33.296Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats
[2020-07-09T13:49:34.240Z] runbld>>> Storing build metadata: 
[2020-07-09T13:49:34.240Z] runbld>>> Adding test report.
[2020-07-09T13:49:34.240Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats
[2020-07-09T13:49:35.184Z] runbld>>> Found 115 test output files
[2020-07-09T13:49:35.445Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-07-09T13:49:35.445Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-07-09T13:49:35.445Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-07-09T13:49:35.445Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-07-09T13:49:35.445Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-07-09T13:49:36.829Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-07-09T13:49:36.829Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-07-09T13:49:37.400Z] runbld>>> Test output logs contained: Errors: 0 Failures: 2 Tests: 11168 Skipped: 1340
[2020-07-09T13:49:37.400Z] runbld>>> Storing result
[2020-07-09T13:49:37.400Z] runbld>>> FAILURES: 2
[2020-07-09T13:49:37.970Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-09T13:49:37.970Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200709134931-D2BBE12E
[2020-07-09T13:49:38.234Z] runbld>>> Email notification disabled by environment variable.
[2020-07-09T13:49:38.234Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-09T13:49:43.800Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-19753
[2020-07-09T13:49:43.918Z] [INFO] getVaultSecret: Getting secrets
[2020-07-09T13:49:43.991Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-09T13:49:44.812Z] + chmod 755 generate-build-data.sh
[2020-07-09T13:49:44.812Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19753/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19753/runs/8 FAILURE 4931939
[2020-07-09T13:49:44.812Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19753/runs/8/steps/?limit=10000 -o steps-info.json
[2020-07-09T13:49:47.295Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-19753/runs/8/tests/?status=FAILED -o tests-errors.json

@urso
Copy link

urso commented Jul 8, 2020

Some tests failed, but seems unrelated (maybe the generator might have some problem, though).

As follow up: we should disable vendoring in the generator.

@kvch
Copy link
Contributor Author

kvch commented Jul 9, 2020

@urso I've updated the generators to not use vendoring.

@kvch
Copy link
Contributor Author

kvch commented Jul 9, 2020

The issues with the generated Beats will disappear once the PR gets merged to master.

Travis errors are unrelated.

@urso
Copy link

urso commented Jul 9, 2020

CI failures seem to be unrelated. I'm Investigating the filebeat errors. Feel free to merge independently.

@kvch kvch merged commit 7580c72 into elastic:master Jul 9, 2020
@kvch kvch added v7.9.0 and removed needs_backport PR is waiting to be backported to other branches. labels Jul 9, 2020
v1v added a commit to v1v/beats that referenced this pull request Jul 9, 2020
* upstream/master:
  Add `docker logs` support to the Elastic Log Driver (elastic#19531)
  [Elastic Agent] Fix saving of agent configuration on Windows to have proper ACLs (elastic#19793)
  Send the config revision down to the endpoint application. (elastic#19759)
  [Elastic Agent] Add support for multiple hosts in connection to kibana (elastic#19628)
  Remove the downloadConfig and retryConfig from plugin/process.Application and plugin/service.Application. (elastic#19603)
  Update go version to 1.14.4 (elastic#19753)
  ci: set builds as skipped when they do not match the trigger (elastic#19750)
  [Auditbeat] Fix up socket dataset runaway CPU usage (elastic#19764)
  Convert cloudfoundry input to v2 (elastic#19717)
kvch added a commit to kvch/beats that referenced this pull request Jul 13, 2020
This PR adds support for Golang 1.14.4 in Beats. The dependency `golang.org/x/tools` is pinned to `release-branch.go1.14`.

The generated Beats no longer contain a vendor folder.

Go 1.14 has been out for quite some time. It is high time we update.

Closes elastic#18829
Closes elastic#16566

(cherry picked from commit 7580c72)
kvch added a commit that referenced this pull request Jul 13, 2020
This PR adds support for Golang 1.14.4 in Beats. The dependency `golang.org/x/tools` is pinned to `release-branch.go1.14`.

The generated Beats no longer contain a vendor folder.

Go 1.14 has been out for quite some time. It is high time we update.

Closes #18829
Closes #16566

(cherry picked from commit 7580c72)
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
## What does this PR do?

This PR adds support for Golang 1.14.4 in Beats. The dependency `golang.org/x/tools` is pinned to `release-branch.go1.14`.

The generated Beats no longer contain a vendor folder.

## Why is it important?

Go 1.14 has been out for quite some time. It is high time we update.

## Related issues

Closes elastic#18829
Closes elastic#16566
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Services (Deprecated) Label for the former Integrations-Services team v7.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Beats to Go 1.14
4 participants