Project

General

Profile

Actions

Bug #7437

closed

PGError when host group title is exactly 256 characters

Added by Dominic Cleal over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
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 1 (0 open1 closed)

Related to Foreman - Bug #7038: PGError when hostgroup name exceeds 245 charactersClosedOri Rabin08/12/2014Actions
Actions #1

Updated by Dominic Cleal over 10 years ago

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

Updated by Ori Rabin over 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin
Actions #3

Updated by Ori Rabin over 10 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)

Actions #4

Updated by Ori Rabin over 10 years ago

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

Updated by Dominic Cleal over 10 years ago

  • Translation missing: en.field_release set to 21
Actions #6

Updated by Ori Rabin over 10 years ago

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

Also available in: Atom PDF