Bug 1020191
Summary: | cumin - wrong sorting according to job id | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise MRG | Reporter: | Tomáš Nováčik <tnovacik> | ||||||
Component: | cumin | Assignee: | Trevor McKay <tmckay> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Tomáš Nováčik <tnovacik> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 2.4 | CC: | eerlands, esammons, exo, matt, pbelanyi, sgraf, tmckay, tnovacik | ||||||
Target Milestone: | 2.5 | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | cumin-0.1.5796-1 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause:
Cumin used string-lexicographic sorting on job ids, instead of sorting by numeric values.
Consequence:
Incorrect sorts, for example "10" < "2"
Fix:
Sorting was fixed to order by numeric values.
Result:
Sorting now as expected, e.g. "2" < "10"
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2014-04-28 16:47:15 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: | |||||||||
Attachments: |
|
Description
Tomáš Nováčik
2013-10-17 09:00:45 UTC
Cumin references: https://fedorahosted.org/grid/wiki/Cumin https://fedorahosted.org/grid/wiki/CuminAndPersonalCondor http://tmckayus.github.io/blog/2012/09/24/new-post/ We are interested in: 1] propose patch that fixes the issue 2] propose testing scenario down to individual steps 3] automate testing scenario (from 2]) using your prefered language (optional) In case you struggle you can: - ask here in Bugzilla using comment field - join IRC channels #distcomp and ##cumin on http://freenode.net/ - ask on mailing list (https://fedorahosted.org/grid/wiki/Cumin#OtherUsefulLinks) (In reply to Stanislav Graf from comment #1) > Cumin references: > https://fedorahosted.org/grid/wiki/Cumin > https://fedorahosted.org/grid/wiki/CuminAndPersonalCondor > http://tmckayus.github.io/blog/2012/09/24/new-post/ > > We are interested in: > 1] propose patch that fixes the issue > 2] propose testing scenario down to individual steps > 3] automate testing scenario (from 2]) using your prefered language > (optional) > > In case you struggle you can: > - ask here in Bugzilla using comment field > - join IRC channels #distcomp and ##cumin on http://freenode.net/ > - ask on mailing list > (https://fedorahosted.org/grid/wiki/Cumin#OtherUsefulLinks) My solution: 1] patch: http://www.fpaste.org/60780/13867700/ 2] testing scenario: http://www.fpaste.org/60782/67701031/ 3] testing script: http://www.fpaste.org/60784/67701881/ (In reply to Tomas Meszaros from comment #2) > (In reply to Stanislav Graf from comment #1) > > Cumin references: > > https://fedorahosted.org/grid/wiki/Cumin > > https://fedorahosted.org/grid/wiki/CuminAndPersonalCondor > > http://tmckayus.github.io/blog/2012/09/24/new-post/ > > > > We are interested in: > > 1] propose patch that fixes the issue > > 2] propose testing scenario down to individual steps > > 3] automate testing scenario (from 2]) using your prefered language > > (optional) > > > > In case you struggle you can: > > - ask here in Bugzilla using comment field > > - join IRC channels #distcomp and ##cumin on http://freenode.net/ > > - ask on mailing list > > (https://fedorahosted.org/grid/wiki/Cumin#OtherUsefulLinks) > > My solution: > > 1] patch: http://www.fpaste.org/60780/13867700/ > 2] testing scenario: http://www.fpaste.org/60782/67701031/ > 3] testing script: http://www.fpaste.org/60784/67701881/ Improved solution: 1] patch: http://www.fpaste.org/61671/97119913/ 2] testing scenario: http://www.fpaste.org/61661/86970126/ 3] testing scripts: http://www.fpaste.org/61673/71243138/ http://www.fpaste.org/61674/13869712/ (In reply to Tomas Meszaros from comment #3) > (In reply to Tomas Meszaros from comment #2) > > (In reply to Stanislav Graf from comment #1) > > > Cumin references: > > > https://fedorahosted.org/grid/wiki/Cumin > > > https://fedorahosted.org/grid/wiki/CuminAndPersonalCondor > > > http://tmckayus.github.io/blog/2012/09/24/new-post/ > > > > > > We are interested in: > > > 1] propose patch that fixes the issue > > > 2] propose testing scenario down to individual steps > > > 3] automate testing scenario (from 2]) using your prefered language > > > (optional) > > > > > > In case you struggle you can: > > > - ask here in Bugzilla using comment field > > > - join IRC channels #distcomp and ##cumin on http://freenode.net/ > > > - ask on mailing list > > > (https://fedorahosted.org/grid/wiki/Cumin#OtherUsefulLinks) > > > > My solution: > > > > 1] patch: http://www.fpaste.org/60780/13867700/ > > 2] testing scenario: http://www.fpaste.org/60782/67701031/ > > 3] testing script: http://www.fpaste.org/60784/67701881/ > > Improved solution: > > 1] patch: http://www.fpaste.org/61671/97119913/ > 2] testing scenario: http://www.fpaste.org/61661/86970126/ > 3] testing scripts: http://www.fpaste.org/61673/71243138/ > http://www.fpaste.org/61674/13869712/ Here is patch_v2: http://www.fpaste.org/63591/87562620/ Created attachment 840911 [details]
Overload sort_rows method to JobSummariesAdapter
Nice job! This can be tweaked by moving the sort logic into the JobSummariesAdapter class derived from ObjectQmfAdapter. The JobSummariesAdapter class is used only for processing the results of a query on a submission to retrieve job summaries, so it is the perfect place. No need to put guards on the logic to keep from affecting other tables. Specific knowledge of the record structure at this level is appropriate. I tested this with a VM, works for me :) See the attached patch. Created attachment 840913 [details]
Overload sort_rows method to JobSummariesAdapter
Oops, left out the field index test
Verified on rhel6x, rhel6i - with cumin-0.1.5796-1. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2014-0440.html |