BigW Consortium Gitlab
Don't fail builds for projects that are deleted when they are stuck ## What does this MR do? Solves when dropping stuck connection. ``` Dropping stuck pending build 1545510 for runner NoMethodError: undefined method `origin_merge_requests' for nil:NilClass from /opt/gitlab/embedded/service/gitlab-rails/app/services/merge_requests/base_service.rb:50:in `merge_request_from' from /opt/gitlab/embedded/service/gitlab-rails/app/services/merge_requests/base_service.rb:57:in `each_merge_request' from /opt/gitlab/embedded/service/gitlab-rails/app/services/merge_requests/add_todo_when_build_fails_service.rb:5:in `execute' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/instrumentation.rb:164:in `execute' from /opt/gitlab/embedded/service/gitlab-rails/app/models/commit_status.rb:51:in `block (2 levels) in <class:CommitStatus>' from /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/state_machines-0.4.0/lib/state_machines/eval_helpers.rb:79:in `call' ... ``` This happens, because that `default_scope` of `Projects` filters returns the projects that are not deleted, where `Ci::Build` doesn't take into account. See merge request !4609
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
repository_check | Loading commit data... | |
admin_email_worker.rb | Loading commit data... | |
build_email_worker.rb | Loading commit data... | |
delete_user_worker.rb | Loading commit data... | |
email_receiver_worker.rb | Loading commit data... | |
emails_on_push_worker.rb | Loading commit data... | |
expire_build_artifacts_worker.rb | Loading commit data... | |
gitlab_shell_one_shot_worker.rb | Loading commit data... | |
gitlab_shell_worker.rb | Loading commit data... | |
irker_worker.rb | Loading commit data... | |
merge_worker.rb | Loading commit data... | |
new_note_worker.rb | Loading commit data... | |
post_receive.rb | Loading commit data... | |
project_cache_worker.rb | Loading commit data... | |
project_destroy_worker.rb | Loading commit data... | |
project_service_worker.rb | Loading commit data... | |
project_web_hook_worker.rb | Loading commit data... | |
repository_archive_cache_worker.rb | Loading commit data... | |
repository_fork_worker.rb | Loading commit data... | |
repository_import_worker.rb | Loading commit data... | |
stuck_ci_builds_worker.rb | Loading commit data... | |
system_hook_worker.rb | Loading commit data... |