Bug 1577729

Summary: MariaDB will raise an exception if value for Activity field_name is longer than 40 characters
Product: [Retired] Beaker Reporter: Roman Joost <rjoost>
Component: generalAssignee: Roman Joost <rjoost>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: dcallagh, mtyson, rjoost
Target Milestone: 25.4Keywords: Patch, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-24 22:52:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Joost 2018-05-14 04:04:37 UTC
Description of problem:

The Activity is currently configured to support field_name values which are up to 40 characters long:

 field_name = Column(Unicode(40), nullable=False, index=True)

However, if MariaDB is configured with strict mode, inserting values longer than 40 characters results in an exception.

Version-Release number of selected component (if applicable):
25.0

How reproducible:
100%

Steps to Reproduce:
1. Go to the systems page under InstallOptions
2. Add install options and choose a family with a very long name, kickstart metadata can be something short (e.g. foo=lol)

Alternatively, you can create a CSV import with a long ks_meta option and import that. See test_csv_import:CSVImportTest.test_double_quotes and it's associated CSV file.

Actual results:
SQLAlchemy tries to create an insert statement in which the field name is longer than 40 characters.

Expected results:
No exception.

Comment 1 Roman Joost 2018-05-18 06:22:00 UTC
We've realised a mistake with this bug in that we mistakenly released it with 25.3. In reflect of this change, I'll move it to 25.3 and close it.

Comment 2 Roman Joost 2018-05-18 07:05:57 UTC
On another look, it actually wasn't included. Mistake by me. My apologies. It's Friday.