External CI calls can render 502 error in a merge request view
This originated in: https://gitlab.com/gitlab-com/support-forum/issues/683#note_11661210
Customer had Bamboo CI configured an internal IP that would cause a TCP timeout:
ActionView::Template::Error (Connection timed out - connect(2) for "192.168.9.12" port 8085):
28: = succeed "." do
29: = link_to commit.short_id, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, commit), class: "monospace"
30: %span.ci-coverage
31: - if details_path = ci_build_details_path(@merge_request)
32: = link_to "View details", details_path, :"data-no-turbolink" => "data-no-turbolink"
33:
34: .ci_widget
app/models/project_services/bamboo_service.rb:95:in `build_info'
app/models/project_services/bamboo_service.rb:100:in `build_page'
lib/gitlab/metrics/instrumentation.rb:153:in `build_page'
app/helpers/merge_requests_helper.rb:30:in `ci_build_details_path'
app/views/projects/merge_requests/widget/_heading.html.haml:31:in `block in _app_views_projects_merge_requests_widget__heading_html_haml__1481861020440508293_158512440'
app/views/projects/merge_requests/widget/_heading.html.haml:20:in `each'
app/views/projects/merge_requests/widget/_heading.html.haml:20:in `_app_views_projects_merge_requests_widget__heading_html_haml__1481861020440508293_158512440'
app/views/projects/merge_requests/widget/_open.html.haml:2:in `_app_views_projects_merge_requests_widget__open_html_haml__3532569239728239743_159101640'
app/views/projects/merge_requests/widget/_show.html.haml:2:in `_app_views_projects_merge_requests_widget__show_html_haml___3198619599008921208_159466380'
app/views/projects/merge_requests/_show.html.haml:40:in `_app_views_projects_merge_requests__show_html_haml___849612320579757485_161710560'
app/views/projects/merge_requests/show.html.haml:1:in `_app_views_projects_merge_requests_show_html_haml__4510722706113528116_161739480'
app/controllers/projects/merge_requests_controller.rb:59:in `show'
lib/gitlab/metrics/rack_middleware.rb:17:in `block in call'
lib/gitlab/metrics/transaction.rb:45:in `run'
lib/gitlab/metrics/rack_middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/middleware/readonly_geo.rb:29:in `call'
I'm not sure it's a good idea to allow any of these CI services to make blocking calls. Can we load this asynchronously?
Edited by Jason Yavorska