Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql2::Error: Data too long for column 'body' at row 1: INSERT INTO comments #3584

Closed
hennevogel opened this issue Aug 11, 2017 · 3 comments
Labels
Bug Frontend Things related to the OBS RoR app

Comments

@hennevogel
Copy link
Member

comments#create threw this 5 times

Mysql2::Error: Data too long for column 'body' at row 1: INSERT INTO `comments` (`body`, `created_at`, `updated_at`, `user_id`, `commentable_type`, `commentable_id`) VALUES ('<!-- RepoChecker state=seen result=failed -->\n\n## x86_64\n\n### [install check & file conflicts](/package/view_file/openSUSE:Factory:Staging/dashboard/repo_checker)\n\n```\ncan\'t install ruby2.4-rubygem-fluentd-0.14.20-10.1.x86_64:\n  nothing provides rubygem(ruby:2.4.0:ruby_dig:0.0) >= 0.0.2 needed by ruby2.4-rubygem-fluentd-0.14.20-10.1.x86_64\ncan\'t install ruby2.4-rubygem-quiet_assets-1.1.0-1.1.x86_64:\n  package ruby2.4-rubygem-quiet_assets-1.1.0-1.1.x86_64 requires rubygem(ruby:2.4.0:railties) < 5.0, but none of the providers can be installed\n  nothing provides rubygem(ruby:2.4.0:actionpack) = 4.2.8 needed by ruby2.4-rubygem-railties-4_2-4.2.8-1.1.x86_64\n    (we have ruby2.4-rubygem-actionpack-5_0-5.0.5-15.1.x86_64)\n    (we have ruby2.4-rubygem-actionpack-4_2-4.2.9-26.1.x86_64)\n  nothing provides rub

https://api.opensuse.org/comments/project/openSUSE:Factory:Staging:adi:298"

See this exception on Errbit

@hennevogel hennevogel added Bug Frontend Things related to the OBS RoR app labels Aug 11, 2017
@hennevogel hennevogel changed the title [production][comments#create] Mysql2::Error: Data too long for column 'body' at row 1: INSERT INTO comments (body, `created... Mysql2::Error: Data too long for column 'body' at row 1: INSERT INTO comments Aug 11, 2017
@hennevogel
Copy link
Member Author

Comment should have a validation for body length so we can tell our users instead of crashing...

@jberry-suse
Copy link
Contributor

What is the length limit so I can enforce that on the bot instead of the power of two I picked?

@mschnitzer
Copy link
Member

@jberry-suse the maximum length is set to 65535 chars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Frontend Things related to the OBS RoR app
Projects
None yet
Development

No branches or pull requests

3 participants