Merge lp:~ewanmellor/nova/lp653534 into lp:~hudson-openstack/nova/trunk

Proposed by Ewan Mellor
Status: Merged
Approved by: Soren Hansen
Approved revision: 317
Merged at revision: 318
Proposed branch: lp:~ewanmellor/nova/lp653534
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
nova/db/sqlalchemy/api.py (+1/-1)
To merge this branch: bzr merge lp:~ewanmellor/nova/lp653534
Reviewer Review Type Date Requested Status
Jay Pipes (community) Needs Fixing
Soren Hansen (community) Approve
Vish Ishaya (community) Approve
Review via email: mp+37347@code.launchpad.net

Commit message

Bug #653534: NameError on session_get in sqlalchemy.api.service_update

Fix function call: session_get was meant to be service_get.

To post a comment you must log in.
Revision history for this message
Vish Ishaya (vishvananda) wrote :

lgtm

review: Approve
Revision history for this message
Soren Hansen (soren) wrote :

lgtm, too. In the future, though, please set the commit message and/or description. Can't merge stuff without it. For single-commit deltas like this, just copy the commit message from the top commit.

review: Approve
Revision history for this message
Ewan Mellor (ewanmellor) wrote :

On Sun, Oct 03, 2010 at 08:44:44PM +0100, Soren Hansen wrote:

> Review: Approve
> lgtm, too. In the future, though, please set the commit message and/or description. Can't merge stuff without it. For single-commit deltas like this, just copy the commit message from the top commit.

Will do. I assumed that Launchpad did that for us, since the fields are
both marked optional and it seemed the obvious thing to do. Maybe I'll
make a Launchpad feature request.

Revision history for this message
Jay Pipes (jaypipes) wrote :

It's actually not Launchpad, but Tarmac, which we use to automate the merge process. And Monty is working on that specific ability.

As for this patch, I'm wondering how on Earth such a normal part of Nova's functionality failed? Why wasn't there a test case that tested for this? Can we please add a test for this?

Thanks!
jay

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/db/sqlalchemy/api.py'
2--- nova/db/sqlalchemy/api.py 2010-10-01 09:28:31 +0000
3+++ nova/db/sqlalchemy/api.py 2010-10-02 12:05:56 +0000
4@@ -240,7 +240,7 @@
5 def service_update(context, service_id, values):
6 session = get_session()
7 with session.begin():
8- service_ref = session_get(context, service_id, session=session)
9+ service_ref = service_get(context, service_id, session=session)
10 for (key, value) in values.iteritems():
11 service_ref[key] = value
12 service_ref.save(session=session)