Re: [openstack-dev] [fuel] oddness with sqlalchemy db().refresh(object)

2014-04-14 Thread Andrew Woodward
Igor, Ryan was able to repeat the issue in his env by checking out the patch set (5) with db().refresh(task_provision) enabled. On Sun, Apr 13, 2014 at 3:28 AM, Igor Kalnitsky ikalnit...@mirantis.comwrote: Hi guys, *@Roman*, we have db().refresh(task_provision) since the line above

Re: [openstack-dev] [fuel] oddness with sqlalchemy db().refresh(object)

2014-04-14 Thread Igor Kalnitsky
Hello Andrew, I've reproduced the issue on the patch set #5 too. But at the same time, I have no issue on the latest patch set (#9). Thanks, Igor On Mon, Apr 14, 2014 at 9:00 AM, Andrew Woodward xar...@gmail.com wrote: Igor, Ryan was able to repeat the issue in his env by checking out the

Re: [openstack-dev] [fuel] oddness with sqlalchemy db().refresh(object)

2014-04-14 Thread Łukasz Oleś
Hello Andrew, here is the problem: https://review.openstack.org/#/c/78406/5/nailgun/nailgun/test/base.py line 268. If you remove this this line then in https://review.openstack.org/#/c/78406/5/nailgun/nailgun/network/manager.py`if` block from line 131 will be run, especially db.commit() which

Re: [openstack-dev] [fuel] oddness with sqlalchemy db().refresh(object)

2014-04-13 Thread Roman Podoliaka
Hi Andrew, I believe, it's just the way SQLAlchemy Session works: all the changes you've made within a session aren't propagated to the db (read: no actual queries are issued) until you explicitly do: - flush(), or - commit() (as commit() calls flush() first), or - Query - one(), first(), all(),

Re: [openstack-dev] [fuel] oddness with sqlalchemy db().refresh(object)

2014-04-13 Thread Igor Kalnitsky
Hi guys, *@Roman*, we have db().refresh(task_provision) since the line above (self._call_silently) may change task status directly in db, not in SQLAlchemy session. *@Andrew*, it's really strange. I just checkout your request, return refreshing task and run tests. As a result, I have no

[openstack-dev] [fuel] oddness with sqlalchemy db().refresh(object)

2014-04-11 Thread Andrew Woodward
Recently in one of my changes [1] I was fighting with one of the unit tests showing a failure for a test which should have been outside the sphere of influence. Traceback (most recent call last): File /home/andreww/.virtualenvs/fuel/local/lib/python2.7/site-packages/mock.py, line 1190, in