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 #18317 to 7.x: [CI] cancel old builds #18452

Merged
merged 1 commit into from
May 13, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented May 12, 2020

Backports the following commits to 7.x:

Original message:

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

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 12, 2020
@v1v v1v changed the title [7.x] [CI] cancel old builds (#18317) Cherry-pick #18317 to 7.x: [CI] cancel old builds May 12, 2020
@v1v v1v requested a review from kuisathaverat May 12, 2020 14:23
@v1v v1v self-assigned this May 12, 2020
@v1v v1v added backport Team:Automation Label for the Observability productivity team and removed needs_team Indicates that the issue/PR needs a Team:* label labels May 12, 2020
@elasticmachine
Copy link
Collaborator

❕ Build Aborted

Either there was a build timeout or someone aborted the build.'}

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 4704
Skipped 771
Total 5475

Log output

Expand to view the last 100 lines of log output

[2020-05-12T15:57:20.238Z] + curl -sSLo codecov https://codecov.io/bash
[2020-05-12T15:57:20.516Z] + FILE=auditbeat/build/coverage/full.cov
[2020-05-12T15:57:20.517Z] + [ -f auditbeat/build/coverage/full.cov ]
[2020-05-12T15:57:20.517Z] + FILE=filebeat/build/coverage/full.cov
[2020-05-12T15:57:20.517Z] + [ -f filebeat/build/coverage/full.cov ]
[2020-05-12T15:57:20.517Z] + FILE=heartbeat/build/coverage/full.cov
[2020-05-12T15:57:20.517Z] + [ -f heartbeat/build/coverage/full.cov ]
[2020-05-12T15:57:20.517Z] + FILE=libbeat/build/coverage/full.cov
[2020-05-12T15:57:20.517Z] + [ -f libbeat/build/coverage/full.cov ]
[2020-05-12T15:57:20.517Z] + FILE=metricbeat/build/coverage/full.cov
[2020-05-12T15:57:20.517Z] + [ -f metricbeat/build/coverage/full.cov ]
[2020-05-12T15:57:20.517Z] + FILE=packetbeat/build/coverage/full.cov
[2020-05-12T15:57:20.517Z] + [ -f packetbeat/build/coverage/full.cov ]
[2020-05-12T15:57:20.517Z] + FILE=winlogbeat/build/coverage/full.cov
[2020-05-12T15:57:20.517Z] + [ -f winlogbeat/build/coverage/full.cov ]
[2020-05-12T15:57:20.517Z] + FILE=journalbeat/build/coverage/full.cov
[2020-05-12T15:57:20.517Z] + [ -f journalbeat/build/coverage/full.cov ]
[2020-05-12T16:25:30.154Z] Cancelling nested steps due to timeout
[2020-05-12T16:25:30.286Z] Failed in branch Filebeat x-pack
[2020-05-12T16:25:31.372Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats
[2020-05-12T16:25:31.712Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-05-12T16:25:31.737Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Lint
[2020-05-12T16:25:31.874Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-05-12T16:25:32.009Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Winlogbeat-oss
[2020-05-12T16:25:32.147Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-05-12T16:25:32.288Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Dockerlogbeat
[2020-05-12T16:25:32.430Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-05-12T16:25:32.571Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Journalbeat-oss
[2020-05-12T16:25:32.708Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-05-12T16:25:32.847Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-05-12T16:25:32.996Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Heartbeat-oss
[2020-05-12T16:25:33.133Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-05-12T16:25:33.282Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-05-12T16:25:33.419Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-05-12T16:25:33.560Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Libbeat-x-pack
[2020-05-12T16:25:33.697Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Filebeat-Windows
[2020-05-12T16:25:33.832Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Packetbeat-oss
[2020-05-12T16:25:33.972Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Auditbeat-Linux
[2020-05-12T16:25:34.111Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-05-12T16:25:34.247Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-Windows
[2020-05-12T16:25:34.391Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Heartbeat-Windows
[2020-05-12T16:25:34.538Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-05-12T16:25:34.681Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-05-12T16:25:34.823Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Libbeat-oss
[2020-05-12T16:25:34.977Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Filebeat-oss
[2020-05-12T16:25:35.146Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Auditbeat-Windows
[2020-05-12T16:25:35.292Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Functionbeat-Windows
[2020-05-12T16:25:35.429Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-Python-integration-tests
[2020-05-12T16:25:35.566Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Libbeat-crosscompile
[2020-05-12T16:25:35.708Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Libbeat-stress-tests
[2020-05-12T16:25:35.842Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests
[2020-05-12T16:25:35.982Z] Running in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-05-12T16:25:36.409Z] + cat
[2020-05-12T16:25:36.410Z] + /usr/local/bin/runbld ./runbld-script
[2020-05-12T16:25:36.410Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-05-12T16:25:43.010Z] runbld>>> runbld started
[2020-05-12T16:25:43.011Z] runbld>>> 1.6.11/a66728ff8f4356963772e6e6d2069392fa06acbe
[2020-05-12T16:25:44.396Z] runbld>>> The following profiles matched the job 'Beats/beats-beats-mbp/PR-18452' in order of occurrence in the config (last value wins).
[2020-05-12T16:25:45.783Z] runbld>>> Debug logging enabled.
[2020-05-12T16:25:45.783Z] runbld>>> Storing result
[2020-05-12T16:25:45.783Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-05-12T16:25:45.783Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200512162545-FECB0F9B
[2020-05-12T16:25:45.783Z] runbld>>> Adding system facts.
[2020-05-12T16:25:46.727Z] runbld>>> Adding vcs info for the latest commit:  43c1f229d11525ae93eff251236f3c5e23b628ab
[2020-05-12T16:25:46.989Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-05-12T16:25:47.250Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-05-12T16:25:47.250Z] Processing JUnit reports with runbld...
[2020-05-12T16:25:47.250Z] + echo 'Processing JUnit reports with runbld...'
[2020-05-12T16:25:47.512Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-05-12T16:25:47.512Z] runbld>>> DURATION: 24ms
[2020-05-12T16:25:47.512Z] runbld>>> STDOUT: 40 bytes
[2020-05-12T16:25:47.512Z] runbld>>> STDERR: 49 bytes
[2020-05-12T16:25:47.512Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-05-12T16:25:47.512Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats
[2020-05-12T16:25:48.899Z] runbld>>> Storing build metadata: 
[2020-05-12T16:25:48.899Z] runbld>>> Adding test report.
[2020-05-12T16:25:48.899Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats
[2020-05-12T16:25:49.844Z] runbld>>> Found 89 test output files
[2020-05-12T16:25:50.417Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-05-12T16:25:50.417Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-05-12T16:25:50.417Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-05-12T16:25:50.680Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-05-12T16:25:50.680Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-05-12T16:25:50.680Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-cloudfoundry.xml
[2020-05-12T16:25:50.943Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-05-12T16:25:51.207Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452/src/github.com/elastic/beats/Metricbeat-OSS-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-05-12T16:25:51.472Z] runbld>>> Test output logs contained: Errors: 0 Failures: 0 Tests: 5325 Skipped: 588
[2020-05-12T16:25:51.733Z] runbld>>> Storing result
[2020-05-12T16:25:51.733Z] runbld>>> FAILURES: 0
[2020-05-12T16:25:51.996Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-05-12T16:25:51.996Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200512162545-FECB0F9B
[2020-05-12T16:25:51.996Z] runbld>>> Email notification disabled by environment variable.
[2020-05-12T16:25:51.996Z] runbld>>> Slack notification disabled by environment variable.
[2020-05-12T16:25:57.585Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats-beats-mbp_PR-18452
[2020-05-12T16:25:57.751Z] [INFO] getVaultSecret: Getting secrets
[2020-05-12T16:25:57.811Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-05-12T16:25:58.681Z] + chmod 755 generate-build-data.sh
[2020-05-12T16:25:58.681Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18452/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18452/runs/1 ABORTED 7382929
[2020-05-12T16:25:59.232Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18452/runs/1/steps/?limit=10000 -o steps-info.json
[2020-05-12T16:25:59.783Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats-beats-mbp/PR-18452/runs/1/tests/?status=FAILED -o tests-errors.json

@v1v v1v merged commit 824dec0 into elastic:7.x May 13, 2020
@v1v v1v deleted the backport/7.x/pr-18317 branch May 13, 2020 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants