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

[CI] cleanup terraform when errors #22356

Merged
merged 2 commits into from
Nov 3, 2020
Merged

Conversation

v1v
Copy link
Member

@v1v v1v commented Nov 2, 2020

What does this PR do?

Since cloud tests are now executed for ever merge to master, when something bad happens then it should always clean them

Why is it important?

There was a particular corner case that did not clean them all.

STacktraces

[2020-11-02T13:39:22.448Z] + terraform apply -auto-approve
[2020-11-02T13:39:24.502Z] random_password.db: Refreshing state... [id=none]
[2020-11-02T13:39:24.502Z] random_id.suffix: Refreshing state... [id=algliQ]
[2020-11-02T13:39:26.066Z] aws_sqs_queue.test: Refreshing state... [id=https://sqs.********.amazonaws.com/627286350134/metricbeat-test-6a582589]
[2020-11-02T13:39:26.066Z] aws_s3_bucket.test: Refreshing state... [id=metricbeat-test-6a582589]
[2020-11-02T13:39:32.688Z] aws_s3_bucket_metric.test: Refreshing state... [id=metricbeat-test-6a582589:EntireBucket]
[2020-11-02T13:39:32.688Z] aws_s3_bucket_object.test: Refreshing state... [id=someobject]
[2020-11-02T13:39:36.923Z] aws_db_instance.test: Creating...
[2020-11-02T13:39:37.921Z] 
[2020-11-02T13:39:37.923Z] Error: Error creating DB Instance: InstanceQuotaExceeded: DB Instance quota exceeded
[2020-11-02T13:39:37.923Z] 	status code: 400, request id: c38ef793-efe4-4bdd-8dbf-da184c452612
[2020-11-02T13:39:37.923Z] 
[2020-11-02T13:39:37.923Z]   on terraform.tf line 18, in resource "aws_db_instance" "test":
[2020-11-02T13:39:37.923Z]   18: resource "aws_db_instance" "test" {
[2020-11-02T13:39:37.923Z] 
[2020-11-02T13:39:37.923Z] 
script returned exit code 1

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 2, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 2, 2020

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Test stats 🧪

Test Results
Failed 1
Passed 16382
Skipped 1344
Total 17727

Genuine test errors 1

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

    * **Name**: `Build&Test / filebeat-build / test_symlink_rotated – filebeat.tests.system.test_harvester.Test`

@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 2, 2020

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Started by user Victor Martinez]

  • Start Time: 2020-11-03T09:10:05.791+0000

  • Duration: 65 min 54 sec

Test stats 🧪

Test Results
Failed 1
Passed 16382
Skipped 1344
Total 17727

Test errors 1

Expand to view the tests failures

  • Name: Build&Test / filebeat-build / test_symlink_rotated – filebeat.tests.system.test_harvester.Test

    • Age: 1
    • Duration: 0.845
    • Error Details: AssertionError: expected to see 2 entries, got '[{'id': 'native::8013346-2049', 'timestamp': 1604396243.1689308, 'ttl': -1, 'identifier_name': 'native', 'prev_id': '', 'source': '/go/src/github.com/elastic/beats/filebeat/build/system-tests/run/test_harvester.Test.test_symlink_rotated/log/symlink.log', 'offset': 13, 'type': 'log', 'FileStateOS': {'inode': 8013346, 'device': 2049}, '_key': 'filebeat::logs::native::8013346-2049'}]' assert 1 == 2 + where 1 = len([{'FileStateOS': {'device': 2049, 'inode': 8013346}, '_key': 'filebeat::logs::native::8013346-2049', 'id': 'native::8013346-2049', 'identifier_name': 'native', ...}])

Steps errors 2

Expand to view the steps failures

  • Name: filebeat-build - mage build test

    • Description: mage build test

    • Duration: 22 min 14 sec

    • Start Time: 2020-11-03T09:22:57.045+0000

    • log

  • Name: Error signal

    • Description: Error 'hudson.AbortException: script returned exit code 1'

    • Duration: 0 min 0 sec

    • Start Time: 2020-11-03T09:45:10.581+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-11-03T10:14:31.320Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/auditbeat-crosscompile-1604395491844
[2020-11-03T10:14:31.356Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-dockerlogbeat-build-1604395492343
[2020-11-03T10:14:31.422Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/winlogbeat-Lint-1604395492603
[2020-11-03T10:14:31.457Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/journalbeat-unitTest-1604395497471
[2020-11-03T10:14:31.494Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-elastic-agent-build-1604395498079
[2020-11-03T10:14:31.531Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-functionbeat-Lint-1604395499191
[2020-11-03T10:14:31.568Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/heartbeat-Lint-1604395499534
[2020-11-03T10:14:31.604Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/libbeat-Lint-1604395508443
[2020-11-03T10:14:31.640Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/journalbeat-Lint-1604395510491
[2020-11-03T10:14:31.673Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/filebeat-Lint-1604395526510
[2020-11-03T10:14:31.709Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-filebeat-Lint-1604395537001
[2020-11-03T10:14:31.739Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-winlogbeat-Lint-linux----ubuntu-18-1604395539719
[2020-11-03T10:14:31.776Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-auditbeat-Lint-1604395543349
[2020-11-03T10:14:31.805Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-libbeat-Lint-1604395562389
[2020-11-03T10:14:31.836Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-packetbeat-build-1604395574600
[2020-11-03T10:14:31.868Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-metricbeat-Lint-1604395582571
[2020-11-03T10:14:31.899Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-functionbeat-build-1604395612552
[2020-11-03T10:14:31.930Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/metricbeat-Lint-1604395619237
[2020-11-03T10:14:31.961Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/libbeat-crosscompile-1604395650138
[2020-11-03T10:14:31.990Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-packetbeat-Lint-1604395663399
[2020-11-03T10:14:32.026Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/packetbeat-build-1604395685516
[2020-11-03T10:14:32.064Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/metricbeat-unitTest-1604395726277
[2020-11-03T10:14:32.099Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/heartbeat-build-1604395823341
[2020-11-03T10:14:32.137Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-elastic-agent-windows-windows-2019-1604395824021
[2020-11-03T10:14:32.174Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/auditbeat-build-1604395841999
[2020-11-03T10:14:32.206Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/auditbeat-windows-windows-2019-1604395854248
[2020-11-03T10:14:32.242Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-auditbeat-windows-windows-2019-1604395922591
[2020-11-03T10:14:32.274Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/heartbeat-windows-windows-2019-1604395933091
[2020-11-03T10:14:32.305Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-libbeat-build-1604395940198
[2020-11-03T10:14:32.341Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/winlogbeat-windows-windows-2019-1604395949624
[2020-11-03T10:14:32.374Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-packetbeat-windows-windows-2019-1604395962069
[2020-11-03T10:14:32.411Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-auditbeat-build-1604395962918
[2020-11-03T10:14:32.449Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/metricbeat-crosscompile-1604395966083
[2020-11-03T10:14:32.484Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/filebeat-windows-windows-2019-1604396027424
[2020-11-03T10:14:32.522Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/generator-metricbeat-test-1604396037845
[2020-11-03T10:14:32.557Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/packetbeat-windows-windows-2019-1604396041958
[2020-11-03T10:14:32.593Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-winlogbeat-build-windows-2019-1604396065883
[2020-11-03T10:14:32.629Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-functionbeat-windows-windows-2019-1604396089089
[2020-11-03T10:14:32.661Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-filebeat-windows-windows-2019-1604396091334
[2020-11-03T10:14:32.698Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/generator-beat-test-1604396097530
[2020-11-03T10:14:32.729Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/metricbeat-windows-windows-2019-1604396185498
[2020-11-03T10:14:32.763Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-metricbeat-windows-windows-2019-1604396215002
[2020-11-03T10:14:32.797Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/libbeat-stress-tests-1604396304389
[2020-11-03T10:14:32.834Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/filebeat-build-1604396718451
[2020-11-03T10:14:32.871Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/libbeat-build-1604396767396
[2020-11-03T10:14:32.916Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/metricbeat-goIntegTest-1604397293950
[2020-11-03T10:14:32.962Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/metricbeat-pythonIntegTest-1604397419721
[2020-11-03T10:14:33.004Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-filebeat-build-1604397485851
[2020-11-03T10:14:33.038Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-metricbeat-build-1604398121663
[2020-11-03T10:14:33.376Z] + cat
[2020-11-03T10:14:33.376Z] + /usr/local/bin/runbld ./runbld-test-reports --job-name elastic+beats+pull-request
[2020-11-03T10:14:33.376Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-11-03T10:14:43.390Z] runbld>>> runbld started
[2020-11-03T10:14:43.390Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-11-03T10:14:43.653Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-11-03T10:14:43.653Z] runbld>>> Matches in the system config:
[2020-11-03T10:14:43.653Z] runbld>>> - Matched ^elastic\+beats
[2020-11-03T10:14:43.653Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-11-03T10:14:45.039Z] runbld>>> Debug logging enabled.
[2020-11-03T10:14:45.039Z] runbld>>> Storing result
[2020-11-03T10:14:45.300Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-11-03T10:14:45.300Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20201103101444-417FF132
[2020-11-03T10:14:45.300Z] runbld>>> Adding system facts.
[2020-11-03T10:14:46.691Z] runbld>>> Adding vcs info for the latest commit:  093f0d10ed4ed40a709f5ea0c52f3a7263ce6876
[2020-11-03T10:14:46.691Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-11-03T10:14:46.691Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-11-03T10:14:46.691Z] Processing JUnit reports with runbld...
[2020-11-03T10:14:46.691Z] + echo 'Processing JUnit reports with runbld...'
[2020-11-03T10:14:47.264Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-11-03T10:14:47.264Z] runbld>>> DURATION: 69ms
[2020-11-03T10:14:47.264Z] runbld>>> STDOUT: 40 bytes
[2020-11-03T10:14:47.264Z] runbld>>> STDERR: 49 bytes
[2020-11-03T10:14:47.264Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-11-03T10:14:47.264Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-22356
[2020-11-03T10:14:48.208Z] runbld>>> Storing build metadata: 
[2020-11-03T10:14:48.208Z] runbld>>> Adding test report.
[2020-11-03T10:14:48.208Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats
[2020-11-03T10:14:49.151Z] runbld>>> Found 125 test output files
[2020-11-03T10:14:50.548Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/metricbeat-goIntegTest-1604397293950/metricbeat/build/TEST-go-integration-windows.xml
[2020-11-03T10:14:50.548Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/metricbeat-goIntegTest-1604397293950/metricbeat/build/TEST-go-integration-graphite.xml
[2020-11-03T10:14:52.464Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-metricbeat-build-1604398121663/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-11-03T10:14:52.464Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-metricbeat-build-1604398121663/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-11-03T10:14:52.464Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-metricbeat-build-1604398121663/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-11-03T10:14:52.464Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-metricbeat-build-1604398121663/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-11-03T10:14:52.464Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats/x-pack-metricbeat-build-1604398121663/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-11-03T10:14:52.464Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 17727 Skipped: 1075
[2020-11-03T10:14:52.724Z] runbld>>> Storing result
[2020-11-03T10:14:52.724Z] runbld>>> FAILURES: 1
[2020-11-03T10:14:52.985Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-11-03T10:14:52.985Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20201103101444-417FF132
[2020-11-03T10:14:53.246Z] runbld>>> Email notification disabled by environment variable.
[2020-11-03T10:14:53.247Z] runbld>>> Slack notification disabled by environment variable.
[2020-11-03T10:14:58.570Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-22356/src/github.com/elastic/beats
[2020-11-03T10:14:59.060Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-22356
[2020-11-03T10:14:59.090Z] [INFO] getVaultSecret: Getting secrets
[2020-11-03T10:14:59.154Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-11-03T10:14:59.729Z] + chmod 755 generate-build-data.sh
[2020-11-03T10:14:59.729Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-22356/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-22356/runs/3 FAILURE 3893678
[2020-11-03T10:14:59.729Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-22356/runs/3/steps/?limit=10000 -o steps-info.json
[2020-11-03T10:15:02.957Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-22356/runs/3/tests/?status=FAILED -o tests-errors.json

@andresrc andresrc added the Team:Automation Label for the Observability productivity team label Nov 2, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 2, 2020
Jenkinsfile Outdated Show resolved Hide resolved
@v1v v1v requested a review from a team November 2, 2020 22:09
@v1v v1v self-assigned this Nov 2, 2020
@v1v v1v marked this pull request as ready for review November 2, 2020 22:09
@v1v
Copy link
Member Author

v1v commented Nov 3, 2020

Test error unrelated to this particular change

@v1v v1v merged commit b185d6c into elastic:master Nov 3, 2020
@v1v v1v deleted the feature/delete-cloud-always branch November 3, 2020 10:44
v1v added a commit to v1v/beats that referenced this pull request Nov 3, 2020
v1v added a commit to v1v/beats that referenced this pull request Nov 3, 2020
v1v added a commit to v1v/beats that referenced this pull request Nov 3, 2020
v1v added a commit that referenced this pull request Nov 3, 2020
v1v added a commit that referenced this pull request Nov 3, 2020
v1v added a commit that referenced this pull request Nov 3, 2020
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation ci Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants