-
- Downloads
Merge branch 'improve-pipeline-processing' into 'master'
Improve pipeline processing ## What does this MR do? This works on top of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5295 trying to solve some edge cases introduced by that Merge Request. The fix switches to a state machine which is already a part of `Ci::Pipeline` and uses events with conditional transitions to switch between pipeline states. This is approach is much more bullet proof and much easier to understand than a previous one where we were calling a `reload_status!` which manually updated `status`. Previous approach become confusing and prone to number of errors. ## Why was this MR needed? This improves changes introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5295 ## What are the relevant issue numbers? None, yet. ## Screenshots (if relevant) Not needed. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added (not needed since changelog for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5295 is already introduced) - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added (not needed) - Tests - [x] Added for this feature/bug (most of tests do cover the triggering of Pipeline) - [ ] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5782
No related branches found
No related tags found
Showing
- app/models/ci/build.rb 20 additions, 19 deletionsapp/models/ci/build.rb
- app/models/ci/pipeline.rb 57 additions, 16 deletionsapp/models/ci/pipeline.rb
- app/models/commit_status.rb 12 additions, 8 deletionsapp/models/commit_status.rb
- app/services/ci/create_pipeline_service.rb 3 additions, 2 deletionsapp/services/ci/create_pipeline_service.rb
- app/services/ci/process_pipeline_service.rb 1 addition, 1 deletionapp/services/ci/process_pipeline_service.rb
- features/steps/shared/builds.rb 1 addition, 3 deletionsfeatures/steps/shared/builds.rb
- spec/features/projects/pipelines_spec.rb 8 additions, 9 deletionsspec/features/projects/pipelines_spec.rb
- spec/lib/ci/charts_spec.rb 9 additions, 8 deletionsspec/lib/ci/charts_spec.rb
- spec/models/build_spec.rb 4 additions, 2 deletionsspec/models/build_spec.rb
- spec/models/ci/pipeline_spec.rb 93 additions, 37 deletionsspec/models/ci/pipeline_spec.rb
- spec/requests/api/builds_spec.rb 6 additions, 6 deletionsspec/requests/api/builds_spec.rb
- spec/services/ci/image_for_build_service_spec.rb 0 additions, 2 deletionsspec/services/ci/image_for_build_service_spec.rb
Please register or sign in to comment