)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"395521e2ad0cd141da7577660fff778093b9b035","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use new oslo db EngineFacade"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Legacy EngineFacade was derecated a while ago, using new"},{"line_number":10,"context_line":"EngineFacade system is the recommended way to work with"},{"line_number":11,"context_line":"db engine and session."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bff0334d_980e828b","line":9,"updated":"2017-04-07 00:02:26.000000000","message":"s/derecated/deprecated/","commit_id":"cde91a17ce1d582a37baaf57c62b220a37171d28"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"395521e2ad0cd141da7577660fff778093b9b035","unresolved":false,"context_lines":[{"line_number":10,"context_line":"EngineFacade system is the recommended way to work with"},{"line_number":11,"context_line":"db engine and session."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The new system have a lot of notable changes[1]:"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":" * Thread-safe initialization of EngineFacade;"},{"line_number":16,"context_line":" * Declarative reader/writer transactions separation;"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"bff0334d_78117eac","line":13,"updated":"2017-04-07 00:02:26.000000000","message":"s/have/has/","commit_id":"cde91a17ce1d582a37baaf57c62b220a37171d28"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c2b9ea2b4bac4fa65b0904034cc534f5761fe3c9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"The new system has a lot of notable changes[1]:"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":" * Thread-safe initialization of EngineFacade;"},{"line_number":16,"context_line":" * Declarative reader/writer transactions separation;"},{"line_number":17,"context_line":" * Transaction scope defined by developer-specified context."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"[1] http://specs.openstack.org/openstack/oslo-specs/specs/kilo/make-enginefacade-a-facade.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5ff73747_234e53c1","line":16,"range":{"start_line":16,"start_character":1,"end_line":16,"end_character":53},"updated":"2017-05-03 07:22:33.000000000","message":"this patch doesn\u0027t follow the declarative separation; the context isn\u0027t used as a decorator here.","commit_id":"828e5c8317bb781f2b472a0b83de8542a2341a3e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"081e2a611a6713c954baa1d761ce8e932250c950","unresolved":false,"context_lines":[{"line_number":13,"context_line":"The new system has a lot of notable changes[1]:"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":" * Thread-safe initialization of EngineFacade;"},{"line_number":16,"context_line":" * Declarative reader/writer transactions separation;"},{"line_number":17,"context_line":" * Transaction scope defined by developer-specified context."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"[1] http://specs.openstack.org/openstack/oslo-specs/specs/kilo/make-enginefacade-a-facade.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5ff73747_b97cd4eb","line":16,"range":{"start_line":16,"start_character":1,"end_line":16,"end_character":53},"in_reply_to":"5ff73747_234e53c1","updated":"2017-05-03 08:17:00.000000000","message":"I don\u0027t say I use it in this patch, but I\u0027m going to put all this logic in db api which will be separate patch.","commit_id":"828e5c8317bb781f2b472a0b83de8542a2341a3e"}],"ironic_inspector/db.py":[{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"395521e2ad0cd141da7577660fff778093b9b035","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"def init():"},{"line_number":135,"context_line":"    \"\"\"Initialize the database.\"\"\""},{"line_number":136,"context_line":"    return get_writer_session()"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_988322cd","line":135,"updated":"2017-04-07 00:02:26.000000000","message":"This docstring should be updated, I think it would be good to also rename this function, if possible.\nSince get_reader_session is used explicitly, maybe get_writer_session should be too as in ln 157 (and then init method could be removed)?","commit_id":"cde91a17ce1d582a37baaf57c62b220a37171d28"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5fc96e13c50d231f1611453959eeb9f5510b1a49","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"def init():"},{"line_number":135,"context_line":"    \"\"\"Initialize the database.\"\"\""},{"line_number":136,"context_line":"    return get_writer_session()"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_20639444","line":135,"in_reply_to":"bff0334d_6a83d6cd","updated":"2017-04-07 21:26:49.000000000","message":"dropping return statement is a good idea - it looks confusing.\nI think it is also worth to include your explanation in thew docstring or a comment.","commit_id":"cde91a17ce1d582a37baaf57c62b220a37171d28"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"aa244e7a3bb53b010e3bdc50b1819d6c95fef596","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"def init():"},{"line_number":135,"context_line":"    \"\"\"Initialize the database.\"\"\""},{"line_number":136,"context_line":"    return get_writer_session()"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_6a83d6cd","line":135,"in_reply_to":"bff0334d_988322cd","updated":"2017-04-07 09:20:42.000000000","message":"get_writer_session will be used explicitly, we are trying to get session on init to initialize context manager and verify that db is available.\n\nI guess return statement is confusing here, maybe we should drop it, actually, I don\u0027t care much","commit_id":"cde91a17ce1d582a37baaf57c62b220a37171d28"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"395521e2ad0cd141da7577660fff778093b9b035","unresolved":false,"context_lines":[{"line_number":139,"context_line":"def get_engine():"},{"line_number":140,"context_line":"    \"\"\"Get a database engine object.\"\"\""},{"line_number":141,"context_line":"    ctxt_mgr \u003d get_context_manager()"},{"line_number":142,"context_line":"    return ctxt_mgr.get_legacy_facade().get_engine()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"def model_query(model, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_b8f38673","line":142,"updated":"2017-04-07 00:02:26.000000000","message":"is this method still used (I don\u0027t suspect it\u0027s not, I\u0027m just asking :))?","commit_id":"cde91a17ce1d582a37baaf57c62b220a37171d28"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"aa244e7a3bb53b010e3bdc50b1819d6c95fef596","unresolved":false,"context_lines":[{"line_number":139,"context_line":"def get_engine():"},{"line_number":140,"context_line":"    \"\"\"Get a database engine object.\"\"\""},{"line_number":141,"context_line":"    ctxt_mgr \u003d get_context_manager()"},{"line_number":142,"context_line":"    return ctxt_mgr.get_legacy_facade().get_engine()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"def model_query(model, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_ea4fe6ba","line":142,"in_reply_to":"bff0334d_b8f38673","updated":"2017-04-07 09:20:42.000000000","message":"I\u0027d prefer to keep it as part of db api","commit_id":"cde91a17ce1d582a37baaf57c62b220a37171d28"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5fc96e13c50d231f1611453959eeb9f5510b1a49","unresolved":false,"context_lines":[{"line_number":139,"context_line":"def get_engine():"},{"line_number":140,"context_line":"    \"\"\"Get a database engine object.\"\"\""},{"line_number":141,"context_line":"    ctxt_mgr \u003d get_context_manager()"},{"line_number":142,"context_line":"    return ctxt_mgr.get_legacy_facade().get_engine()"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"def model_query(model, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bff0334d_00665052","line":142,"in_reply_to":"bff0334d_ea4fe6ba","updated":"2017-04-07 21:26:49.000000000","message":"fine by me then","commit_id":"cde91a17ce1d582a37baaf57c62b220a37171d28"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"605606eff40bec86f1315aa7856c8211acf243d6","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    get_writer_session()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"def get_engine():"},{"line_number":144,"context_line":"    \"\"\"Get a database engine object.\"\"\""},{"line_number":145,"context_line":"    ctxt_mgr \u003d get_context_manager()"},{"line_number":146,"context_line":"    return ctxt_mgr.get_legacy_facade().get_engine()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_c18a3962","line":143,"updated":"2017-04-12 12:20:48.000000000","message":"do we still need this function? I\u0027m worried about \"legacy\" here.","commit_id":"eb917ac8c34aa755665a492d07635b5b99c81c47"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"eb5a41d35cf32d4ec902353389d7a46acf72bfd2","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    get_writer_session()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"def get_engine():"},{"line_number":144,"context_line":"    \"\"\"Get a database engine object.\"\"\""},{"line_number":145,"context_line":"    ctxt_mgr \u003d get_context_manager()"},{"line_number":146,"context_line":"    return ctxt_mgr.get_legacy_facade().get_engine()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_877b77bc","line":143,"in_reply_to":"bff0334d_c18a3962","updated":"2017-04-27 14:15:22.000000000","message":"I was going to use it, but looks like it would be more natural to use particular type session for getting engine.","commit_id":"eb917ac8c34aa755665a492d07635b5b99c81c47"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"605606eff40bec86f1315aa7856c8211acf243d6","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    :returns: The transaction context manager."},{"line_number":182,"context_line":"    \"\"\""},{"line_number":183,"context_line":"    if _CTX_MANAGER is None:"},{"line_number":184,"context_line":"        return _create_context_manager()"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    return _CTX_MANAGER"}],"source_content_type":"text/x-python","patch_set":2,"id":"bff0334d_a1ebb510","line":183,"updated":"2017-04-12 12:20:48.000000000","message":"this check duplicates one one line 169. I suggest we move the content of _create_context_manager to this function","commit_id":"eb917ac8c34aa755665a492d07635b5b99c81c47"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"eb5a41d35cf32d4ec902353389d7a46acf72bfd2","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    :returns: The transaction context manager."},{"line_number":182,"context_line":"    \"\"\""},{"line_number":183,"context_line":"    if _CTX_MANAGER is None:"},{"line_number":184,"context_line":"        return _create_context_manager()"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    return _CTX_MANAGER"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_a7579326","line":183,"in_reply_to":"bff0334d_a1ebb510","updated":"2017-04-27 14:15:22.000000000","message":"I could drop if check in _create_context_manager, I\u0027m using separate method under the lock for ensure that only one thread will create context","commit_id":"eb917ac8c34aa755665a492d07635b5b99c81c47"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c2b9ea2b4bac4fa65b0904034cc534f5761fe3c9","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Base \u003d declarative_base(cls\u003dModelBase)"},{"line_number":41,"context_line":"CONF \u003d cfg.CONF"},{"line_number":42,"context_line":"_DEFAULT_SQL_CONNECTION \u003d \u0027sqlite:///ironic_inspector.sqlite\u0027"},{"line_number":43,"context_line":"_CTX_MANAGER \u003d None"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_3e0e6a32","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":15},"updated":"2017-05-03 07:22:33.000000000","message":"This is not used anymore?","commit_id":"828e5c8317bb781f2b472a0b83de8542a2341a3e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"081e2a611a6713c954baa1d761ce8e932250c950","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Base \u003d declarative_base(cls\u003dModelBase)"},{"line_number":41,"context_line":"CONF \u003d cfg.CONF"},{"line_number":42,"context_line":"_DEFAULT_SQL_CONNECTION \u003d \u0027sqlite:///ironic_inspector.sqlite\u0027"},{"line_number":43,"context_line":"_CTX_MANAGER \u003d None"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_f9eedcb2","line":41,"range":{"start_line":41,"start_character":0,"end_line":41,"end_character":15},"in_reply_to":"5ff73747_3e0e6a32","updated":"2017-05-03 08:17:00.000000000","message":"I guess it wasn\u0027t used anyway, but line 45 is use case for it","commit_id":"828e5c8317bb781f2b472a0b83de8542a2341a3e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c2b9ea2b4bac4fa65b0904034cc534f5761fe3c9","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    return _CTX_MANAGER"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def get_reader_session():"},{"line_number":183,"context_line":"    \"\"\"Help method to get reader session."},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    :returns: The reader session."},{"line_number":186,"context_line":"    \"\"\""},{"line_number":187,"context_line":"    return get_context_manager().reader.get_sessionmaker()()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"def get_writer_session():"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_8311a7af","line":187,"range":{"start_line":182,"start_character":0,"end_line":187,"end_character":60},"updated":"2017-05-03 07:22:33.000000000","message":"remove, never used","commit_id":"828e5c8317bb781f2b472a0b83de8542a2341a3e"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"081e2a611a6713c954baa1d761ce8e932250c950","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    return _CTX_MANAGER"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"def get_reader_session():"},{"line_number":183,"context_line":"    \"\"\"Help method to get reader session."},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    :returns: The reader session."},{"line_number":186,"context_line":"    \"\"\""},{"line_number":187,"context_line":"    return get_context_manager().reader.get_sessionmaker()()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"def get_writer_session():"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_d9044081","line":187,"range":{"start_line":182,"start_character":0,"end_line":187,"end_character":60},"in_reply_to":"5ff73747_8311a7af","updated":"2017-05-03 08:17:00.000000000","message":"it should be used for read only access which requires more refactoring work.","commit_id":"828e5c8317bb781f2b472a0b83de8542a2341a3e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"1d97e26e7c4b7cba147eb8f56ecba94eaacbb174","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :returns: The transaction context manager."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    if _CTX_MANAGER is None:"},{"line_number":177,"context_line":"        return _create_context_manager()"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    return _CTX_MANAGER"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3f044301_47c0dd2a","line":177,"range":{"start_line":176,"start_character":3,"end_line":177,"end_character":40},"updated":"2017-05-10 13:45:42.000000000","message":"it is IMO not very obvious that the global _CTX_MANAGER is getting updated during this process; how about _create_context_manager not using the global but get_context_manager? Would also help separating the concerns (laziness vs creation).\n\nAlso makes me wonder whether not to create a basic unittest for this module.","commit_id":"14e778ac2028d7263f48793152929c1d74227028"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"0a6a80f7973578cb1984e7735b37d7b8230f1843","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    :returns: The transaction context manager."},{"line_number":175,"context_line":"    \"\"\""},{"line_number":176,"context_line":"    if _CTX_MANAGER is None:"},{"line_number":177,"context_line":"        return _create_context_manager()"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    return _CTX_MANAGER"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3f044301_8220134a","line":177,"range":{"start_line":176,"start_character":3,"end_line":177,"end_character":40},"in_reply_to":"3f044301_47c0dd2a","updated":"2017-05-10 14:19:09.000000000","message":"| Also makes me wonder whether not to create a basic unittest...\n\n  Yeah, we don\u0027t have separate tests for this, I\u0027ll add them in next patch with db api refactoring, anyway I\u0027am going to split this code","commit_id":"14e778ac2028d7263f48793152929c1d74227028"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f378678e24b59b850a362dc20e230e57f6d7a39c","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    :returns: The reader session."},{"line_number":188,"context_line":"    \"\"\""},{"line_number":189,"context_line":"    return get_context_manager().reader.get_sessionmaker()()"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"def get_writer_session():"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_b52017b2","line":189,"range":{"start_line":189,"start_character":56,"end_line":189,"end_character":60},"updated":"2017-06-01 08:02:13.000000000","message":"huh, interesting interface","commit_id":"6484793ca3c67c60722dcc1ef883fc2ceb345004"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"82c2454f9d92fe37ecf316a58866f746f1910ad8","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    :returns: The reader session."},{"line_number":188,"context_line":"    \"\"\""},{"line_number":189,"context_line":"    return get_context_manager().reader.get_sessionmaker()()"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"def get_writer_session():"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_f038dd3d","line":189,"range":{"start_line":189,"start_character":56,"end_line":189,"end_character":60},"in_reply_to":"df140735_b52017b2","updated":"2017-06-01 08:22:10.000000000","message":"I don\u0027t think we are going to use sessionmaker in near future, I was trying to simplify code","commit_id":"6484793ca3c67c60722dcc1ef883fc2ceb345004"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"4d8fe71b33330460e05dc947e4641e7dc8b87650","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"    :returns: The reader session."},{"line_number":188,"context_line":"    \"\"\""},{"line_number":189,"context_line":"    return get_context_manager().reader.get_sessionmaker()()"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"def get_writer_session():"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_942070b2","line":189,"range":{"start_line":189,"start_character":56,"end_line":189,"end_character":60},"in_reply_to":"df140735_f038dd3d","updated":"2017-06-01 12:02:21.000000000","message":"no worries","commit_id":"6484793ca3c67c60722dcc1ef883fc2ceb345004"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3d791233256014c4e68366a533283da69be8cf1d","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    :param session: if present, the session to use"},{"line_number":152,"context_line":"    \"\"\""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    session \u003d kwargs.get(\u0027session\u0027) or get_session()"},{"line_number":155,"context_line":"    query \u003d session.query(model, *args)"},{"line_number":156,"context_line":"    return query"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f0e0f27_467dfc6c","side":"PARENT","line":153,"updated":"2017-06-09 11:07:53.000000000","message":"nit: unrelated change but I like it the new way more ;)","commit_id":"7761ee786d94337b52cf882765718e19782c71e2"}],"ironic_inspector/test/unit/test_db.py":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3d791233256014c4e68366a533283da69be8cf1d","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        mock_reader.assert_called_once_with()"},{"line_number":29,"context_line":"        mock_session.query.assert_called_once_with(\u0027db.Node\u0027)"},{"line_number":30,"context_line":"        self.assertEqual(fake_query, query)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch.object(db, \u0027get_writer_session\u0027, autospec\u003dTrue)"},{"line_number":33,"context_line":"    def test_ensure_transaction_new_session(self, mock_writer):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f0e0f27_26456818","line":30,"range":{"start_line":30,"start_character":13,"end_line":30,"end_character":24},"updated":"2017-06-09 11:07:53.000000000","message":"nit: self.assertIs","commit_id":"2146a2ace2b918d99e97a9543c1b55bdde15d08d"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3d791233256014c4e68366a533283da69be8cf1d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        mock_reader.assert_called_once_with()"},{"line_number":29,"context_line":"        mock_session.query.assert_called_once_with(\u0027db.Node\u0027)"},{"line_number":30,"context_line":"        self.assertEqual(fake_query, query)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch.object(db, \u0027get_writer_session\u0027, autospec\u003dTrue)"},{"line_number":33,"context_line":"    def test_ensure_transaction_new_session(self, mock_writer):"},{"line_number":34,"context_line":"        mock_session \u003d mock_writer.return_value"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f0e0f27_e6cbf06f","line":31,"updated":"2017-06-09 11:07:53.000000000","message":"missing test_model_query_session with session passed in","commit_id":"2146a2ace2b918d99e97a9543c1b55bdde15d08d"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c4248a8e0d7f29d5d77c875d51edd74cf0395f41","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        mock_reader.assert_called_once_with()"},{"line_number":29,"context_line":"        mock_session.query.assert_called_once_with(\u0027db.Node\u0027)"},{"line_number":30,"context_line":"        self.assertEqual(fake_query, query)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @mock.patch.object(db, \u0027get_writer_session\u0027, autospec\u003dTrue)"},{"line_number":33,"context_line":"    def test_ensure_transaction_new_session(self, mock_writer):"},{"line_number":34,"context_line":"        mock_session \u003d mock_writer.return_value"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f231b9d_712be8ea","line":31,"in_reply_to":"9f0e0f27_e6cbf06f","updated":"2017-06-12 15:10:56.000000000","message":"thanks, I\u0027ll add","commit_id":"2146a2ace2b918d99e97a9543c1b55bdde15d08d"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"3d791233256014c4e68366a533283da69be8cf1d","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        with db.ensure_transaction(session\u003dmock_session) as session:"},{"line_number":46,"context_line":"            self.assertFalse(mock_writer.called)"},{"line_number":47,"context_line":"            mock_session.begin.assert_called_once_with(subtransactions\u003dTrue)"},{"line_number":48,"context_line":"            self.assertEqual(mock_session, session)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @mock.patch.object(db.enginefacade, \u0027transaction_context\u0027, autospec\u003dTrue)"},{"line_number":51,"context_line":"    def test__create_context_manager(self, mock_cnxt):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9f0e0f27_f123a804","line":48,"range":{"start_line":48,"start_character":17,"end_line":48,"end_character":28},"updated":"2017-06-09 11:07:53.000000000","message":"nit: assertIs","commit_id":"2146a2ace2b918d99e97a9543c1b55bdde15d08d"}],"ironic_inspector/test/unit/test_migrations.py":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c2b9ea2b4bac4fa65b0904034cc534f5761fe3c9","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def _walk_versions(self, engine\u003dNone, alembic_cfg\u003dNone):"},{"line_number":97,"context_line":"        # Determine latest version script from the repo, then"},{"line_number":98,"context_line":"        # upgrade from 1 through to the latest, with no data"},{"line_number":99,"context_line":"        # in the databases. This just checks that the sfchema itself"},{"line_number":100,"context_line":"        # upgrades successfully."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        with patch_with_engine(engine):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_7e73d2b2","line":99,"range":{"start_line":99,"start_character":55,"end_line":99,"end_character":56},"updated":"2017-05-03 07:22:33.000000000","message":"nit: s/f//","commit_id":"828e5c8317bb781f2b472a0b83de8542a2341a3e"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f378678e24b59b850a362dc20e230e57f6d7a39c","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"@contextlib.contextmanager"},{"line_number":87,"context_line":"def patch_with_engine(engine):"},{"line_number":88,"context_line":"    with mock.patch.object(db, \u0027get_writer_session\u0027) as patch_w_sess,\\"},{"line_number":89,"context_line":"            mock.patch.object(db, \u0027get_reader_session\u0027) as patch_r_sess:"},{"line_number":90,"context_line":"        patch_w_sess.return_value \u003d patch_r_sess.return_value \u003d ("},{"line_number":91,"context_line":"            orm.get_maker(engine)())"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_904be157","line":88,"range":{"start_line":88,"start_character":68,"end_line":88,"end_character":70},"updated":"2017-06-01 08:02:13.000000000","message":"nit: , \\ (I guess?)","commit_id":"6484793ca3c67c60722dcc1ef883fc2ceb345004"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"f378678e24b59b850a362dc20e230e57f6d7a39c","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def _walk_versions(self, engine\u003dNone, alembic_cfg\u003dNone):"},{"line_number":97,"context_line":"        # Determine latest version script from the repo, then"},{"line_number":98,"context_line":"        # upgrade from 1 through to the latest, with no data"},{"line_number":99,"context_line":"        # in the databases. This just checks that the sfchema itself"},{"line_number":100,"context_line":"        # upgrades successfully."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        with patch_with_engine(engine):"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_906401e6","line":99,"range":{"start_line":99,"start_character":55,"end_line":99,"end_character":56},"updated":"2017-06-01 08:02:13.000000000","message":"unrelated change","commit_id":"6484793ca3c67c60722dcc1ef883fc2ceb345004"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"82c2454f9d92fe37ecf316a58866f746f1910ad8","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def _walk_versions(self, engine\u003dNone, alembic_cfg\u003dNone):"},{"line_number":97,"context_line":"        # Determine latest version script from the repo, then"},{"line_number":98,"context_line":"        # upgrade from 1 through to the latest, with no data"},{"line_number":99,"context_line":"        # in the databases. This just checks that the sfchema itself"},{"line_number":100,"context_line":"        # upgrades successfully."},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        with patch_with_engine(engine):"}],"source_content_type":"text/x-python","patch_set":9,"id":"df140735_70728d13","line":99,"range":{"start_line":99,"start_character":55,"end_line":99,"end_character":56},"in_reply_to":"df140735_906401e6","updated":"2017-06-01 08:22:10.000000000","message":"Oops, always I put \u0027f\u0027 (","commit_id":"6484793ca3c67c60722dcc1ef883fc2ceb345004"}]}
