)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"8bbabfd6bff10f266a5f7941da99de5bfa1b6e6b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin Benton \u003ckevin@benton.pub\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-02-14 08:28:41 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"do the things"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I6f4f439928588cff954e749dfa938425892e0931"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa31d9ce_6c9d8865","line":7,"updated":"2017-02-14 16:39:03.000000000","message":"Establish flush() for nested facade contexts\n\nWhen converting existing session context manager code to use enginefacade, normally a flush() is implicit on a \"subtransaction\" when it closes.  Enginefacade has not maintained this behavior.  Ideally, this should have been on by default when enginefacade was first released, but for now add this as a behavioral option for projects that require it.","commit_id":"7e528064684ac57187407bf276ecc732bbd83d5e"}],"oslo_db/sqlalchemy/enginefacade.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"8bbabfd6bff10f266a5f7941da99de5bfa1b6e6b","unresolved":false,"context_lines":[{"line_number":577,"context_line":"                    yield self.session"},{"line_number":578,"context_line":"            else:"},{"line_number":579,"context_line":"                yield self.session"},{"line_number":580,"context_line":"                self.session.flush()"},{"line_number":581,"context_line":""},{"line_number":582,"context_line":"    def _end_session_transaction(self, session):"},{"line_number":583,"context_line":"        if self.mode is _WRITER:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_6c53c8e2","line":580,"updated":"2017-02-14 16:39:03.000000000","message":"let\u0027s make this optional, part of _facade_cfg","commit_id":"7e528064684ac57187407bf276ecc732bbd83d5e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0ecbab604cf9fd92d03d74678c1e54da732b17b0","unresolved":false,"context_lines":[{"line_number":264,"context_line":"         @reader context works the same as @async_reader and will select"},{"line_number":265,"context_line":"         the \"slave\" database if present."},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        :param flush_on_nested: if True, a :class:`.Session` object will"},{"line_number":268,"context_line":"         have its :meth:`.Session.flush` method invoked whenever a nested"},{"line_number":269,"context_line":"         context manager exits."},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_448eb42e","line":267,"updated":"2017-02-15 11:45:40.000000000","message":"An option with  a default of False sounds good. I just wonder whether the name can make people confuse this with SAVEPOINT\u0027s","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"b27e824dd65b0ceceb43be5b5fc711ccfabb22d3","unresolved":false,"context_lines":[{"line_number":264,"context_line":"         @reader context works the same as @async_reader and will select"},{"line_number":265,"context_line":"         the \"slave\" database if present."},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        :param flush_on_nested: if True, a :class:`.Session` object will"},{"line_number":268,"context_line":"         have its :meth:`.Session.flush` method invoked whenever a nested"},{"line_number":269,"context_line":"         context manager exits."},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_6188ff71","line":267,"in_reply_to":"fa31d9ce_448eb42e","updated":"2017-02-15 15:11:21.000000000","message":"good idea, it\u0027s really \"subtransaction\" even though enginefacade doesn\u0027t use the concept of \"subtransaction\" ?   ill call it that for now","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"}],"oslo_db/tests/sqlalchemy/test_enginefacade.py":[{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"8bbabfd6bff10f266a5f7941da99de5bfa1b6e6b","unresolved":false,"context_lines":[{"line_number":404,"context_line":"        else:"},{"line_number":405,"context_line":"            session \u003d makers.element_for_writer(writer)()"},{"line_number":406,"context_line":"        session.begin()"},{"line_number":407,"context_line":"        yield session"},{"line_number":408,"context_line":"        if writer is enginefacade._WRITER:"},{"line_number":409,"context_line":"            session.commit()"},{"line_number":410,"context_line":"        elif enginefacade.\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa31d9ce_4cf8c4c3","line":407,"updated":"2017-02-14 16:39:03.000000000","message":"right here, there may need to be a session.flush() mock, if we make the flush() a cfg option, then we need to check that config option here (like the rollback_reader_sessions check below) and then conditionally do the flush(), then some mock tests should be added which set this option","commit_id":"7e528064684ac57187407bf276ecc732bbd83d5e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0ecbab604cf9fd92d03d74678c1e54da732b17b0","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                self.sessions.element_for_writer(writer).mock_calls)"},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"    @contextlib.contextmanager"},{"line_number":428,"context_line":"    def _assert_nested_session(self, writer, session):"},{"line_number":429,"context_line":"        yield session"},{"line_number":430,"context_line":"        if enginefacade._context_manager.\\"},{"line_number":431,"context_line":"                _factory._transaction_ctx_cfg[\u0027flush_on_nested\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_c470e474","line":428,"updated":"2017-02-15 11:45:40.000000000","message":"Not sure I\u0027m following. Where is the assertion here?","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"38a2a0175e90984137f95fc7e8678120b32e4bbe","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                self.sessions.element_for_writer(writer).mock_calls)"},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"    @contextlib.contextmanager"},{"line_number":428,"context_line":"    def _assert_nested_session(self, writer, session):"},{"line_number":429,"context_line":"        yield session"},{"line_number":430,"context_line":"        if enginefacade._context_manager.\\"},{"line_number":431,"context_line":"                _factory._transaction_ctx_cfg[\u0027flush_on_nested\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_2a95d487","line":428,"in_reply_to":"fa31d9ce_66665552","updated":"2017-02-16 12:26:46.000000000","message":"Ah, ok, thanks for clarifications!","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"cd2c0b9426a7a7ea9c6baaccac1d57923353c1ab","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                self.sessions.element_for_writer(writer).mock_calls)"},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"    @contextlib.contextmanager"},{"line_number":428,"context_line":"    def _assert_nested_session(self, writer, session):"},{"line_number":429,"context_line":"        yield session"},{"line_number":430,"context_line":"        if enginefacade._context_manager.\\"},{"line_number":431,"context_line":"                _factory._transaction_ctx_cfg[\u0027flush_on_nested\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_66665552","line":428,"in_reply_to":"fa31d9ce_c470e474","updated":"2017-02-15 15:05:15.000000000","message":"so suggestions welcome here, in this case it\u0027s not actually \"asserting\", it\u0027s just doing things that _assert_session() will depend upon.  E.g. we need to emit these extra calls into the mock before _assert_session() is called.   I didn\u0027t see any other naming convention to latch onto here and initially i tried having assertions directly in here hence that\u0027s how the name got set.","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0ecbab604cf9fd92d03d74678c1e54da732b17b0","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"            session.query(self.User.name).scalar()"},{"line_number":1638,"context_line":"        )"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"    def test_flush_on_nested(self):"},{"line_number":1641,"context_line":"        facade \u003d enginefacade.transaction_context()"},{"line_number":1642,"context_line":"        facade.configure("},{"line_number":1643,"context_line":"            connection\u003dself.engine.url,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_a4b2104a","line":1640,"updated":"2017-02-15 11:45:40.000000000","message":"Hmm, why are we putting these into LiveFacadeTest? Won\u0027t this work with sqlite in-memory? (we do not use multiple concurrent transactions or SAVEPOINTs, etc).","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"38a2a0175e90984137f95fc7e8678120b32e4bbe","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"            session.query(self.User.name).scalar()"},{"line_number":1638,"context_line":"        )"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"    def test_flush_on_nested(self):"},{"line_number":1641,"context_line":"        facade \u003d enginefacade.transaction_context()"},{"line_number":1642,"context_line":"        facade.configure("},{"line_number":1643,"context_line":"            connection\u003dself.engine.url,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_8ab5e032","line":1640,"in_reply_to":"fa31d9ce_26a53d46","updated":"2017-02-16 12:26:46.000000000","message":"Ok, I don\u0027t really mind, just wanted to make sure I got it right :)","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"cd2c0b9426a7a7ea9c6baaccac1d57923353c1ab","unresolved":false,"context_lines":[{"line_number":1637,"context_line":"            session.query(self.User.name).scalar()"},{"line_number":1638,"context_line":"        )"},{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"    def test_flush_on_nested(self):"},{"line_number":1641,"context_line":"        facade \u003d enginefacade.transaction_context()"},{"line_number":1642,"context_line":"        facade.configure("},{"line_number":1643,"context_line":"            connection\u003dself.engine.url,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_26a53d46","line":1640,"in_reply_to":"fa31d9ce_a4b2104a","updated":"2017-02-15 15:05:15.000000000","message":"So, originally kevinbenton had just this test and I always like the idea of a live round trip test.  This does work w/ SQLite because I\u0027m using the (newly repaired) patch_engine() to put the top SQLite engine into each facade :).   this test not strictly necessary but I never mind having a live round trip to assert a behavior that we\u0027re also unit testing elsewhere.","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"0ecbab604cf9fd92d03d74678c1e54da732b17b0","unresolved":false,"context_lines":[{"line_number":1661,"context_line":"            with facade.writer.using(context):"},{"line_number":1662,"context_line":"                u \u003d self.User(name\u003d\"u1\")"},{"line_number":1663,"context_line":"                context.session.add(u)"},{"line_number":1664,"context_line":"            self.assertEqual(None, u.favorite_color)"},{"line_number":1665,"context_line":"        self.assertEqual(\u0027yellow\u0027, u.favorite_color)"},{"line_number":1666,"context_line":""},{"line_number":1667,"context_line":"    def test_context_deepcopy_on_session(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_9914994d","line":1664,"updated":"2017-02-15 11:45:40.000000000","message":"nit: \u003d\u003d works, but assertIsNone is preferred","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"cd2c0b9426a7a7ea9c6baaccac1d57923353c1ab","unresolved":false,"context_lines":[{"line_number":1661,"context_line":"            with facade.writer.using(context):"},{"line_number":1662,"context_line":"                u \u003d self.User(name\u003d\"u1\")"},{"line_number":1663,"context_line":"                context.session.add(u)"},{"line_number":1664,"context_line":"            self.assertEqual(None, u.favorite_color)"},{"line_number":1665,"context_line":"        self.assertEqual(\u0027yellow\u0027, u.favorite_color)"},{"line_number":1666,"context_line":""},{"line_number":1667,"context_line":"    def test_context_deepcopy_on_session(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa31d9ce_0681198f","line":1664,"in_reply_to":"fa31d9ce_9914994d","updated":"2017-02-15 15:05:15.000000000","message":"OK","commit_id":"3a818d921c5336ac10cec97cb9a08c2758ec68ca"}]}
