)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e0fd78fcb73aa9a7ccd594ed65419babd2a12da2","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sergey Nikitin \u003csnikitin@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-23 13:38:45 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: Use legacy engineFacade from oslo_db.enginefacade"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027get_session\u0027 and \u0027get_api_session\u0027 methods are still"},{"line_number":10,"context_line":"needed for backward compatibility"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a1a9d01_acb840c9","line":7,"updated":"2015-09-29 13:20:20.000000000","message":"Why do we want this in nova?  I don\u0027t see a blueprint tied to this but it\u0027s clearly a feature add right?  Given I don\u0027t know anything about the details behind this in oslo.db, we shouldn\u0027t assume that the nova team understands what\u0027s being added here and why.  That should be explained at least in the commit message.","commit_id":"3f226839e8d727c9c76bda1418d3c3338f94a918"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0c81f05a1b82430f24b3095e4d81c31f27fd138e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sergey Nikitin \u003csnikitin@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-09-23 13:38:45 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"WIP: Use legacy engineFacade from oslo_db.enginefacade"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027get_session\u0027 and \u0027get_api_session\u0027 methods are still"},{"line_number":10,"context_line":"needed for backward compatibility"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a1a9d01_6c0a287b","line":7,"in_reply_to":"9a1a9d01_acb840c9","updated":"2015-09-29 13:22:45.000000000","message":"This should be trivially re-proposed for mitaka:\n\nhttp://specs.openstack.org/openstack/nova-specs/specs/liberty/approved/oslo_db-enginefacade.html\n\nAnd the changes in this series should be tied to the blueprint.","commit_id":"3f226839e8d727c9c76bda1418d3c3338f94a918"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b4c4a17a5e7ce3ec2298252b3c93ffcc1cfb8dda","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sergey Nikitin \u003csnikitin@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-10-20 05:04:59 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use legacy engineFacade from oslo_db.enginefacade"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"\u0027get_session\u0027 and \u0027get_api_session\u0027 methods are still"},{"line_number":10,"context_line":"needed for backward compatibility."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"3a29b11f_ba0f4ce0","line":7,"updated":"2015-10-20 10:57:08.000000000","message":"This is confusing: we are actually moving towards the *new* EngineFacade, it\u0027s just that we keep get_session()/get_engine() methods for the backwards compatibility.\n\nget_legacy_facade() is just an implementation detail of oslo.db to easily implement get_session() / get_engine() in the way \u0027we are used to\u0027 (i.e. \u0027get me a session from anywhere without an established transactional context\u0027)","commit_id":"086dbbd7389ff2ed8e63d84350a6f9dce32ea3c7"}],"nova/cmd/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e93c028204c70bffcca87fc5a2e2448d7e407de7","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    logging.setup(CONF, \"nova\")"},{"line_number":44,"context_line":"    utils.monkey_patch()"},{"line_number":45,"context_line":"    objects.register_all()"},{"line_number":46,"context_line":"    sqlalchemy_api.configure(CONF)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    gmr.TextGuruMeditation.setup_autorun(version)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"fa80f949_cce9351c","line":46,"updated":"2015-11-05 01:32:01.000000000","message":"So based on the pattern here, we\u0027re doing this so oslo_db config options from nova.conf are used by the session stuff, which needs to be done for any service or CLI that hits the database directly, which is normally only api/conductor/nova-manage.\n\nHowever, with local conductor, we could also hit the database in other services, like nova-network, right?\n\nhttps://github.com/openstack/nova/blob/master/nova/cmd/network.py#L65\n\nThe scheduler can also hit the database to call service_get_all_by_topic - so don\u0027t we need this same thing in some of the other services?","commit_id":"cf69cac9be11b48f6b8f7f90299a50dd8eae5e1a"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"0aa11d16fb92cc97b3cc29e279f696bbc678ae85","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    logging.setup(CONF, \"nova\")"},{"line_number":44,"context_line":"    utils.monkey_patch()"},{"line_number":45,"context_line":"    objects.register_all()"},{"line_number":46,"context_line":"    sqlalchemy_api.configure(CONF)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    gmr.TextGuruMeditation.setup_autorun(version)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"fa80f949_6997d090","line":46,"in_reply_to":"fa80f949_cce9351c","updated":"2015-11-05 09:24:04.000000000","message":"good point!","commit_id":"cf69cac9be11b48f6b8f7f90299a50dd8eae5e1a"}],"nova/cmd/compute.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"513f5e2e0a4e735a2d7377718e7db3461d0bcdc0","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        objects_base.NovaObject.indirection_api \u003d \\"},{"line_number":69,"context_line":"            conductor_rpcapi.ConductorAPI()"},{"line_number":70,"context_line":"    else:"},{"line_number":71,"context_line":"        sqlalchemy_api.configure(CONF)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    server \u003d service.Service.create(binary\u003d\u0027nova-compute\u0027,"},{"line_number":74,"context_line":"                                    topic\u003dCONF.compute_topic,"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa80f949_08daa978","line":71,"updated":"2015-11-05 16:58:16.000000000","message":"Alternate to Matt\u0027s suggestion, we could also package this logic into something common, which would DRY up the existing bit and what you\u0027re adding. Basically:\n\n if use_local:\n     initialize_db_stuff()\n else:\n     block_db()\n     set_indirection_api()\n\ninto a method and then just call that method from every service startup.","commit_id":"ecea855b2032b7b41df4a9becc664434bf9ed3c1"}],"nova/config.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"be7348da77bb9bef7b8267fccbbadc5ffe8385cc","unresolved":false,"context_lines":[{"line_number":60,"context_line":"         version\u003dversion.version_string(),"},{"line_number":61,"context_line":"         default_config_files\u003ddefault_config_files)"},{"line_number":62,"context_line":"    rpc.init(CONF)"},{"line_number":63,"context_line":"    try:"},{"line_number":64,"context_line":"        sqlalchemy_api.configure(CONF)"},{"line_number":65,"context_line":"    except TypeError:"},{"line_number":66,"context_line":"        # enginefacade is already configured"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_4fed4a8a","line":63,"updated":"2015-09-14 17:04:06.000000000","message":"I\u0027m surprised this is run more than once. Let\u0027s try to find a better way to configure EngineFacade once, so that we don\u0027t raise/handle exceptions, when we don\u0027t really need that.","commit_id":"ac242d5145dfc565455988da2593054c379fdb75"}],"nova/context.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6ad4a43ebb5b8bc2c9eb35789661bcf5975cc95","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def __str__(self):"},{"line_number":212,"context_line":"        return \"\u003cContext %s\u003e\" % self.to_dict()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    # NOTE(snikitin): Redefining of methods __getstate__ and __setstate__"},{"line_number":215,"context_line":"    # is needed for correct work of the method pickle.dumps()."},{"line_number":216,"context_line":"    # Field _enginefacade_context couldn\u0027t be dumped by pickle, so this field"},{"line_number":217,"context_line":"    # must be skipped while dumping."}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_00a5f102","line":214,"updated":"2015-09-14 12:05:43.000000000","message":"nit: redefining -\u003e overriding","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"60169861a4c124b909fdedd1c814b358227c96c4","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def __str__(self):"},{"line_number":212,"context_line":"        return \"\u003cContext %s\u003e\" % self.to_dict()"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    # NOTE(snikitin): Redefining of methods __getstate__ and __setstate__"},{"line_number":215,"context_line":"    # is needed for correct work of the method pickle.dumps()."},{"line_number":216,"context_line":"    # Field _enginefacade_context couldn\u0027t be dumped by pickle, so this field"},{"line_number":217,"context_line":"    # must be skipped while dumping."}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_88d04355","line":214,"in_reply_to":"ba15a1d1_00a5f102","updated":"2015-09-15 13:51:35.000000000","message":"Done","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6ad4a43ebb5b8bc2c9eb35789661bcf5975cc95","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    # NOTE(snikitin): Redefining of methods __getstate__ and __setstate__"},{"line_number":215,"context_line":"    # is needed for correct work of the method pickle.dumps()."},{"line_number":216,"context_line":"    # Field _enginefacade_context couldn\u0027t be dumped by pickle, so this field"},{"line_number":217,"context_line":"    # must be skipped while dumping."},{"line_number":218,"context_line":"    def __getstate__(self):"},{"line_number":219,"context_line":"        d \u003d self.__dict__"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_c0aff9e1","line":216,"updated":"2015-09-14 12:05:43.000000000","message":"nit: field -\u003e attribute\n\nnit: couldn\u0027t -\u003e can\u0027t","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"60169861a4c124b909fdedd1c814b358227c96c4","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    # NOTE(snikitin): Redefining of methods __getstate__ and __setstate__"},{"line_number":215,"context_line":"    # is needed for correct work of the method pickle.dumps()."},{"line_number":216,"context_line":"    # Field _enginefacade_context couldn\u0027t be dumped by pickle, so this field"},{"line_number":217,"context_line":"    # must be skipped while dumping."},{"line_number":218,"context_line":"    def __getstate__(self):"},{"line_number":219,"context_line":"        d \u003d self.__dict__"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_a8d50744","line":216,"in_reply_to":"ba15a1d1_c0aff9e1","updated":"2015-09-15 13:51:35.000000000","message":"Done","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"04817afcb7cfe7846a3f75f14f090cfa9a3b4947","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    # NOTE(snikitin): Methods __getstate__ and __setstate__ overriding"},{"line_number":215,"context_line":"    # is needed for correct work of the method pickle.dumps()."},{"line_number":216,"context_line":"    # Atribute _enginefacade_context can\u0027t be dumped by pickle,"},{"line_number":217,"context_line":"    # so this atribute must be skipped while dumping."},{"line_number":218,"context_line":"    def __getstate__(self):"},{"line_number":219,"context_line":"        d \u003d self.__dict__"},{"line_number":220,"context_line":"        d.pop(\u0027_enginefacade_context\u0027, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_d660d837","line":217,"updated":"2015-09-22 15:01:26.000000000","message":"Could you please propose this as a patch to oslo.db instead? Do we need pickle.dumps() in nova, or are you just using it for debugging? If the latter, you might carry it as a local patch instead until we patch the decorator.","commit_id":"df6532461055a31ac0e55264c4b0b13a6c9502bf"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"b13770b79c48bd2298d2aa7c0910d428e0dfddb5","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    # NOTE(snikitin): Methods __getstate__ and __setstate__ overriding"},{"line_number":215,"context_line":"    # is needed for correct work of the method pickle.dumps()."},{"line_number":216,"context_line":"    # Atribute _enginefacade_context can\u0027t be dumped by pickle,"},{"line_number":217,"context_line":"    # so this atribute must be skipped while dumping."},{"line_number":218,"context_line":"    def __getstate__(self):"},{"line_number":219,"context_line":"        d \u003d self.__dict__"},{"line_number":220,"context_line":"        d.pop(\u0027_enginefacade_context\u0027, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_e362fdd7","line":217,"in_reply_to":"ba15a1d1_d660d837","updated":"2015-09-22 15:09:24.000000000","message":"we\u0027d likely want to do something like a custom __reduce__ on _TransactionContextTLocal to provide the behavior we think is appropriate.  But it depends on what we\u0027re doing with this pickle here; is it serialized to a new process?","commit_id":"df6532461055a31ac0e55264c4b0b13a6c9502bf"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"76b5e2051751dfb357ad4cd79b085652d79c144c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    # NOTE(snikitin): Methods __getstate__ and __setstate__ overriding"},{"line_number":215,"context_line":"    # is needed for correct work of the method pickle.dumps()."},{"line_number":216,"context_line":"    # Atribute _enginefacade_context can\u0027t be dumped by pickle,"},{"line_number":217,"context_line":"    # so this atribute must be skipped while dumping."},{"line_number":218,"context_line":"    def __getstate__(self):"},{"line_number":219,"context_line":"        d \u003d self.__dict__"},{"line_number":220,"context_line":"        d.pop(\u0027_enginefacade_context\u0027, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_4350895e","line":217,"in_reply_to":"ba15a1d1_e362fdd7","updated":"2015-09-22 15:19:48.000000000","message":"I think this particular test - https://github.com/openstack/nova/blob/master/nova/tests/unit/test_metadata.py#L168-L172 - failed without this.\n\nThe note says the result of the pickled is put into memcache and most likely will be used in another process. So we can\u0027t really pickle the engine/session state, as it\u0027s going to be invalid in another process.","commit_id":"df6532461055a31ac0e55264c4b0b13a6c9502bf"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"7fca92f04d51abc6a0725d119f9aaa432a27f7b6","unresolved":false,"context_lines":[{"line_number":214,"context_line":"    # NOTE(snikitin): Methods __getstate__ and __setstate__ overriding"},{"line_number":215,"context_line":"    # is needed for correct work of the method pickle.dumps()."},{"line_number":216,"context_line":"    # Atribute _enginefacade_context can\u0027t be dumped by pickle,"},{"line_number":217,"context_line":"    # so this atribute must be skipped while dumping."},{"line_number":218,"context_line":"    def __getstate__(self):"},{"line_number":219,"context_line":"        d \u003d self.__dict__"},{"line_number":220,"context_line":"        d.pop(\u0027_enginefacade_context\u0027, None)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_23031544","line":217,"in_reply_to":"ba15a1d1_e362fdd7","updated":"2015-09-22 15:20:40.000000000","message":"this issue was found when this test doesn\u0027t pass:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/unit/test_metadata.py#L168-L172","commit_id":"df6532461055a31ac0e55264c4b0b13a6c9502bf"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"04817afcb7cfe7846a3f75f14f090cfa9a3b4947","unresolved":false,"context_lines":[{"line_number":217,"context_line":"    # so this atribute must be skipped while dumping."},{"line_number":218,"context_line":"    def __getstate__(self):"},{"line_number":219,"context_line":"        d \u003d self.__dict__"},{"line_number":220,"context_line":"        d.pop(\u0027_enginefacade_context\u0027, None)"},{"line_number":221,"context_line":"        return d"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def __setstate__(self, state):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_7621ccb3","line":220,"updated":"2015-09-22 15:01:26.000000000","message":"This removes _enginefacade_context from the object. I haven\u0027t looked at the context of this call, but I can\u0027t see how this could be correct. After this call, the requestcontext object will have lost its enginefacade context.","commit_id":"df6532461055a31ac0e55264c4b0b13a6c9502bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e93c028204c70bffcca87fc5a2e2448d7e407de7","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                            region_name\u003dregion_name)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"@enginefacade.transaction_context_provider"},{"line_number":65,"context_line":"class RequestContext(context.RequestContext):"},{"line_number":66,"context_line":"    \"\"\"Security context and request information."},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"fa80f949_cc74d59d","line":64,"updated":"2015-11-05 01:32:01.000000000","message":"I\u0027m glad this is doc\u0027ed :)\n\nhttp://docs.openstack.org/developer/oslo.db/usage.html#session-handling","commit_id":"cf69cac9be11b48f6b8f7f90299a50dd8eae5e1a"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fe077551897b69c94728001e8e6924d0b4164ae1","unresolved":false,"context_lines":[{"line_number":130,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"_ENGINE_FACADE \u003d {\u0027main\u0027: None, \u0027api\u0027: None}"},{"line_number":133,"context_line":"_MAIN_FACADE \u003d \u0027main\u0027"},{"line_number":134,"context_line":"_API_FACADE \u003d \u0027api\u0027"},{"line_number":135,"context_line":"_LOCK \u003d threading.Lock()"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_91fee203","line":133,"updated":"2015-09-10 15:12:48.000000000","message":"hmm, you shouldn\u0027t need all this anymore. Just create the context managers and then use get_legacy_facade()","commit_id":"5605ea89e20dac40ec3d91a1d9c4642e76f6f378"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fe077551897b69c94728001e8e6924d0b4164ae1","unresolved":false,"context_lines":[{"line_number":132,"context_line":"_ENGINE_FACADE \u003d {\u0027main\u0027: None, \u0027api\u0027: None}"},{"line_number":133,"context_line":"_MAIN_FACADE \u003d \u0027main\u0027"},{"line_number":134,"context_line":"_API_FACADE \u003d \u0027api\u0027"},{"line_number":135,"context_line":"_LOCK \u003d threading.Lock()"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"main_context_manager \u003d enginefacade.transaction_context()"},{"line_number":138,"context_line":"api_context_manager \u003d enginefacade.transaction_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_91e82218","line":135,"updated":"2015-09-10 15:12:48.000000000","message":"facade is thread-safe, so this is not needed anymore","commit_id":"5605ea89e20dac40ec3d91a1d9c4642e76f6f378"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fe077551897b69c94728001e8e6924d0b4164ae1","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        max_retries\u003dconf_group.max_retries,"},{"line_number":163,"context_line":"        retry_interval\u003dconf_group.retry_interval)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    if facade \u003d\u003d _MAIN_FACADE:"},{"line_number":166,"context_line":"        main_context_manager.configure(**kw)"},{"line_number":167,"context_line":"        return main_context_manager._factory.get_legacy_facade()"},{"line_number":168,"context_line":"    elif facade \u003d\u003d _API_FACADE:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_51560a07","line":165,"updated":"2015-09-10 15:12:48.000000000","message":"let\u0027s just call configure() unconditionally on the start of the service for both transaction context managers (API and main)","commit_id":"5605ea89e20dac40ec3d91a1d9c4642e76f6f378"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fe077551897b69c94728001e8e6924d0b4164ae1","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                             \u0027facades\u0027: [_MAIN_FACADE, _API_FACADE]})"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"def _create_facade_lazily(facade, conf_group):"},{"line_number":179,"context_line":"    global _LOCK, _ENGINE_FACADE"},{"line_number":180,"context_line":"    if _ENGINE_FACADE[facade] is None:"},{"line_number":181,"context_line":"        with _LOCK:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_310ef632","line":178,"updated":"2015-09-10 15:12:48.000000000","message":"this can go away too","commit_id":"5605ea89e20dac40ec3d91a1d9c4642e76f6f378"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fe077551897b69c94728001e8e6924d0b4164ae1","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                        \u0027allow_none\u0027, restriction includes project_id \u003d None."},{"line_number":289,"context_line":"    \"\"\""},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    if hasattr(context, \u0027session\u0027):"},{"line_number":292,"context_line":"        session \u003d context.session"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    if session is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_d1021ab4","line":291,"updated":"2015-09-10 15:12:48.000000000","message":"hmm, doesn\u0027t hasattr() always return False here?\n\nMaybe we could use:\n\n   try:\n       session \u003d context.session\n   except AttributeError:\n       pass\n\nhere? (to let the session be injected properly)","commit_id":"5605ea89e20dac40ec3d91a1d9c4642e76f6f378"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6ad4a43ebb5b8bc2c9eb35789661bcf5975cc95","unresolved":false,"context_lines":[{"line_number":130,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"_ENGINE_FACADE \u003d {\u0027main\u0027: None, \u0027api\u0027: None}"},{"line_number":133,"context_line":"_MAIN_FACADE \u003d \u0027main\u0027"},{"line_number":134,"context_line":"_API_FACADE \u003d \u0027api\u0027"},{"line_number":135,"context_line":"_LOCK \u003d threading.Lock()"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_603ced93","line":133,"updated":"2015-09-14 12:05:43.000000000","message":"facades and lock must not be needed anymore","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"60169861a4c124b909fdedd1c814b358227c96c4","unresolved":false,"context_lines":[{"line_number":130,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"_ENGINE_FACADE \u003d {\u0027main\u0027: None, \u0027api\u0027: None}"},{"line_number":133,"context_line":"_MAIN_FACADE \u003d \u0027main\u0027"},{"line_number":134,"context_line":"_API_FACADE \u003d \u0027api\u0027"},{"line_number":135,"context_line":"_LOCK \u003d threading.Lock()"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_610d9a3d","line":133,"in_reply_to":"ba15a1d1_603ced93","updated":"2015-09-15 13:51:35.000000000","message":"Done","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6ad4a43ebb5b8bc2c9eb35789661bcf5975cc95","unresolved":false,"context_lines":[{"line_number":143,"context_line":"api_writer \u003d api_context_manager.writer"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def _create_facade(facade, conf_group):"},{"line_number":147,"context_line":"    # NOTE(dheeraj): This fragment is copied from oslo.db"},{"line_number":148,"context_line":"    kw \u003d dict("},{"line_number":149,"context_line":"        connection\u003dconf_group.connection,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_e06f9d90","line":146,"updated":"2015-09-14 12:05:43.000000000","message":"we can leave this for now, but it must be ok just to configure both context managers explicitly right after the config is initialised. There is no need to this lazily here.","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"60169861a4c124b909fdedd1c814b358227c96c4","unresolved":false,"context_lines":[{"line_number":143,"context_line":"api_writer \u003d api_context_manager.writer"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def _create_facade(facade, conf_group):"},{"line_number":147,"context_line":"    # NOTE(dheeraj): This fragment is copied from oslo.db"},{"line_number":148,"context_line":"    kw \u003d dict("},{"line_number":149,"context_line":"        connection\u003dconf_group.connection,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_2107a21d","line":146,"in_reply_to":"ba15a1d1_e06f9d90","updated":"2015-09-15 13:51:35.000000000","message":"Done","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6ad4a43ebb5b8bc2c9eb35789661bcf5975cc95","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                             \u0027facades\u0027: [_MAIN_FACADE, _API_FACADE]})"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"def _create_facade_lazily(facade, conf_group):"},{"line_number":179,"context_line":"    global _LOCK, _ENGINE_FACADE"},{"line_number":180,"context_line":"    if _ENGINE_FACADE[facade] is None:"},{"line_number":181,"context_line":"        with _LOCK:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_20f835e5","line":178,"updated":"2015-09-14 12:05:43.000000000","message":"This mustn\u0027t be needed anymore - EngineFacade provides lazy thread-safe initialization on its own.\n\nLet\u0027s just configure the both context managers and leave get_engine() / get_api_engine() until we fully switch to EngineFacade.","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"60169861a4c124b909fdedd1c814b358227c96c4","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                             \u0027facades\u0027: [_MAIN_FACADE, _API_FACADE]})"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"def _create_facade_lazily(facade, conf_group):"},{"line_number":179,"context_line":"    global _LOCK, _ENGINE_FACADE"},{"line_number":180,"context_line":"    if _ENGINE_FACADE[facade] is None:"},{"line_number":181,"context_line":"        with _LOCK:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_0c03b50e","line":178,"in_reply_to":"ba15a1d1_20f835e5","updated":"2015-09-15 13:51:35.000000000","message":"Done","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"eaaf79e510508f31794f99b7f5a123d8bca4eac0","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        connection\u003dconf_group.connection,"},{"line_number":144,"context_line":"        slave_connection\u003dconf_group.slave_connection,"},{"line_number":145,"context_line":"        sqlite_fk\u003dFalse,"},{"line_number":146,"context_line":"        __autocommit\u003dTrue,"},{"line_number":147,"context_line":"        expire_on_commit\u003dFalse,"},{"line_number":148,"context_line":"        mysql_sql_mode\u003dconf_group.mysql_sql_mode,"},{"line_number":149,"context_line":"        idle_timeout\u003dconf_group.idle_timeout,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_0ede0ddd","line":146,"updated":"2015-09-16 17:19:09.000000000","message":"that\u0027s interesting, if it\u0027s really the case in oslo.db, we should probably go and fix it there","commit_id":"3716fbc9115ef7d06d6123abf74b42f25d73b34e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"6c47e33cc9dbe42cb1486530e46da9f487a1034c","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"def configure(conf):"},{"line_number":156,"context_line":"    if not main_context_manager._factory._started:"},{"line_number":157,"context_line":"        main_context_manager.configure(**_get_db_conf(conf.database))"},{"line_number":158,"context_line":"    if not api_context_manager._factory._started:"},{"line_number":159,"context_line":"        api_context_manager.configure(**_get_db_conf(conf.api_database))"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_edc9ff26","line":156,"updated":"2015-09-18 15:40:28.000000000","message":"I\u0027m a bit uncomfortable with the fact, that we allow the no-op silently here: if the lazy initialisation of the EngineFacade has already been performed (_started is True) by the time configure() is called, we simply do nothing, but the caller will know nothing about that.\n\nThe only reason it\u0027s not implemented in oslo.db in the very same way (configure() is not allowed after _started is True) is that we want notify the caller explicitly, that the EngineFacade *will not* be reconfigured, so the subsequent configure() calls fail.\n\nI believe, it\u0027s not the production code you are having problems with, but tests instead. So why not figure out the way to handle the EngineFacade initialisation once in the DataBase fixture?","commit_id":"e48ad10e9c84723f088a55043fbf4d606e69f1b7"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bda030b7fa87eeb5f1566ea96d4c4a2e64890a13","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        connection\u003dconf_group.connection,"},{"line_number":138,"context_line":"        slave_connection\u003dconf_group.slave_connection,"},{"line_number":139,"context_line":"        sqlite_fk\u003dFalse,"},{"line_number":140,"context_line":"        __autocommit\u003dTrue,"},{"line_number":141,"context_line":"        expire_on_commit\u003dFalse,"},{"line_number":142,"context_line":"        mysql_sql_mode\u003dconf_group.mysql_sql_mode,"},{"line_number":143,"context_line":"        idle_timeout\u003dconf_group.idle_timeout,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a2ca52d_b21d8911","line":140,"updated":"2015-10-13 13:12:30.000000000","message":"Hmm, I didn\u0027t think we used autocommit... :( that sucks. Not an issue with this patch, though. Something to be addressed at a later time.","commit_id":"162a1ef2c33120d40970af1b4d6491518823efa3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"a589e7f89dcde3f6581d39ad25fdbae2a69a5a71","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        connection\u003dconf_group.connection,"},{"line_number":138,"context_line":"        slave_connection\u003dconf_group.slave_connection,"},{"line_number":139,"context_line":"        sqlite_fk\u003dFalse,"},{"line_number":140,"context_line":"        __autocommit\u003dTrue,"},{"line_number":141,"context_line":"        expire_on_commit\u003dFalse,"},{"line_number":142,"context_line":"        mysql_sql_mode\u003dconf_group.mysql_sql_mode,"},{"line_number":143,"context_line":"        idle_timeout\u003dconf_group.idle_timeout,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a2ca52d_cd5744c9","line":140,"in_reply_to":"5a2ca52d_b21d8911","updated":"2015-10-13 13:27:32.000000000","message":"\"connection\" and \"__autocommit\" are called so in oslo.db, that\u0027s why it was changed","commit_id":"162a1ef2c33120d40970af1b4d6491518823efa3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d0166adce0eff166293aa1d978c42292898f1ce0","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        connection\u003dconf_group.connection,"},{"line_number":138,"context_line":"        slave_connection\u003dconf_group.slave_connection,"},{"line_number":139,"context_line":"        sqlite_fk\u003dFalse,"},{"line_number":140,"context_line":"        __autocommit\u003dTrue,"},{"line_number":141,"context_line":"        expire_on_commit\u003dFalse,"},{"line_number":142,"context_line":"        mysql_sql_mode\u003dconf_group.mysql_sql_mode,"},{"line_number":143,"context_line":"        idle_timeout\u003dconf_group.idle_timeout,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a2ca52d_d7258e5c","line":140,"in_reply_to":"5a2ca52d_cd5744c9","updated":"2015-10-13 15:20:43.000000000","message":"Yes, I understand, thanks Pavel. I was just remarking that I was surprised to see we set autocommit to True by default...","commit_id":"162a1ef2c33120d40970af1b4d6491518823efa3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"39b10dc186f0e1c7f89b6fca70f2d90730d75d1a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        connection\u003dconf_group.connection,"},{"line_number":138,"context_line":"        slave_connection\u003dconf_group.slave_connection,"},{"line_number":139,"context_line":"        sqlite_fk\u003dFalse,"},{"line_number":140,"context_line":"        __autocommit\u003dTrue,"},{"line_number":141,"context_line":"        expire_on_commit\u003dFalse,"},{"line_number":142,"context_line":"        mysql_sql_mode\u003dconf_group.mysql_sql_mode,"},{"line_number":143,"context_line":"        idle_timeout\u003dconf_group.idle_timeout,"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a2ca52d_d7b34e09","line":140,"in_reply_to":"5a2ca52d_d7258e5c","updated":"2015-10-13 15:29:22.000000000","message":"understand you)","commit_id":"162a1ef2c33120d40970af1b4d6491518823efa3"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"2bbaa969e2af76e4f80ecaceb6eadd430551d728","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        connection\u003dconf_group.connection,"},{"line_number":138,"context_line":"        slave_connection\u003dconf_group.slave_connection,"},{"line_number":139,"context_line":"        sqlite_fk\u003dFalse,"},{"line_number":140,"context_line":"        __autocommit\u003dTrue,"},{"line_number":141,"context_line":"        expire_on_commit\u003dFalse,"},{"line_number":142,"context_line":"        mysql_sql_mode\u003dconf_group.mysql_sql_mode,"},{"line_number":143,"context_line":"        idle_timeout\u003dconf_group.idle_timeout,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a2ca52d_1279d4fc","line":140,"updated":"2015-10-13 15:46:04.000000000","message":"the use of autocommit here is only to suit the legacy use patterns of the facade.  It should *not* be used with the new @reader/@writer decorators.  It looks here like we\u0027re only updating the creational pattern and not the use of session.begin() everywhere, so this is needed. But if the plan is to get into some hybrid of @reader/@writer and the legacy facade on a method-by-method basis, the config here would need to be split out.","commit_id":"411489e003f18a34156e50c2a15fdd99252d2955"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e93c028204c70bffcca87fc5a2e2448d7e407de7","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"def get_engine(use_slave\u003dFalse):"},{"line_number":162,"context_line":"    return main_context_manager._factory.get_legacy_facade().get_engine("},{"line_number":163,"context_line":"        use_slave\u003duse_slave)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"fa80f949_612612d0","line":162,"updated":"2015-11-05 01:32:01.000000000","message":"I\u0027m not very keen on nova needing to touch an internal variable from the oslo_db library - is there another way around this?","commit_id":"cf69cac9be11b48f6b8f7f90299a50dd8eae5e1a"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"0aa11d16fb92cc97b3cc29e279f696bbc678ae85","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"def get_engine(use_slave\u003dFalse):"},{"line_number":162,"context_line":"    return main_context_manager._factory.get_legacy_facade().get_engine("},{"line_number":163,"context_line":"        use_slave\u003duse_slave)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"fa80f949_7314a143","line":162,"in_reply_to":"fa80f949_612612d0","updated":"2015-11-05 09:24:04.000000000","message":"The problem is that Nova has two DBs. Main db and API db. That is why we can\u0027t use some other way to do this because engine facade has public methods only for one db. \n\nTwo of these methods are temporary (get_session). We will remove them when we fully switch to engineFacade. The other two methods we planning to change when we create some legal way to get access to the factory in oslo.db. As you understand it will take a lot of time because we need to wait oslo.db release.","commit_id":"cf69cac9be11b48f6b8f7f90299a50dd8eae5e1a"}],"nova/test.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"eaaf79e510508f31794f99b7f5a123d8bca4eac0","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        self.mox \u003d mox_fixture.mox"},{"line_number":251,"context_line":"        self.stubs \u003d mox_fixture.stubs"},{"line_number":252,"context_line":"        self.addCleanup(self._clear_attrs)"},{"line_number":253,"context_line":"        self.addCleanup(sqlalchemy_api.reset_context_managers)"},{"line_number":254,"context_line":"        self.useFixture(fixtures.EnvironmentVariable(\u0027http_proxy\u0027))"},{"line_number":255,"context_line":"        self.policy \u003d self.useFixture(policy_fixture.PolicyFixture())"},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_ce91f5f2","line":253,"updated":"2015-09-16 17:19:09.000000000","message":"hmm, do we really need this for each test case run?","commit_id":"3716fbc9115ef7d06d6123abf74b42f25d73b34e"}],"nova/tests/fixtures.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"eaaf79e510508f31794f99b7f5a123d8bca4eac0","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            engine.dispose()"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def cleanup(self):"},{"line_number":217,"context_line":"        session.reset_context_managers()"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def reset(self):"},{"line_number":220,"context_line":"        self._cache_schema()"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_8e4c5d9f","line":217,"updated":"2015-09-16 17:19:09.000000000","message":"hmm, I\u0027m wondering why we need both this line and the one in test.py. This cleanup() must be executed per test case\n\nalso, we do reset the context managers after each test case, but we don\u0027t configure() newly created context manager, which must mean they use the very same DB","commit_id":"3716fbc9115ef7d06d6123abf74b42f25d73b34e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bda030b7fa87eeb5f1566ea96d4c4a2e64890a13","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        super(Database, self).__init__()"},{"line_number":199,"context_line":"        global SESSION_CONFIGURED"},{"line_number":200,"context_line":"        if not SESSION_CONFIGURED:"},{"line_number":201,"context_line":"            SESSION_CONFIGURED \u003d True"},{"line_number":202,"context_line":"            session.configure(CONF)"},{"line_number":203,"context_line":"        self.database \u003d database"},{"line_number":204,"context_line":"        if database \u003d\u003d \u0027main\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a2ca52d_b2cb4972","line":201,"updated":"2015-10-13 13:12:30.000000000","message":"Generally best to set this variable *after* the session has been configured on line 202, no?","commit_id":"162a1ef2c33120d40970af1b4d6491518823efa3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"39b10dc186f0e1c7f89b6fca70f2d90730d75d1a","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        super(Database, self).__init__()"},{"line_number":199,"context_line":"        global SESSION_CONFIGURED"},{"line_number":200,"context_line":"        if not SESSION_CONFIGURED:"},{"line_number":201,"context_line":"            SESSION_CONFIGURED \u003d True"},{"line_number":202,"context_line":"            session.configure(CONF)"},{"line_number":203,"context_line":"        self.database \u003d database"},{"line_number":204,"context_line":"        if database \u003d\u003d \u0027main\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a2ca52d_d7dcae48","line":201,"in_reply_to":"5a2ca52d_4db9f42d","updated":"2015-10-13 15:29:22.000000000","message":"swapped","commit_id":"162a1ef2c33120d40970af1b4d6491518823efa3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"a589e7f89dcde3f6581d39ad25fdbae2a69a5a71","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        super(Database, self).__init__()"},{"line_number":199,"context_line":"        global SESSION_CONFIGURED"},{"line_number":200,"context_line":"        if not SESSION_CONFIGURED:"},{"line_number":201,"context_line":"            SESSION_CONFIGURED \u003d True"},{"line_number":202,"context_line":"            session.configure(CONF)"},{"line_number":203,"context_line":"        self.database \u003d database"},{"line_number":204,"context_line":"        if database \u003d\u003d \u0027main\u0027:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a2ca52d_4db9f42d","line":201,"in_reply_to":"5a2ca52d_b2cb4972","updated":"2015-10-13 13:27:32.000000000","message":"I think the order doesn\u0027t matter here, the only thing that we want that \"configure\" is called only once. Should we still change it?","commit_id":"162a1ef2c33120d40970af1b4d6491518823efa3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a09c9b9b27da11e66e5a83d24747f46b7824172","unresolved":false,"context_lines":[{"line_number":196,"context_line":"class Database(fixtures.Fixture):"},{"line_number":197,"context_line":"    def __init__(self, database\u003d\u0027main\u0027):"},{"line_number":198,"context_line":"        super(Database, self).__init__()"},{"line_number":199,"context_line":"        global SESSION_CONFIGURED"},{"line_number":200,"context_line":"        if not SESSION_CONFIGURED:"},{"line_number":201,"context_line":"            session.configure(CONF)"},{"line_number":202,"context_line":"            SESSION_CONFIGURED \u003d True"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa80f949_87df3868","line":199,"updated":"2015-11-06 15:47:02.000000000","message":"So if this wasn\u0027t in patch set 29 and things didn\u0027t fail, why is this needed?  If it\u0027s truly needed, then we should somehow detect if it\u0027s not set and fail.","commit_id":"25d29a28df71ef71102fff912feef0ac61887560"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6ad4a43ebb5b8bc2c9eb35789661bcf5975cc95","unresolved":false,"context_lines":[{"line_number":505,"context_line":"    @mock.patch.object(sqlalchemyutils, \u0027model_query\u0027)"},{"line_number":506,"context_line":"    def test_model_query_use_context_session(self, mock_model_query,"},{"line_number":507,"context_line":"                                             mock_get_session):"},{"line_number":508,"context_line":"        self.flags(slave_connection\u003d\u0027foo://bar\u0027, group\u003d\u0027database\u0027)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        @sqlalchemy_api.main_reader"},{"line_number":511,"context_line":"        def fake_method(context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_c020594c","line":508,"updated":"2015-09-14 12:05:43.000000000","message":"hmm, why exactly do we set the \u0027slave_connection\u0027 here and not \u0027connection\u0027?","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"60169861a4c124b909fdedd1c814b358227c96c4","unresolved":false,"context_lines":[{"line_number":505,"context_line":"    @mock.patch.object(sqlalchemyutils, \u0027model_query\u0027)"},{"line_number":506,"context_line":"    def test_model_query_use_context_session(self, mock_model_query,"},{"line_number":507,"context_line":"                                             mock_get_session):"},{"line_number":508,"context_line":"        self.flags(slave_connection\u003d\u0027foo://bar\u0027, group\u003d\u0027database\u0027)"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        @sqlalchemy_api.main_reader"},{"line_number":511,"context_line":"        def fake_method(context):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_a8cc2736","line":508,"in_reply_to":"ba15a1d1_c020594c","updated":"2015-09-15 13:51:35.000000000","message":"seems to be not needed","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"67673cbd44d74d64db4735e597ff8375df847f22","unresolved":false,"context_lines":[{"line_number":520,"context_line":"class EngineFacadeTestCase(DbTestCase):"},{"line_number":521,"context_line":"    @mock.patch.object(sqlalchemy_api, \u0027get_session\u0027)"},{"line_number":522,"context_line":"    def test_use_single_context_session_writer(self, mock_get_session):"},{"line_number":523,"context_line":"        \"\"\"Checks that session in context would not be overwritten by"},{"line_number":524,"context_line":"        annotation @sqlalchemy_api.main_context_manager.writer if annotation is"},{"line_number":525,"context_line":"        used twice."},{"line_number":526,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa80f949_17fbafc2","line":523,"updated":"2015-11-05 15:14:05.000000000","message":"nit: if you respin, make this just # comments since docstrings can mess up unit test failure output formatting.","commit_id":"69698b7d198df3ce16bc10e0e79537797c04a4b4"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"4768f72cacdce2aa8a9e5dc401fad8ae85e3d24e","unresolved":false,"context_lines":[{"line_number":520,"context_line":"class EngineFacadeTestCase(DbTestCase):"},{"line_number":521,"context_line":"    @mock.patch.object(sqlalchemy_api, \u0027get_session\u0027)"},{"line_number":522,"context_line":"    def test_use_single_context_session_writer(self, mock_get_session):"},{"line_number":523,"context_line":"        \"\"\"Checks that session in context would not be overwritten by"},{"line_number":524,"context_line":"        annotation @sqlalchemy_api.main_context_manager.writer if annotation is"},{"line_number":525,"context_line":"        used twice."},{"line_number":526,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa80f949_d23535da","line":523,"in_reply_to":"fa80f949_17fbafc2","updated":"2015-11-05 15:29:19.000000000","message":"Done","commit_id":"69698b7d198df3ce16bc10e0e79537797c04a4b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"67673cbd44d74d64db4735e597ff8375df847f22","unresolved":false,"context_lines":[{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    @mock.patch.object(sqlalchemy_api, \u0027get_session\u0027)"},{"line_number":544,"context_line":"    def test_use_single_context_session_reader(self, mock_get_session):"},{"line_number":545,"context_line":"        \"\"\"Checks that session in context would not be overwritten by"},{"line_number":546,"context_line":"        annotation @sqlalchemy_api.main_context_manager.reader if annotation is"},{"line_number":547,"context_line":"        used twice."},{"line_number":548,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa80f949_b7be63d2","line":545,"updated":"2015-11-05 15:14:05.000000000","message":"ditto","commit_id":"69698b7d198df3ce16bc10e0e79537797c04a4b4"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"4768f72cacdce2aa8a9e5dc401fad8ae85e3d24e","unresolved":false,"context_lines":[{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    @mock.patch.object(sqlalchemy_api, \u0027get_session\u0027)"},{"line_number":544,"context_line":"    def test_use_single_context_session_reader(self, mock_get_session):"},{"line_number":545,"context_line":"        \"\"\"Checks that session in context would not be overwritten by"},{"line_number":546,"context_line":"        annotation @sqlalchemy_api.main_context_manager.reader if annotation is"},{"line_number":547,"context_line":"        used twice."},{"line_number":548,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa80f949_f23079ea","line":545,"in_reply_to":"fa80f949_b7be63d2","updated":"2015-11-05 15:29:19.000000000","message":"Done","commit_id":"69698b7d198df3ce16bc10e0e79537797c04a4b4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"136c8ed96533c9d1e95b270227b0ece5e5bc3b42","unresolved":false,"context_lines":[{"line_number":512,"context_line":"            return session"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"        session \u003d fake_method(self.context)"},{"line_number":515,"context_line":"        mock_get_session.assert_not_called()"},{"line_number":516,"context_line":"        mock_model_query.assert_called_once_with(models.Instance, session,"},{"line_number":517,"context_line":"                                                 None, deleted\u003dFalse)"},{"line_number":518,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa80f949_facb6f51","line":515,"updated":"2015-11-05 16:29:49.000000000","message":"assert_not_called() is not a method of mock.MagicMock(), which means that it will be mocked out and will not raise an exception. :(\n\nYou need to do the following instead:\n\n self.assertFalse(mock_get_session.called)","commit_id":"9eaf34585c7d24f3acfbcc09ac9e73ae72c73d9f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"136c8ed96533c9d1e95b270227b0ece5e5bc3b42","unresolved":false,"context_lines":[{"line_number":536,"context_line":"            return session"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"        parent_session, child_session \u003d fake_parent_method(self.context)"},{"line_number":539,"context_line":"        mock_get_session.assert_not_called()"},{"line_number":540,"context_line":"        self.assertEqual(parent_session, child_session)"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":"    @mock.patch.object(sqlalchemy_api, \u0027get_session\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa80f949_bac5e73c","line":539,"updated":"2015-11-05 16:29:49.000000000","message":"ditto.","commit_id":"9eaf34585c7d24f3acfbcc09ac9e73ae72c73d9f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"136c8ed96533c9d1e95b270227b0ece5e5bc3b42","unresolved":false,"context_lines":[{"line_number":557,"context_line":"            return session"},{"line_number":558,"context_line":""},{"line_number":559,"context_line":"        parent_session, child_session \u003d fake_parent_method(self.context)"},{"line_number":560,"context_line":"        mock_get_session.assert_not_called()"},{"line_number":561,"context_line":"        self.assertEqual(parent_session, child_session)"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"fa80f949_9ae103d3","line":560,"updated":"2015-11-05 16:29:49.000000000","message":"ditto.","commit_id":"9eaf34585c7d24f3acfbcc09ac9e73ae72c73d9f"}],"nova/tests/unit/test_context.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b6ad4a43ebb5b8bc2c9eb35789661bcf5975cc95","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        values2 \u003d ctx.to_dict()"},{"line_number":230,"context_line":"        self.assertEqual(values, values2)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_can_pickle_context(self):"},{"line_number":233,"context_line":"        # Make sure that RequestContext is possible to pickle. This is"},{"line_number":234,"context_line":"        # required for memcache backend to work correctly."},{"line_number":235,"context_line":"        ctx \u003d context.RequestContext(\u0027111\u0027, \u0027222\u0027, admin\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_80f101d0","line":232,"updated":"2015-09-14 12:05:43.000000000","message":"this is great! I\u0027m ok with both - doing it right here or in another patch.","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"60169861a4c124b909fdedd1c814b358227c96c4","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        values2 \u003d ctx.to_dict()"},{"line_number":230,"context_line":"        self.assertEqual(values, values2)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_can_pickle_context(self):"},{"line_number":233,"context_line":"        # Make sure that RequestContext is possible to pickle. This is"},{"line_number":234,"context_line":"        # required for memcache backend to work correctly."},{"line_number":235,"context_line":"        ctx \u003d context.RequestContext(\u0027111\u0027, \u0027222\u0027, admin\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_c1158649","line":232,"in_reply_to":"ba15a1d1_80f101d0","updated":"2015-09-15 13:51:35.000000000","message":"yes, good test for pickle here","commit_id":"a93392a4f746a711edce39431834cfe5e3f700d3"}],"requirements.txt":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"b4c4a17a5e7ce3ec2298252b3c93ffcc1cfb8dda","unresolved":false,"context_lines":[{"line_number":41,"context_line":"oslo.reports\u003e\u003d0.5.0 # Apache-2.0"},{"line_number":42,"context_line":"oslo.serialization\u003e\u003d1.4.0 # Apache-2.0"},{"line_number":43,"context_line":"oslo.utils\u003e\u003d2.4.0 # Apache-2.0"},{"line_number":44,"context_line":"oslo.db\u003e\u003d3.0.0 # Apache-2.0"},{"line_number":45,"context_line":"oslo.rootwrap\u003e\u003d2.0.0 # Apache-2.0"},{"line_number":46,"context_line":"oslo.messaging!\u003d1.17.0,!\u003d1.17.1,!\u003d2.6.0,!\u003d2.6.1,\u003e\u003d1.16.0 # Apache-2.0"},{"line_number":47,"context_line":"oslo.i18n\u003e\u003d1.5.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":20,"id":"3a29b11f_7ade946e","line":44,"updated":"2015-10-20 10:57:08.000000000","message":"can we simply rebase this on the top of https://review.openstack.org/#/c/236944/ , so that we don\u0027t run into a merge conflict when the latter is merged?","commit_id":"086dbbd7389ff2ed8e63d84350a6f9dce32ea3c7"}]}
