[Stable only] Listing commits from a Dashboard level search is broken
This is the broken build: https://gitlab.com/gitlab-org/gitlab-ee/builds/4177761
I've also tested manually on my local env and the feature is also broken, I'm not sure if we have this implemented because I'm not seeing that we're returning commits
here: https://gitlab.com/gitlab-org/gitlab-ee/blob/d2743a2acdb1e336925e4af68402e71a7047f1cb/lib/gitlab/search_results.rb#L15-28
[ruben@mbp ~/projects/gdk-ee/gitlab (8-12-stable-ee *+)]$ be rspec spec/features/global_search_spec.rb:63
Run options: include {:locations=>{"./spec/features/global_search_spec.rb"=>[63]}}
1) Global elastic search I search through the commits finds commits
Failure/Error: - cache_key = [project.path_with_namespace, commit.id, current_application_settings, note_count]
ActionView::Template::Error:
undefined method `path_with_namespace' for nil:NilClass
# ./app/views/projects/commits/_commit.html.haml:7:in `_app_views_projects_commits__commit_html_haml__1158460471051249691_70327486420960'
# ./app/views/search/results/_commit.html.haml:1:in `_app_views_search_results__commit_html_haml__3349980678009013721_70327479753700'
# ./app/views/search/_results.html.haml:15:in `_app_views_search__results_html_haml___591132083580244919_70327489202860'
# ./app/views/search/show.html.haml:7:in `_app_views_search_show_html_haml___148165346711819408_70327492447460'
# ./lib/gitlab/request_profiler/middleware.rb:15:in `call'
# ./lib/gitlab/middleware/go.rb:16:in `call'
# ./lib/gitlab/middleware/readonly_geo.rb:29:in `call'
# ./lib/gitlab/middleware/static.rb:9:in `call'
# ------------------
# --- Caused by: ---
# NoMethodError:
# undefined method `path_with_namespace' for nil:NilClass
# ./app/views/projects/commits/_commit.html.haml:7:in `_app_views_projects_commits__commit_html_haml__1158460471051249691_70327486420960'
cc: @vsizov