Bug 715133

Summary: minor bugs discovered during sqlalchemy 0.6 development
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: schedulerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 0.6CC: bpeck, dcallagh, mcsontos, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-30 05:41:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dan Callaghan 2011-06-21 23:49:47 UTC
In porting Beaker to RHEL6/TG1.1/sqlalchemy 0.6 I discovered a few minor bugs here and there, mostly in our tests.

* In test_distro_search.py we are passing u'True' and u'False' for the distro.virt column. This column is a bool though, so these all become 1. Accordingly the test is asserting the wrong thing.

* Manual transaction management is not necessary in bkr.server.jobs:upload. The turbogears.expose decorator handles transactions for us.

* In test_delete_system.py we refer to the id of a detached System instance. This only works if sqlalchemy has pre-fetched the generated id (which 0.6 does not).

* test_tasks.py and test_job_matrix.py leak incomplete recipes/recipesets into the database.

* session.get() is deprecated (removed in 0.6).

* If an exception is raised while handling an XML-RPC request, the transaction is not rolled back when it should be.

For the most part these were discovered due to the increased strictness of sqlalchemy 0.6 (for which I am thankful!).