Unable to add larger GPG key on MySQL
Summary
Can not add larger GPG key when using MySQL (500 error)
Steps to reproduce
Add larger GPG key via https://gitar.io/profile/gpg_keys - for example a GPG key that contains multiple email addresses and a profile image.
Relevant logs and/or screenshots
ActiveRecord::StatementInvalid (Mysql2::Error: Data too long for column 'key' at row 1: INSERT INTO `gpg_keys` (`primary_keyid`, `fingerprint`, `key`, `user_id`, `created_at`,
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 9.4 Current User: git Using RVM: no Ruby Version: 2.3.7p456 Gem Version: 2.5.2.3 Bundler Version:1.16.2 Rake Version: 12.3.0 Redis Version: 3.2.6 Git Version: 2.17.0 Sidekiq Version:5.0.5 Go Version: go1.8.7 linux/amd64
GitLab information Version: 10.7.3 Revision: 2555d6c1a2 Directory: /home/git/gitlab DB Adapter: mysql2 URL: https://gitar.io HTTP Clone URL: https://gitar.io/some-group/some-project.git SSH Clone URL: git@gitar.io:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 7.1.2 Repository storage paths:
- default: /home/git/repositories Hooks: /home/git/gitlab-shell/hooks Git: /usr/local/bin/git
Possible fixes
A fix similar to this MR: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11024. I do understand that the GitLab team does not want to support MySQL, but I truly feel that if migrations are properly implemented this is a non-issue. E.g. by using LONGTEXT
instead of TEXT
.