From version 10.5 existing wiki not working
Summary
We use GitLab official docker-images using docker-compose (just the latest always). After updating to 10.5 one of our wiki sopped working producing 500 error.
Steps to reproduce
Put a file in iso-8859-1
inside your repo locally and push it to wiki repo.
Example file: file.txt
Example Project
We use docker-compose.yml
with service like this one:
gitlab:
image: gitlab/gitlab-ce
restart: always
volumes:
- /srv/gitlab/config:/etc/gitlab
- /srv/gitlab/logs:/var/log/gitlab
- /srv/gitlab/data:/var/opt/gitlab
ports:
What is the current bug behavior?
Following Wiki
link produces page with 500 error.
What is the expected correct behavior?
Home wiki page.
Relevant logs and/or screenshots
==> /var/log/gitlab/gitlab-rails/production.log <==
ArgumentError (invalid byte sequence in UTF-8):
lib/gitlab/git/wiki_page.rb:24:in `initialize'
lib/gitlab/git/wiki.rb:177:in `new'
lib/gitlab/git/wiki.rb:177:in `new_page'
lib/gitlab/git/wiki.rb:261:in `block in gollum_get_all_pages'
lib/gitlab/git/wiki.rb:261:in `map'
lib/gitlab/git/wiki.rb:261:in `gollum_get_all_pages'
lib/gitlab/git/wiki.rb:66:in `block in pages'
lib/gitlab/gitaly_client.rb:232:in `block (2 levels) in migrate'
lib/gitlab/gitaly_client.rb:274:in `allow_n_plus_1_calls'
lib/gitlab/gitaly_client.rb:227:in `block in migrate'
lib/gitlab/metrics/influx_db.rb:98:in `measure'
lib/gitlab/gitaly_client.rb:225:in `migrate'
lib/gitlab/git/repository.rb:1338:in `gitaly_migrate'
lib/gitlab/git/wiki.rb:62:in `pages'
app/models/project_wiki.rb:80:in `pages'
app/controllers/projects/wikis_controller.rb:109:in `load_project_wiki'
lib/gitlab/i18n.rb:47:in `with_locale'
lib/gitlab/i18n.rb:53:in `with_user_locale'
app/controllers/application_controller.rb:325: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.rb:31:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27: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.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknownGitLab information Version: 10.5.2 Revision: b951e0d Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://calypso.lab.dtag.de HTTP Clone URL: https://calypso.lab.dtag.de/some-group/some-project.git SSH Clone URL: git@calypso.lab.dtag.de:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 6.0.3 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 >= 6.0.3 ? ... OK (6.0.3) 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 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 Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.9.5 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 15
Checking GitLab ... Finished
Possible fixes
Convert file to utf-8 (f.e. using iconv -f iso-8859-1 -t utf-8
)