Project

General

Profile

Bug #7437

PGError when host group title is exactly 256 characters

Added by Dominic Cleal almost 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Under PostgreSQL, SQLite ignores it:

1. create a host group with a 244 character long name
2. create a second host group with a one character name, child of the first

PGError: ERROR: value too long for type character varying(255) : UPDATE "lookup_values" SET "match" = 'hostgroup=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/b' WHERE "lookup_values"."match" = 'hostgroup='

The length calculation title_and_lookup_key_length doesn't take into account the separator character.

There doesn't appear to be any test coverage in #7038 either of taking parent titles into account.


Related issues

Related to Foreman - Bug #7038: PGError when hostgroup name exceeds 245 charactersClosed2014-08-12

Associated revisions

Revision 2904764d (diff)
Added by Ori Rabin almost 5 years ago

Fixes #7437: validation instead of PGError when host group title is exactly 256 characters

History

#1 Updated by Dominic Cleal almost 5 years ago

  • Related to Bug #7038: PGError when hostgroup name exceeds 245 characters added

#2 Updated by Ori Rabin almost 5 years ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin

#3 Updated by Ori Rabin almost 5 years ago

  • Target version set to 1.7.3

This should have been a part of a bug fix that was merged this sprint (#7038)

#4 Updated by Ori Rabin almost 5 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1772 added
  • Pull request deleted ()

#5 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 21

#6 Updated by Ori Rabin almost 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF