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] cancel old builds #18317

Merged
merged 2 commits into from
May 12, 2020
Merged

[CI] cancel old builds #18317

merged 2 commits into from
May 12, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented May 6, 2020

What does this PR do?

Enable cancel old builds. If enabled then the GitHub PR comments will notify the build has been aborted (there is an open issue to disable the notifications for this particular case)

Why is it important?

Avoid wasting build cycles for old commits

How to test this PR locally

We can comment Jenkins run the tests please a few times to validate it works as expected

Build number 3 was caused with the comment: #18317 (comment) and number 4 with the comment: #18317 (comment)

image

image

Use cases

Sequential builds mean slow feedback while concurrent builds mean faster feedback but as a downside it means more resources, aka money. So this will help to align the quick feedback with less resources.

On the other hand, we will be working on the GitHub PR comments to avoid any kind of feedback if the build got aborted.

Questions

  • How to delete the cloud scenarios that have been created?

image

They run as a specific post-cleanup stage:

  • beats/Jenkinsfile

    Lines 384 to 388 in 8f16020

    post {
    cleanup {
    terraformCleanup('x-pack-metricbeat', 'x-pack/metricbeat')
    }
    }

Tasks

  • Categorise build status for ABORTED and UNSTABLE. NOTE: we are working on levelling the build status report with something like:
Expand to view screenshots

image

image

image

@v1v v1v self-assigned this May 6, 2020
@v1v v1v added the automation label May 6, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 6, 2020
@v1v v1v added Team:Automation Label for the Observability productivity team ci and removed needs_team Indicates that the issue/PR needs a Team:* label labels May 6, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 6, 2020

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Started by user Victor Martinez]

  • Start Time: 2020-05-12T11:14:40.227+0000

  • Duration: 80 min 57 sec (4797177)

Test stats 🧪

Test Results
Failed 1
Passed 7654
Skipped 1225
Total 8880

Test errors

Expand to view the tests failures

  • Name: Build and Test / Auditbeat oss / Auditbeat Windows / TestIncludedExcludedFiles – file_integrity

    • Status: FAILED
    • Age: 1
    • Duration: 0.23
    • Error Details: Failed

Steps errors

Expand to view the steps failures

  • Name: Mage build unitTest

    • Description: mage build unitTest

    • Result: FAILURE

    • Duration: 4 min 11 sec

    • Start Time: 2020-05-12T12:13:29.701+0000

    • log

  • Name: Make -C libbeat testsuite

    • Description: make -C libbeat testsuite

    • Result: FAILURE

    • Duration: 26 min 28 sec

    • Start Time: 2020-05-12T11:42:57.885+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-05-12T12:34:10.500Z] + FILE=heartbeat/build/coverage/full.cov
