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 #21070 to 7.x: Add vendoring to Google Cloud Functions again #21078

Merged
merged 1 commit into from
Sep 14, 2020

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Sep 14, 2020

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

What does this PR do?

This PR adds the vendor folder back the Cloud Functions of Functionbeat, so they can be used on GCP. This PR basically reverts the removal of the vendor builder functionality.

Why is it important?

The functions are currently broken, as there is no go.mod file and vendor folder. However, we cannot use go modules, because the Golang environment on GCP runs go version 1.13. Thus, we have to fall back to vendoring.

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 #20830

## What does this PR do?

This PR adds the vendor folder back the Cloud Functions of Functionbeat, so they can be used on GCP. This PR basically reverts the removal of the vendor builder functionality.

## Why is it important?

The functions are currently broken, as there is no go.mod file and vendor folder. However, we cannot use go modules, because the Golang environment on GCP runs go version 1.13. Thus, we have to fall back to vendoring.

## Checklist

- [x] My code follows the style guidelines of this project
- [x] 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~~
- [x] I have added an entry in `CHANGELOG.next.asciidoc` or `CHANGELOG-developer.next.asciidoc`.

## Related issues

Closes elastic#20830

(cherry picked from commit 50ea11a)
@kvch kvch added [zube]: In Review backport Team:Services (Deprecated) Label for the former Integrations-Services team labels Sep 14, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 14, 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 Sep 14, 2020
@kvch kvch merged commit efd1f3b into elastic:7.x Sep 14, 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 #21078 opened]

  • Start Time: 2020-09-14T15:30:50.931+0000

  • Duration: 75 min 27 sec

Test stats 🧪

Test Results
Failed 1
Passed 20129
Skipped 1863
Total 21993

Test errors

Expand to view the tests failures

  • Name: Build and Test / Filebeat oss / test_default_settings – filebeat.tests.system.test_autodiscover.TestAutodiscover

    • Age: 1
    • Duration: 90.004
    • Error Details: Failed: Timeout >90.0s

Steps errors

Expand to view the steps failures

  • Name: Mage build test

    • Description: mage build test

    • Duration: 30 min 54 sec

    • Start Time: 2020-09-14T15:54:09.217+0000

    • log

  • Name: Make test

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

    • Duration: 7 min 7 sec

    • Start Time: 2020-09-14T16:13:55.988+0000

    • log

  • Name: Recursively delete the current directory from the workspace

    • Description: script returned exit code 2

    • Duration: 1 min 12 sec

    • Start Time: 2020-09-14T16:21:18.190+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-09-14T16:45:45.089Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats
[2020-09-14T16:45:45.142Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Lint
[2020-09-14T16:45:45.314Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Winlogbeat-oss
[2020-09-14T16:45:45.476Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-09-14T16:45:45.646Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-09-14T16:45:45.822Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/dockerlogbeat
[2020-09-14T16:45:45.995Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-09-14T16:45:46.160Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Journalbeat
[2020-09-14T16:45:46.339Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-09-14T16:45:46.498Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Packetbeat-Linux
[2020-09-14T16:45:46.660Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-09-14T16:45:46.821Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-09-14T16:45:47.008Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-09-14T16:45:47.198Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-09-14T16:45:47.383Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-09-14T16:45:47.559Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-09-14T16:45:47.739Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-09-14T16:45:47.935Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Heartbeat-oss
[2020-09-14T16:45:48.121Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Heartbeat-Windows
[2020-09-14T16:45:48.294Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-09-14T16:45:48.467Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-09-14T16:45:48.637Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-09-14T16:45:48.811Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-09-14T16:45:48.989Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-09-14T16:45:49.171Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-09-14T16:45:49.349Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Libbeat-x-pack
[2020-09-14T16:45:49.519Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-09-14T16:45:49.690Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-09-14T16:45:49.874Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Functionbeat-Windows
[2020-09-14T16:45:50.044Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Packetbeat-Windows
[2020-09-14T16:45:50.228Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Filebeat-Windows
[2020-09-14T16:45:50.390Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-09-14T16:45:50.550Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-09-14T16:45:50.725Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-09-14T16:45:50.893Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Packetbeat-Mac-OS-X
[2020-09-14T16:45:51.056Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-09-14T16:45:51.222Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-Windows
[2020-09-14T16:45:51.386Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-09-14T16:45:51.553Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-09-14T16:45:51.723Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-09-14T16:45:51.936Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-09-14T16:45:52.125Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Filebeat-x-pack
[2020-09-14T16:45:52.309Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Filebeat-oss
[2020-09-14T16:45:52.474Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Libbeat-oss
[2020-09-14T16:45:52.649Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-OSS-Python-Integration-tests
[2020-09-14T16:45:52.822Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests
[2020-09-14T16:45:52.989Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-09-14T16:45:53.294Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-09-14T16:45:53.489Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-09-14T16:45:54.013Z] + cat
[2020-09-14T16:45:54.013Z] + /usr/local/bin/runbld ./runbld-script --job-name elastic+beats+pull-request
[2020-09-14T16:45:54.013Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-09-14T16:46:00.584Z] runbld>>> runbld started
[2020-09-14T16:46:00.584Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-09-14T16:46:01.522Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-09-14T16:46:01.522Z] runbld>>> Matches in the system config:
[2020-09-14T16:46:01.522Z] runbld>>> - Matched ^elastic\+beats
[2020-09-14T16:46:01.522Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-09-14T16:46:02.899Z] runbld>>> Debug logging enabled.
[2020-09-14T16:46:02.899Z] runbld>>> Storing result
[2020-09-14T16:46:02.899Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-09-14T16:46:02.899Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200914164602-649DCE9D
[2020-09-14T16:46:02.899Z] runbld>>> Adding system facts.
[2020-09-14T16:46:04.281Z] runbld>>> Adding vcs info for the latest commit:  b60cd4b5e7c426c684fff6079ca1845eb664e616
[2020-09-14T16:46:04.281Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-09-14T16:46:04.281Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-09-14T16:46:04.281Z] Processing JUnit reports with runbld...
[2020-09-14T16:46:04.281Z] + echo 'Processing JUnit reports with runbld...'
[2020-09-14T16:46:04.541Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-09-14T16:46:04.541Z] runbld>>> DURATION: 14ms
[2020-09-14T16:46:04.541Z] runbld>>> STDOUT: 40 bytes
[2020-09-14T16:46:04.541Z] runbld>>> STDERR: 49 bytes
[2020-09-14T16:46:04.541Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-09-14T16:46:04.541Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-21078
[2020-09-14T16:46:05.477Z] runbld>>> Storing build metadata: 
[2020-09-14T16:46:05.477Z] runbld>>> Adding test report.
[2020-09-14T16:46:05.477Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats
[2020-09-14T16:46:06.045Z] runbld>>> Found 140 test output files
[2020-09-14T16:46:07.427Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-09-14T16:46:07.427Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-09-14T16:46:07.698Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-09-14T16:46:07.698Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-09-14T16:46:07.698Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-09-14T16:46:09.076Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-09-14T16:46:09.076Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-21078/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-09-14T16:46:09.643Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 21842 Skipped: 1579
[2020-09-14T16:46:09.902Z] runbld>>> Storing result
[2020-09-14T16:46:09.902Z] runbld>>> FAILURES: 1
[2020-09-14T16:46:10.161Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-09-14T16:46:10.161Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200914164602-649DCE9D
[2020-09-14T16:46:10.421Z] runbld>>> Email notification disabled by environment variable.
[2020-09-14T16:46:10.421Z] runbld>>> Slack notification disabled by environment variable.
[2020-09-14T16:46:16.805Z] Running on worker-395930 in /var/lib/jenkins/workspace/Beats_beats_PR-21078
[2020-09-14T16:46:16.953Z] [INFO] getVaultSecret: Getting secrets
[2020-09-14T16:46:17.072Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-09-14T16:46:19.571Z] + chmod 755 generate-build-data.sh
[2020-09-14T16:46:19.571Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21078/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21078/runs/1 FAILURE 4527151
[2020-09-14T16:46:19.571Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21078/runs/1/steps/?limit=10000 -o steps-info.json
[2020-09-14T16:46:23.791Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21078/runs/1/tests/?status=FAILED -o tests-errors.json
[2020-09-14T16:46:24.493Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21078/runs/1/log/ -o pipeline-log.txt

@zube zube bot removed the [zube]: Done label Dec 14, 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.

3 participants