Bug 1586049 - Beaker rejects non-numeric values for score with Internal Server Error: OperationalError: (OperationalError) (1366, "Incorrect decimal value: '' for column 'score' at row 1")
Summary: Beaker rejects non-numeric values for score with Internal Server Error: Opera...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: general
Version: 25
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: 25.5
Assignee: Roman Joost
QA Contact: Roman Joost
URL:
Whiteboard:
: 1587970 1588737 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-05 11:59 UTC by Frantisek Sumsal
Modified: 2018-07-23 04:46 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-08 23:27:40 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Beaker Project Gerrit 6127 0 None None None 2018-06-06 03:22:46 UTC

Comment 1 Jan Stancek 2018-06-05 14:00:33 UTC
Something similar has been reported on RHEL7 too today:
restraint-rhts-0.1.33-1.el7bkr.x86_64
restraint-0.1.33-1.el7bkr.x86_64

Submitted data is:
path=%2Fdesktop%2Fci%2Fprepare%2Fnm_debug&result=PASS&score=

Note that 'score' is empty string, presumably because of wrapper script, that quotes last parameter, which is optional:
  rstrnt-report-result --outputfile="$3" "$1" "$2" "$4"

On server side it hits:
beaker-server beaker-server[72030]:  OperationalError: (OperationalError) (1366, "Incorrect decimal value: '' for column 'score' at row 1") 'INSERT INTO recipe_task_result (recipe_task_id, path, result, score, log, start_time) VALUES (%s, %s, %s, %s, %s, %s)' (73233377L, '/desktop/ci/prepare/nm_debug', 'Pass', '', None, datetime.datetime(2018, 6, 5, 13, 6, 56, 446427))

This allowed R:5237866 to work again:
-rstrnt-report-result --outputfile="$3" "$1" "$2" "$4"
+rstrnt-report-result --outputfile="$3" "$1" "$2" $4

Comment 2 Jan Stancek 2018-06-05 14:11:54 UTC
comment 0 appears to be related to beakerlib BZ:
Bug 1571784 - rstrnt-report-result is incompatible with beakerlib but set as command for reporting result

task from comment 1 is not using beakerlib

Comment 3 Dan Callaghan 2018-06-05 22:52:09 UTC
The root cause would be the cutover to Mariadb in our production Beaker instance yesterday. Mariadb runs with "strict mode" applied by default. We thought we had found all instances where we were violating the strict mode but this is obviously one we did not catch.

We definitely need to fix Beaker to accept non-int values for score, for compatibility with the previous behaviour (I assume non-strict MySQL used to map these values to 0 -- need to verify this).

The issues with restraint+beakerlib putting its arguments in the wrong order is indeed a separate issue, as noted by Jan: bug 1571784.

Comment 4 Dan Callaghan 2018-06-06 23:03:18 UTC
*** Bug 1587970 has been marked as a duplicate of this bug. ***

Comment 5 Dan Callaghan 2018-06-06 23:21:51 UTC
As noted on beaker-user-list, if you are affected by this bug because of restraint sending the wrong parameter as score, you can work around it by using a fixed version of restraint:

<repos>
  <repo name="myharness" url="http://brew-task-repos.usersys.redhat.com/repos/scratch/bpeck/restraint/0.1.34/1.git.12.c32c83a.el7/x86_64/"/>
</repos>

Thanks to bpeck for building a patched version.

Comment 9 Dan Callaghan 2018-06-07 23:17:00 UTC
*** Bug 1588737 has been marked as a duplicate of this bug. ***

Comment 11 Roman Joost 2018-06-08 02:44:50 UTC
This was deployed to production this morning and should get all tests who have seen this issue going again.

Comment 12 Dan Callaghan 2018-07-23 04:46:14 UTC
This was a Beaker bug, fixed in 25.5, not a bug in qa-tools-workstation (although a workaround may have been included in it).


Note You need to log in before you can comment on or make changes to this bug.