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(jenkins): cancel previous running builds #2983

Merged
merged 2 commits into from
Dec 6, 2019

Conversation

v1v
Copy link
Member

@v1v v1v commented Nov 28, 2019

Description

Optimize and abort all the old builds which are still running in the CI then we can reduce the number of active resources, aka Jenkins workers, and being able to have a healthy build queue.

When does it happen?

Only for PRs. As for any branches/tags we want to keep track when a particular build failed. The pipeline for the branches/tags might be slightly different in some cases, sometimes it's required to run more exhaustive tests, benchmarks or other goals.

Issues

  • It depends on the new release of the library. Waiting for build
  • It might not be 100% effective if there are try/catch/catchWarn/catchErr steps within downstream jobs. But that's the closest we can enable this behavior at the moment without tweaking the pipelines.

@v1v v1v self-assigned this Nov 28, 2019
@v1v v1v added the automation label Nov 28, 2019
@v1v v1v added the ci label Nov 28, 2019
@codecov-io
Copy link

codecov-io commented Nov 29, 2019

Codecov Report

Merging #2983 into master will decrease coverage by 0.48%.
The diff coverage is 68.67%.

@@            Coverage Diff             @@
##           master    #2983      +/-   ##
==========================================
- Coverage   78.67%   78.19%   -0.49%     
==========================================
  Files          89       89              
  Lines        4774     4788      +14     
==========================================
- Hits         3756     3744      -12     
- Misses       1018     1044      +26
Impacted Files Coverage Δ
beater/config/config.go 64.7% <0%> (-11.49%) ⬇️
sourcemap/store.go 91.3% <100%> (ø) ⬆️
model/profile/profile.go 100% <100%> (ø) ⬆️
beater/config/rum.go 75% <100%> (ø) ⬆️
idxmgmt/ilm/policy.go 100% <100%> (ø) ⬆️
idxmgmt/supporter.go 85.57% <100%> (ø) ⬆️
idxmgmt/indices.go 88% <100%> (ø) ⬆️
beater/config/instrumentation.go 17.85% <17.85%> (ø) ⬆️
elasticsearch/client.go 39.02% <38.18%> (-16.93%) ⬇️
beater/beater.go 70.89% <60%> (-5.69%) ⬇️
... and 15 more

@v1v v1v requested review from simitt and jalvz November 29, 2019 14:09
@v1v v1v marked this pull request as ready for review November 29, 2019 14:09
@simitt
Copy link
Contributor

simitt commented Dec 2, 2019

@v1v is my assumption right that this change only aborts running builds for the same PR?

@v1v
Copy link
Member Author

v1v commented Dec 3, 2019

@v1v is my assumption right that this change only aborts running builds for the same PR?

@simitt
Yes, it does only kill the old running builds for the same PR. Old running build might be caused either for a pushed commit or a manual trigger in the Jenkins UI.

Is this particular use case helpful in this repo?

