Port of 31189-pipelines-error-state to EE
Port of 31189-pipelines-error-state to EE
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10835
Port of 31189-pipelines-error-state to EE
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10835