Bug 860888

Summary: RecipeTask ordering is not persisted
Product: [Community] Beaker Reporter: Dan Callaghan <dcallagh>
Component: schedulerAssignee: beaker-dev-list
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: low    
Version: 0.9CC: dcallagh, ebaak, rjoost, tools-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ImplementationQuality
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Dan Callaghan 2012-09-26 22:58:44 EDT
Ordering of tasks within a recipe is significant (recipes have a sequence of tasks, not a set) but Beaker does not persist the ordering to the database. It relies on the tasks being assigned increasing ids when inserted, and on the fact that the database happens to return the rows in id order when queried.

At the very least Beaker should use ORDER BY id whenever it fetches RecipeTasks.
Comment 2 Dan Callaghan 2014-11-12 23:11:16 EST
Having an explicit ordinal for each task in a recipe would come in handy when trying to write SQL queries which join recipe-tasks against recipe-tasks at the same position in different recipes. (I was trying to write a query like that last night for bug 960434.)