Search in wiki returns 500 error after update to latest version
Summary
Hello, I am experiencing a problem when I am trying to search anything in wiki in one of the projects. It happened after I updated a docker image of Gitlab to 11.0.3, we always trying to use latest version. I just receive 500 error, no matter which string i put into search field. Also, during the search in whole project, i noticed that there always one result in wiki, no matter what I put into search, but when I click to show results in wiki, it returns same 500 error. Still I can watch any page in wiki, the error only occurs while searching. The fsck tells that everything is ok. I can clone and push wiki. I've tried to reset commits one by one, till the initial commit. When there is no files in wiki it doesn't return an error during search. Also, I've tried to write a wiki from blank, but once I create first page, the search breaks. Same problem if I push wiki into fork of this problematic project, but no problem if I push it into any other project.
Steps to reproduce
Try to update gitlab docker image to latest.
What is the current bug behavior?
Search of any string in project shows that there is always one match in wiki. When I'm trying to see what was found there - it returns 500. Search of any string in wiki returns 500 error.
What is the expected correct behavior?
Search in project must return correct number of matches in wiki. Search in wiki must return some result, not an error.
Relevant logs and/or screenshots
ActionView::Template::Error (No route matches {:action=>"show", :controller=>"projects/wikis", :id=>nil, :namespace_id=>#<Group id:2 @some>, :project_id=>#<Project id:1 some/project>} missing required keys: [:id]):
1: - project = find_project_for_result_blob(wiki_blob)
2: - file_name, wiki_blob = parse_search_result(wiki_blob)
3: - wiki_blob_link = project_wiki_path(project, wiki_blob.basename)
4:
5: = render partial: 'search/results/blob_data', locals: { blob: wiki_blob, project: project, file_name: file_name, blob_link: wiki_blob_link }
config/application.rb:194:in `block (4 levels) in <class:Application>'
app/views/search/results/_wiki_blob.html.haml:3:in `_app_views_search_results__wiki_blob_html_haml__537291482784312381_70166135049900'
app/views/search/_results.html.haml:23:in `_app_views_search__results_html_haml___262231160528593106_70166133715640'
app/views/search/show.html.haml:9:in `_app_views_search_show_html_haml___27086450643491281_70166126776520'
lib/gitlab/i18n.rb:50:in `with_locale'
lib/gitlab/i18n.rb:56:in `with_user_locale'
app/controllers/application_controller.rb:362:in `set_locale'
lib/gitlab/middleware/multipart.rb:95:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only/controller.rb:28:in `call'
lib/gitlab/middleware/read_only.rb:16:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
lib/gitlab/middleware/release_env.rb:10:in `call'
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.17.1 Sidekiq Version:5.1.3 Go Version: unknown
GitLab information Version: 11.0.3 Revision: aa62075 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://somewhere.com HTTP Clone URL: https://somewhere.com/some-group/some-project.git SSH Clone URL: git@somewhere.com:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 7.1.4 Repository storage paths: default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 7.1.4 ? ... OK (7.1.4) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 2/1 ... ok 9/2 ... ok 2/3 ... ok 2/4 ... ok 9/5 ... ok 2/6 ... ok 9/7 ... ok 9/9 ... ok 2/10 ... ok 9/11 ... ok 9/12 ... ok 4/13 ... ok 13/20 ... ok 13/22 ... ok 13/23 ... ok 13/25 ... ok 4/26 ... ok 5/29 ... ok 22/34 ... ok 22/35 ... ok 5/36 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 9/2 ... yes 2/3 ... yes 2/4 ... yes 9/5 ... yes 2/6 ... yes 9/7 ... yes 9/9 ... yes 2/10 ... yes 9/11 ... yes 9/12 ... yes 4/13 ... yes 13/20 ... yes 13/22 ... yes 13/23 ... yes 13/25 ... yes 4/26 ... yes 5/29 ... yes 22/34 ... yes 22/35 ... yes 5/36 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 16
Checking GitLab ... Finished