Add auto-cancel for pending pipelines on branch, if they are not HEAD
What does this MR do?
Decrease entropy in Gitlab universe
First iteration for #8998 (closed)
-
Adds option "Auto-cancel pending pipelines" in "CI/CD Pipelines" project settings tab: when checkbox checked, all pending non-HEAD pipelines will be canceled by system, automatizing scenario:
1. "User creates pipeline for branch" / "User pushes commit to gitlab" 2. User goes to pipelines index page and cancel unnecessary (only pending) pipelines. -
Adds
target: '_blank'to doc links in "CI/CD Pipelines" project settings tab -
Refactor
spec/services/ci/create_pipeline_service_spec.rb, extractingexecute_servicemethod
UI:
- Pipeline list:
- Tooltip on canceled status badge
- MR widget/commit widget:
-
Pipeline #12345678 was auto-canceled.. etc - Hovering over the words
auto-canceledwill bring the same tooltips
-
- Pipeline page:
- Tooltip on canceled status badge
- Pipeline graph job node:
- has improved tooltip with
auto-canceled(not anything else)
- has improved tooltip with
- Mini pipeline graph stage and job status icons
- has improved tooltip with
auto-canceled(not anything else)
- has improved tooltip with
- Job list
- Tooltip on canceled status badge
- Job list in pipeline view
- Tooltip on canceled status badge
- Job view
- Tooltip on canceled status badge
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Many reasons are discussed here #8998 (closed)
Screenshots (if relevant)
Option in CI/CD Pipelines Project settings tab:
Pipeline list:
Pipeline page:
Job list:
Job view:
Job list in pipeline view:
Setting:
Does this MR meet the acceptance criteria?
- Changelog entry added
- Documentation created/updated
- API support added
- Tests
- Added for this feature/bug
- All builds are passing
- Conform by the merge request performance guides
- Conform by the style guides
- Branch has no merge conflicts with
master(if it does - rebase it please) - Squashed related commits together






