Created attachment 920501 [details] PgError when arch name exceeds 255 characters Description of problem: I was trying to perform boundary test are created a new architecture with more than 255 characters in name and UI raises following error: Error PGError: ERROR: value too long for type character varying(255) : INSERT INTO "architectures" ("created_at", "hostgroups_count", "hosts_count", "name", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" Version-Release number of selected component (if applicable): sat6 GA snap1 How reproducible: always Steps to Reproduce: 1. create arch with name more 255 char 2. 3. Actual results: Error PGError: ERROR: value too long for type character varying(255) : INSERT INTO "architectures" ("created_at", "hostgroups_count", "hosts_count", "name", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" Expected results: A proper validation error should be raised. Additional info: Processing by ArchitecturesController#create as */* Parameters: {"utf8"=>"✓", "search"=>"", "authenticity_token"=>"XLkNroe/1GYA+eEExa2V5ge+6IRgFtgTIMEwhb4GycY=", "architecture"=>{"name"=>"ojJELjrEfavaKHSkSDTncoiqjwik12345yyteyNSBmqcshsFlNcAsGExwayeTXjFOQmXTuVNWCotNUBMbiJmDKtsPtLnXqYJSjTUyNIlSNAAucqVkKXGFrViwyGLTRnqqBaLuGskexxWkYHTLHdLFMEXTmRLiGZgvkTGGmqGEKpGwzEOerEAbVJWBLaKytzydTwJcIQOUdBxowqKqIUSJKZkYHwUzkPWGjQMkpdpadzBctjvjBMDmpfPYurKybz1", "operatingsystem_ids"=>[""]}} Operation FAILED: PGError: ERROR: value too long for type character varying(255) : INSERT INTO "architectures" ("created_at", "hostgroups_count", "hosts_count", "name", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" Rendered common/500.html.erb (7.1ms) Completed 500 Internal Server Error in 166ms (Views: 9.7ms | ActiveRecord: 2.6ms)
Thanks, we're collecting lots of near-identical BZs, please just add them to bug #1120271 in future.
@Dominic: Sure. I'll update bug #1120271, if found similar bz with any other entity. Thank you for quickly ack'ing all such bugs.
The same fix for 1120095 fixes this as well. Please treat these as duplicates. *** This bug has been marked as a duplicate of bug 1120095 ***