Hi,
I've discovered one error during importing of cloned job (appears in the box on the top of the page):
Failed to import job because of: (OperationalError) (1048, "Column 'job_id' cannot be null") 'INSERT INTO recipe_set (job_id, priority, queue_time, result, status, lab_controller_id, ttasks, ptasks, wtasks, ftasks, ktasks) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (None, 'Urgent', datetime.datetime(2012, 10, 19, 14, 59, 30, 614848), 'New', 'New', None, 0, 0, 0, 0, 0)
I've traced it down to TestPackage.lazy_create(package='%s'...) call where it probably triggers session.commit() and this produces this error.
This happens only if my cloned job contains '<packages><package name="postfix"/></packages>' snip. The original job had '<packages/>'. Package name does not matter.
Reproducible on my beaker instance with 9.3 and 9.4 releases.
Can anyone here tell me what's going wrong?
Thank you, Jaroslav.
Excerpts from Jaroslav Kortus's message of 2012-10-20 01:04:47 +1000:
Hi,
I've discovered one error during importing of cloned job (appears in the box on the top of the page):
Failed to import job because of: (OperationalError) (1048, "Column 'job_id' cannot be null") 'INSERT INTO recipe_set (job_id, priority, queue_time, result, status, lab_controller_id, ttasks, ptasks, wtasks, ftasks, ktasks) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (None, 'Urgent', datetime.datetime(2012, 10, 19, 14, 59, 30, 614848), 'New', 'New', None, 0, 0, 0, 0, 0)
I've traced it down to TestPackage.lazy_create(package='%s'...) call where it probably triggers session.commit() and this produces this error.
This happens only if my cloned job contains '<packages><package name="postfix"/></packages>' snip. The original job had '<packages/>'. Package name does not matter.
Reproducible on my beaker instance with 9.3 and 9.4 releases.
Can anyone here tell me what's going wrong?
It's a bug. The real fix is that we should not be calling session.add in MappedObject.__init__ but unfortunately that would be a very drastic change.
I've filed it in Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=869455
See comment 3 for some suggested workarounds.
beaker-devel@lists.fedorahosted.org