@v1v v1v merged commit 7af0dad into elastic:master Dec 6, 2019
@v1v v1v deleted the feature/abort-old-builds branch December 6, 2019 09:42
simitt pushed a commit to simitt/apm-server that referenced this pull request Dec 18, 2019
v1v added a commit to v1v/apm-server that referenced this pull request Mar 6, 2020
v1v added a commit that referenced this pull request Mar 9, 2020
* ci(jenkins): avoid builds in the master worker (#2599)
* ci(jenkins): build and test stages are now merged. (#2614)
* ci(jenkins): rename APM ITs to avoid any misleading (#2629)
* ci(jenkins): revert none agent (#2645)
* ci(jenkins): reuse top level agent (#2774)
* ci(jenkins): update argument (#2904)
* [apm-ci] When asciidoc speedup skip some stages (#2891)
* ci(jenkins): change log rotation, use cached repo (#2970)
* ci(jenkins): use git reference repo (#2971)
* feat: grab docker container logs after run tests (#2948)
* ci(jenkins): shallow cloning doesn't work with isGitRegionMatch (#2998)
* ci(jenkins): cancel previous running builds (#2983)
* feat: enable DIAGNOSTIC_INTERVAL env var (#3032)
* ci(jenkins): when regexp comparator (#2644)
* fix: trigger on _beats changes (#3189)
* ci(jenkins): retry build docker image up to 3 times with some sleep
* Simplify build scripts (#3371)
* ci(jenkins): apm-its-downstream params has changed (#3406)
* fix: build inside a Golang Docker container (#2375)
* ci: move benchmark stage to run in a tool Docker container (#2391)
* add package install test, add labels to script steps (#2268)
* [apm-ci] suppress the NativeCommandError in windows builds (#2890)
* ci(jenkins): fix issues with python3 in branch 6.8 (#3428)
* ci(jenkins): apm-its are not required in the CI Pipeline
v1v added a commit to v1v/apm-server that referenced this pull request Mar 9, 2020
* ci(jenkins): avoid builds in the master worker (elastic#2599)
* ci(jenkins): build and test stages are now merged. (elastic#2614)
* ci(jenkins): rename APM ITs to avoid any misleading (elastic#2629)
* ci(jenkins): revert none agent (elastic#2645)
* ci(jenkins): reuse top level agent (elastic#2774)
* ci(jenkins): update argument (elastic#2904)
* [apm-ci] When asciidoc speedup skip some stages (elastic#2891)
* ci(jenkins): change log rotation, use cached repo (elastic#2970)
* ci(jenkins): use git reference repo (elastic#2971)
* feat: grab docker container logs after run tests (elastic#2948)
* ci(jenkins): shallow cloning doesn't work with isGitRegionMatch (elastic#2998)
* ci(jenkins): cancel previous running builds (elastic#2983)
* feat: enable DIAGNOSTIC_INTERVAL env var (elastic#3032)
* ci(jenkins): when regexp comparator (elastic#2644)
* fix: trigger on _beats changes (elastic#3189)
* ci(jenkins): retry build docker image up to 3 times with some sleep
* Simplify build scripts (elastic#3371)
* ci(jenkins): apm-its-downstream params has changed (elastic#3406)
* fix: build inside a Golang Docker container (elastic#2375)
* ci: move benchmark stage to run in a tool Docker container (elastic#2391)
* add package install test, add labels to script steps (elastic#2268)
* [apm-ci] suppress the NativeCommandError in windows builds (elastic#2890)
* ci(jenkins): fix issues with python3 in branch 6.8 (elastic#3428)
* ci(jenkins): apm-its are not required in the CI Pipeline
v1v added a commit that referenced this pull request Mar 10, 2020
* ci(jenkins): backport commits from long time ago (#3438)
* ci(jenkins): avoid builds in the master worker (#2599)
* ci(jenkins): build and test stages are now merged. (#2614)
* ci(jenkins): rename APM ITs to avoid any misleading (#2629)
* ci(jenkins): revert none agent (#2645)
* ci(jenkins): reuse top level agent (#2774)
* ci(jenkins): update argument (#2904)
* [apm-ci] When asciidoc speedup skip some stages (#2891)
* ci(jenkins): change log rotation, use cached repo (#2970)
* ci(jenkins): use git reference repo (#2971)
* feat: grab docker container logs after run tests (#2948)
* ci(jenkins): shallow cloning doesn't work with isGitRegionMatch (#2998)
* ci(jenkins): cancel previous running builds (#2983)
* feat: enable DIAGNOSTIC_INTERVAL env var (#3032)
* ci(jenkins): when regexp comparator (#2644)
* fix: trigger on _beats changes (#3189)
* ci(jenkins): retry build docker image up to 3 times with some sleep
* Simplify build scripts (#3371)
* ci(jenkins): apm-its-downstream params has changed (#3406)
* fix: build inside a Golang Docker container (#2375)
* ci: move benchmark stage to run in a tool Docker container (#2391)
* add package install test, add labels to script steps (#2268)
* [apm-ci] suppress the NativeCommandError in windows builds (#2890)
* ci(jenkins): fix issues with python3 in branch 6.8 (#3428)
* ci(jenkins): apm-its are not required in the CI Pipeline
* Use python3
* ci(jenkins): remove leftovers from the APM-ITS
* fix: build inside a Golang Docker container (#2375)
* fix: use fixed dependencies on golang Docker container (#2410)
* ci(jenkins): build CI Docker images (#2498)
* partial cherry-pick from #3357

Co-authored-by: Ivan Fernandez Calvo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants