)]}'
{"oslo/db/sqlalchemy/session.py":[{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"e928f454fd93457c09433ca5edbab07d066a9b58","unresolved":false,"context_lines":[{"line_number":717,"context_line":"                                       query_cls\u003dQuery)"},{"line_number":718,"context_line":""},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"def _setup_stacktrace(engine, connection_trace, dbi_module\u003dNone):"},{"line_number":721,"context_line":"    if not connection_trace:"},{"line_number":722,"context_line":"        return"},{"line_number":723,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae8d1ca_290ec68d","line":720,"updated":"2014-05-29 15:56:20.000000000","message":"NIT: I think `if` `elif` statements will be more obvious and logically correct, because you have three mutually exclusive cases. And now there is three output points which don\u0027t return anything.","commit_id":"53c976efdef9c88efab1b9afe1430a8eb42360ea"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"72e42f98597cb707a72dd22e7f927cbb5ac6685d","unresolved":false,"context_lines":[{"line_number":717,"context_line":"                                       query_cls\u003dQuery)"},{"line_number":718,"context_line":""},{"line_number":719,"context_line":""},{"line_number":720,"context_line":"def _setup_stacktrace(engine, connection_trace, dbi_module\u003dNone):"},{"line_number":721,"context_line":"    if not connection_trace:"},{"line_number":722,"context_line":"        return"},{"line_number":723,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_3e790594","line":720,"in_reply_to":"3ae8d1ca_290ec68d","updated":"2014-05-29 21:10:06.000000000","message":"Done","commit_id":"53c976efdef9c88efab1b9afe1430a8eb42360ea"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a640ecbd9177f37b57434e005b05b9ab2e2435cf","unresolved":false,"context_lines":[{"line_number":780,"context_line":"        import ibm_db_dbi"},{"line_number":781,"context_line":"        dbi_module \u003d ibm_db_dbi"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    import traceback"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"    old_execute \u003d dbi_module.Cursor.execute"},{"line_number":786,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_1d64ef47","line":783,"updated":"2014-06-10 13:55:47.000000000","message":"It should be safe to include this at the top of the module.","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"40a4fc30d6499f6608276483c04a634280c390bd","unresolved":false,"context_lines":[{"line_number":780,"context_line":"        import ibm_db_dbi"},{"line_number":781,"context_line":"        dbi_module \u003d ibm_db_dbi"},{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    import traceback"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"    old_execute \u003d dbi_module.Cursor.execute"},{"line_number":786,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_2a6cf607","line":783,"in_reply_to":"1ae5cdf2_1d64ef47","updated":"2014-06-25 17:52:38.000000000","message":"Done","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a640ecbd9177f37b57434e005b05b9ab2e2435cf","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        stack \u003d \u0027\u0027"},{"line_number":789,"context_line":"        for file, line, method, function in traceback.extract_stack():"},{"line_number":790,"context_line":"            # exclude various common things from trace"},{"line_number":791,"context_line":"            if method \u003d\u003d \u0027wrapper\u0027 or method \u003d\u003d \u0027_wrap\u0027:"},{"line_number":792,"context_line":"                continue"},{"line_number":793,"context_line":"            if method \u003d\u003d \u0027_inner\u0027 or method \u003d\u003d \u0027inner\u0027:"},{"line_number":794,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_dda52748","line":791,"updated":"2014-06-10 13:55:47.000000000","message":"This test and the next one don\u0027t include the filename checks that the version of _do_execute for MySQL include. That means we\u0027re going to strip out more instances of these decorator functions, which might not be what we want. Did you make the change on purpose?","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"40a4fc30d6499f6608276483c04a634280c390bd","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        stack \u003d \u0027\u0027"},{"line_number":789,"context_line":"        for file, line, method, function in traceback.extract_stack():"},{"line_number":790,"context_line":"            # exclude various common things from trace"},{"line_number":791,"context_line":"            if method \u003d\u003d \u0027wrapper\u0027 or method \u003d\u003d \u0027_wrap\u0027:"},{"line_number":792,"context_line":"                continue"},{"line_number":793,"context_line":"            if method \u003d\u003d \u0027_inner\u0027 or method \u003d\u003d \u0027inner\u0027:"},{"line_number":794,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_e3bdd468","line":791,"in_reply_to":"1ae5cdf2_dda52748","updated":"2014-06-25 17:52:38.000000000","message":"I changed this code to look for low level pacakages in the backtrace that wouldn\u0027t be making direct sql calls. So there aren\u0027t as many \"wrapper\" functions, but there still some inside keystone (or nova if this is running in nova, that\u0027s kind of the difficulty). I just removed this change because I don\u0027t find it too distracting and I\u0027m not sure of a better way to check for it.","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a640ecbd9177f37b57434e005b05b9ab2e2435cf","unresolved":false,"context_lines":[{"line_number":798,"context_line":"            # exclude itself"},{"line_number":799,"context_line":"            if file.endswith(\u0027session.py\u0027) and method \u003d\u003d \u0027_do_execute\u0027:"},{"line_number":800,"context_line":"                continue"},{"line_number":801,"context_line":"            # only trace inside oslo"},{"line_number":802,"context_line":"            if \u0027oslo\u0027 not in file:"},{"line_number":803,"context_line":"                continue"},{"line_number":804,"context_line":"            # exclude COMMIT - too many of these calls"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_806898bb","line":801,"updated":"2014-06-10 13:55:47.000000000","message":"Why only trace inside oslo? Why not show the full stacktrace?","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"40a4fc30d6499f6608276483c04a634280c390bd","unresolved":false,"context_lines":[{"line_number":798,"context_line":"            # exclude itself"},{"line_number":799,"context_line":"            if file.endswith(\u0027session.py\u0027) and method \u003d\u003d \u0027_do_execute\u0027:"},{"line_number":800,"context_line":"                continue"},{"line_number":801,"context_line":"            # only trace inside oslo"},{"line_number":802,"context_line":"            if \u0027oslo\u0027 not in file:"},{"line_number":803,"context_line":"                continue"},{"line_number":804,"context_line":"            # exclude COMMIT - too many of these calls"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_7d56c12b","line":801,"in_reply_to":"1ae5cdf2_806898bb","updated":"2014-06-25 17:52:38.000000000","message":"now that keystone has oslo.db turns out that these don\u0027t work the same as when it was common, so I changed it to what I think should work (worked for keystone anyways).","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a640ecbd9177f37b57434e005b05b9ab2e2435cf","unresolved":false,"context_lines":[{"line_number":808,"context_line":"            stack +\u003d \u0027\\tFile %s:%s %s() %s\\n\u0027 % (file, line, method, function)"},{"line_number":809,"context_line":"        if stack:"},{"line_number":810,"context_line":"            # strip the last new-line"},{"line_number":811,"context_line":"            stack \u003d stack[:-1]"},{"line_number":812,"context_line":"            LOG.info(\u0027ibm_db_dbi stack trace: %s\\n%s\u0027, operation, stack)"},{"line_number":813,"context_line":"        old_execute(self, operation, *args, **kwargs)"},{"line_number":814,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_9d20ffb1","line":811,"updated":"2014-06-10 13:55:47.000000000","message":"stack \u003d stack.rstrip()","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"40a4fc30d6499f6608276483c04a634280c390bd","unresolved":false,"context_lines":[{"line_number":808,"context_line":"            stack +\u003d \u0027\\tFile %s:%s %s() %s\\n\u0027 % (file, line, method, function)"},{"line_number":809,"context_line":"        if stack:"},{"line_number":810,"context_line":"            # strip the last new-line"},{"line_number":811,"context_line":"            stack \u003d stack[:-1]"},{"line_number":812,"context_line":"            LOG.info(\u0027ibm_db_dbi stack trace: %s\\n%s\u0027, operation, stack)"},{"line_number":813,"context_line":"        old_execute(self, operation, *args, **kwargs)"},{"line_number":814,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_6a751ecb","line":811,"in_reply_to":"1ae5cdf2_9d20ffb1","updated":"2014-06-25 17:52:38.000000000","message":"Done","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a640ecbd9177f37b57434e005b05b9ab2e2435cf","unresolved":false,"context_lines":[{"line_number":809,"context_line":"        if stack:"},{"line_number":810,"context_line":"            # strip the last new-line"},{"line_number":811,"context_line":"            stack \u003d stack[:-1]"},{"line_number":812,"context_line":"            LOG.info(\u0027ibm_db_dbi stack trace: %s\\n%s\u0027, operation, stack)"},{"line_number":813,"context_line":"        old_execute(self, operation, *args, **kwargs)"},{"line_number":814,"context_line":""},{"line_number":815,"context_line":"    setattr(dbi_module.Cursor, \u0027execute\u0027, _do_execute)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_a03594dc","line":812,"updated":"2014-06-10 13:55:47.000000000","message":"Use the _LI() translation function and named variable interpolation to support languages that need to place the variables in different places for text rendering direction or grammar changes:\n\n  LOG.info(_LI(\u0027ibm_db_dbi stack trace: %(operation)s\\n%(stack)s\u0027),\n           {\u0027operation\u0027: operation, \u0027stack\u0027: stack})","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"40a4fc30d6499f6608276483c04a634280c390bd","unresolved":false,"context_lines":[{"line_number":809,"context_line":"        if stack:"},{"line_number":810,"context_line":"            # strip the last new-line"},{"line_number":811,"context_line":"            stack \u003d stack[:-1]"},{"line_number":812,"context_line":"            LOG.info(\u0027ibm_db_dbi stack trace: %s\\n%s\u0027, operation, stack)"},{"line_number":813,"context_line":"        old_execute(self, operation, *args, **kwargs)"},{"line_number":814,"context_line":""},{"line_number":815,"context_line":"    setattr(dbi_module.Cursor, \u0027execute\u0027, _do_execute)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_8a70aadb","line":812,"in_reply_to":"1ae5cdf2_a03594dc","updated":"2014-06-25 17:52:38.000000000","message":"Done","commit_id":"9c868c56c2ab50a6e2232066d6b90bcd453e7ddc"}],"tests/sqlalchemy/test_sqlalchemy.py":[{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"77c35684821243c5c0726081a5d8957c5521e75c","unresolved":false,"context_lines":[{"line_number":544,"context_line":""},{"line_number":545,"context_line":"class PatchStacktraceTest(oslo_test.BaseTestCase):"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    @mock.patch.object(session.LOG, \u0027info\u0027)"},{"line_number":548,"context_line":"    def test_ibm_db(self, log_info_mock):"},{"line_number":549,"context_line":"        # session._patch_ibm_db_with_log_stacktrace() sets up tracing"},{"line_number":550,"context_line":"        # for the module passed in."}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_3a5c4a25","line":547,"updated":"2014-05-13 15:45:58.000000000","message":"I have tried your test and oslo/db/sqlalchemy/session.py +663 has not been called. I\u0027m almost OK with it, because it is unit testing. But shouldn\u0027t we test it in the if statement?","commit_id":"b2ff555909c10b0c63cac05119f798cbca93e755"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"2b1152e315ff50e019b861fa69b77fc049aa1b3d","unresolved":false,"context_lines":[{"line_number":544,"context_line":""},{"line_number":545,"context_line":"class PatchStacktraceTest(oslo_test.BaseTestCase):"},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"    @mock.patch.object(session.LOG, \u0027info\u0027)"},{"line_number":548,"context_line":"    def test_ibm_db(self, log_info_mock):"},{"line_number":549,"context_line":"        # session._patch_ibm_db_with_log_stacktrace() sets up tracing"},{"line_number":550,"context_line":"        # for the module passed in."}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_a5afd97b","line":547,"in_reply_to":"7adec928_3a5c4a25","updated":"2014-05-19 22:31:36.000000000","message":"I pulled the connection trace setup code to a new function and called that instead so the if statement is now covered... also fixed the coverage report generation so I could check it.","commit_id":"b2ff555909c10b0c63cac05119f798cbca93e755"}]}