[2020-05-12T12:34:10.500Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-05-12T12:34:10.500Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-12T12:34:10.500Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-12T12:34:10.500Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-12T12:34:10.500Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-12T12:34:10.500Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-12T12:34:10.500Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-12T12:34:10.500Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-12T12:34:10.500Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-12T12:34:10.500Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-12T12:34:10.500Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-12T12:34:10.945Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats
[2020-05-12T12:34:11.257Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-12T12:34:11.273Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Lint
[2020-05-12T12:34:11.352Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-05-12T12:34:11.429Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-12T12:34:11.523Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-12T12:34:11.597Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-12T12:34:11.692Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-12T12:34:11.764Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-05-12T12:34:11.838Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-12T12:34:11.918Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-12T12:34:11.990Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-12T12:34:12.066Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-12T12:34:12.139Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-12T12:34:12.209Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-12T12:34:12.277Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-12T12:34:12.344Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-12T12:34:12.411Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-12T12:34:12.475Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-05-12T12:34:12.540Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-12T12:34:12.606Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-12T12:34:12.670Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-05-12T12:34:12.735Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-12T12:34:12.803Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-12T12:34:12.869Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-12T12:34:12.944Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-12T12:34:13.009Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Filebeat-x-pack
[2020-05-12T12:34:13.079Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-12T12:34:13.143Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-05-12T12:34:13.208Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Auditbeat-Mac-OS-X
[2020-05-12T12:34:13.275Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Libbeat-oss
[2020-05-12T12:34:13.342Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Filebeat-oss
[2020-05-12T12:34:13.407Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-12T12:34:13.470Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-12T12:34:13.536Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-12T12:34:13.601Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-12T12:34:13.667Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Auditbeat-Windows
[2020-05-12T12:34:13.731Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-05-12T12:34:13.796Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-05-12T12:34:13.860Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-12T12:34:14.217Z] + cat
[2020-05-12T12:34:14.217Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-12T12:34:14.217Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-12T12:34:20.828Z] runbld>>> runbld started
[2020-05-12T12:34:20.828Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-12T12:34:22.755Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-18317' in order of occurrence in the config (last value wins).
[2020-05-12T12:34:24.144Z] runbld>>> Debug logging enabled.
[2020-05-12T12:34:24.144Z] runbld>>> Storing result
[2020-05-12T12:34:24.144Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-12T12:34:24.144Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200512123423-670610EE
[2020-05-12T12:34:24.144Z] runbld>>> Adding system facts.
[2020-05-12T12:34:25.090Z] runbld>>> Adding vcs info for the latest commit:  b4c60cd4564077548af7cd0d52815ec96b1934a7
[2020-05-12T12:34:25.090Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-12T12:34:25.090Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-12T12:34:25.090Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-12T12:34:25.090Z] Processing JUnit reports with runbld...
[2020-05-12T12:34:25.665Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-12T12:34:25.665Z] runbld>>> DURATION: 10ms
[2020-05-12T12:34:25.665Z] runbld>>> STDOUT: 40 bytes
[2020-05-12T12:34:25.665Z] runbld>>> STDERR: 49 bytes
[2020-05-12T12:34:25.665Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-12T12:34:25.665Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats
[2020-05-12T12:34:27.052Z] runbld>>> Storing build metadata: 
[2020-05-12T12:34:27.052Z] runbld>>> Adding test report.
[2020-05-12T12:34:27.052Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats
[2020-05-12T12:34:27.997Z] runbld>>> Found 101 test output files
[2020-05-12T12:34:28.576Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-12T12:34:28.576Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-12T12:34:28.576Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-12T12:34:28.576Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-12T12:34:28.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-12T12:34:28.840Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-12T12:34:29.417Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-12T12:34:29.417Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-12T12:34:29.993Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 8730 Skipped: 1009
[2020-05-12T12:34:30.254Z] runbld>>> Storing result
[2020-05-12T12:34:30.254Z] runbld>>> FAILURES: 1
[2020-05-12T12:34:30.516Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-12T12:34:30.516Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200512123423-670610EE
[2020-05-12T12:34:30.516Z] runbld>>> Email notification disabled by environment variable.
[2020-05-12T12:34:30.516Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-12T12:34:36.518Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18317
[2020-05-12T12:34:36.769Z] [INFO] getVaultSecret: Getting secrets
[2020-05-12T12:34:36.825Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-12T12:34:37.678Z] + chmod 755 generate-build-data.sh
[2020-05-12T12:34:37.678Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18317/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18317/runs/8 FAILURE 4797177
[2020-05-12T12:34:38.229Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18317/runs/8/steps/?limit=10000 -o steps-info.json
[2020-05-12T12:34:39.573Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18317/runs/8/tests/?status=FAILED -o tests-errors.json

@v1v
Copy link
Member Author

v1v commented May 6, 2020

jenkins run the tests please

1 similar comment
@v1v
Copy link
Member Author

v1v commented May 6, 2020

jenkins run the tests please

@v1v v1v marked this pull request as ready for review May 8, 2020 12:20
@v1v v1v requested review from andrewkroh, urso and a team May 8, 2020 12:21
@v1v v1v changed the title ci: cancel old builds [CI] cancel old builds May 8, 2020
@v1v
Copy link
Member Author

v1v commented May 12, 2020

jenkins run the tests please

@v1v v1v merged commit b696540 into elastic:master May 12, 2020
@v1v v1v deleted the feature/cancel-old-builds branch May 12, 2020 14:21
v1v added a commit to v1v/beats that referenced this pull request May 12, 2020
v1v added a commit to v1v/beats that referenced this pull request May 12, 2020
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.

6 participants