)]}'
{"neutron/callbacks/exceptions.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"16cc05129f76f5b01a176325ec15735fde1e8347","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        return exc"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class CallbackFailure(_CallbackFailure):"},{"line_number":48,"context_line":"    \"\"\"Fatal CallbackFailure"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    Represents a failure without any errors that will trigger an retry at the"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a9d85d2_4e42ca11","line":47,"updated":"2016-06-21 06:40:08.000000000","message":"do we really need these? Can\u0027t we simply reraise a RetryRequest embedding CallbackFailure?","commit_id":"565ce35278fdd8de226155704a93bc5037fd0312"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"7d37fb739b4d645d4b1f83d53c8375c7df74de48","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    Represents a failure without any errors that will trigger an retry at the"},{"line_number":51,"context_line":"    API layer."},{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class RetriableCallbackFailure(_CallbackFailure):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a9d85d2_85549a21","line":52,"updated":"2016-06-21 01:59:58.000000000","message":"this is worded oddly, I initially thought it meant this exception will trigger a retry, but realize what it means now.  Perhaps:\n\n\"Represents a failure with errors that will not trigger a retry at the API layer.\"\n\nalso: s/an/a","commit_id":"565ce35278fdd8de226155704a93bc5037fd0312"}],"neutron/callbacks/manager.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b4be652d5ee7e1cff500b608a19d0401ad685155","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            if event.startswith(events.PRECOMMIT):"},{"line_number":129,"context_line":"                raise self._build_exception(errors\u003derrors)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _build_exception(self, errors):"},{"line_number":132,"context_line":"        exc \u003d exceptions.CallbackFailure(errors\u003derrors)"},{"line_number":133,"context_line":"        if db_api.is_retriable(exc):"},{"line_number":134,"context_line":"            # this is a retriable exception so we raise retriable instead"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a9d85d2_9a7d11b4","line":131,"updated":"2016-06-21 06:30:07.000000000","message":"please move this method to the bottom of the class. private with private, public with public. Promiscuity, ugh :)","commit_id":"565ce35278fdd8de226155704a93bc5037fd0312"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"16cc05129f76f5b01a176325ec15735fde1e8347","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            if event.startswith(events.PRECOMMIT):"},{"line_number":129,"context_line":"                raise self._build_exception(errors\u003derrors)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _build_exception(self, errors):"},{"line_number":132,"context_line":"        exc \u003d exceptions.CallbackFailure(errors\u003derrors)"},{"line_number":133,"context_line":"        if db_api.is_retriable(exc):"},{"line_number":134,"context_line":"            # this is a retriable exception so we raise retriable instead"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a9d85d2_8ede726b","line":131,"in_reply_to":"5a9d85d2_9a7d11b4","updated":"2016-06-21 06:40:08.000000000","message":"Have you considered turning it in a decorator that packs the exception into a retriable one and reraise? If the decorator doesn\u0027t live here..you don\u0027t even endanger the callbacks with promiscuity ;)","commit_id":"565ce35278fdd8de226155704a93bc5037fd0312"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"7d37fb739b4d645d4b1f83d53c8375c7df74de48","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            # this is a retriable exception so we raise retriable instead"},{"line_number":135,"context_line":"            # to let the API layer execute its retry logic"},{"line_number":136,"context_line":"            return exceptions.RetriableCallbackFailure(errors\u003derrors)"},{"line_number":137,"context_line":"        return exc"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def clear(self):"},{"line_number":140,"context_line":"        \"\"\"Brings the manager to a clean slate.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a9d85d2_255b2689","line":137,"updated":"2016-06-21 01:59:58.000000000","message":"remove L132 and change L137 to return the assignment of L132.","commit_id":"565ce35278fdd8de226155704a93bc5037fd0312"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b4be652d5ee7e1cff500b608a19d0401ad685155","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            # this is a retriable exception so we raise retriable instead"},{"line_number":135,"context_line":"            # to let the API layer execute its retry logic"},{"line_number":136,"context_line":"            return exceptions.RetriableCallbackFailure(errors\u003derrors)"},{"line_number":137,"context_line":"        return exc"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def clear(self):"},{"line_number":140,"context_line":"        \"\"\"Brings the manager to a clean slate.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a9d85d2_7ab1458f","line":137,"in_reply_to":"5a9d85d2_255b2689","updated":"2016-06-21 06:30:07.000000000","message":"can\u0027t do that otherwise you don\u0027t have a single exception to call is_retriable on.","commit_id":"565ce35278fdd8de226155704a93bc5037fd0312"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"b330734a40da01351086574a6e30027f87467680","unresolved":false,"context_lines":[{"line_number":134,"context_line":"            # this is a retriable exception so we raise retriable instead"},{"line_number":135,"context_line":"            # to let the API layer execute its retry logic"},{"line_number":136,"context_line":"            return exceptions.RetriableCallbackFailure(errors\u003derrors)"},{"line_number":137,"context_line":"        return exc"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def clear(self):"},{"line_number":140,"context_line":"        \"\"\"Brings the manager to a clean slate.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"3aaa91ec_126f8c93","line":137,"in_reply_to":"5a9d85d2_7ab1458f","updated":"2016-06-21 16:46:17.000000000","message":"oh good point! missed that simple little thing.  I figured there was a reason for it being like this :)","commit_id":"565ce35278fdd8de226155704a93bc5037fd0312"}],"neutron/db/api.py":[{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"e3dbafb268b009adfb6ca32245ae871b3df4b87a","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def reraise_if_retriable(exc):"},{"line_number":74,"context_line":"    with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":75,"context_line":"        ctx.reraise \u003d (is_retriable(exc) or"},{"line_number":76,"context_line":"                       _is_nested_instance(exc, db_exc.RetryRequest))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_1d300ae8","line":75,"range":{"start_line":75,"start_character":23,"end_line":75,"end_character":40},"updated":"2016-06-16 06:25:50.000000000","message":"could you write a unit test for this condition?","commit_id":"9d9a5d059c0896031ba0cac6b07386e4c679c56e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"d70ba6cc62c2bd068fc51f687ac92c80ccbeb9f1","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def reraise_if_retriable(exc):"},{"line_number":74,"context_line":"    with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":75,"context_line":"        ctx.reraise \u003d (is_retriable(exc) or"},{"line_number":76,"context_line":"                       _is_nested_instance(exc, db_exc.RetryRequest))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7aa08908_1d680a87","line":75,"range":{"start_line":75,"start_character":23,"end_line":75,"end_character":40},"in_reply_to":"7aa08908_1d300ae8","updated":"2016-06-16 06:34:21.000000000","message":"Done","commit_id":"9d9a5d059c0896031ba0cac6b07386e4c679c56e"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d2d7596e50a677ac3aa3b3619c122c65143967db","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def is_retriable(e):"},{"line_number":41,"context_line":"    if _is_nested_instance(e, (db_exc.DBDeadlock, exc.StaleDataError,"},{"line_number":42,"context_line":"                               db_exc.RetryRequest)):"},{"line_number":43,"context_line":"        return True"},{"line_number":44,"context_line":"    # looking savepoints mangled by deadlocks. see bug/1590298 for details."},{"line_number":45,"context_line":"    return _is_nested_instance(e, db_exc.DBError) and \u00271305\u0027 in str(e)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_42358dd8","line":42,"updated":"2016-06-22 13:28:33.000000000","message":"why do we add this here?","commit_id":"b4c40ef4c2da390eccb78178757506bfc6300354"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e759aa91428779def0997f3f1056a82ef904d5e7","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def is_retriable(e):"},{"line_number":41,"context_line":"    if _is_nested_instance(e, (db_exc.DBDeadlock, exc.StaleDataError,"},{"line_number":42,"context_line":"                               db_exc.RetryRequest)):"},{"line_number":43,"context_line":"        return True"},{"line_number":44,"context_line":"    # looking savepoints mangled by deadlocks. see bug/1590298 for details."},{"line_number":45,"context_line":"    return _is_nested_instance(e, db_exc.DBError) and \u00271305\u0027 in str(e)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_bdca7618","line":42,"in_reply_to":"3aaa91ec_42358dd8","updated":"2016-06-22 23:03:26.000000000","message":"Because retry requests are retriable. If a callback throws a retryrequest we need to bubble it up. This was actually an oversight when I did the multiple exceptions thing. I\u0027ll file it as a different patch.","commit_id":"b4c40ef4c2da390eccb78178757506bfc6300354"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d2d7596e50a677ac3aa3b3619c122c65143967db","unresolved":false,"context_lines":[{"line_number":56,"context_line":")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def convert_retriable_to_retryrequest(f):"},{"line_number":60,"context_line":"    \"\"\"Packs retriable exceptions into RetryRequests.\"\"\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    @six.wraps(f)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_42fd8d39","line":59,"updated":"2016-06-22 13:28:33.000000000","message":"what if we call this reraise_as_retryrequest?","commit_id":"b4c40ef4c2da390eccb78178757506bfc6300354"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e759aa91428779def0997f3f1056a82ef904d5e7","unresolved":false,"context_lines":[{"line_number":56,"context_line":")"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def convert_retriable_to_retryrequest(f):"},{"line_number":60,"context_line":"    \"\"\"Packs retriable exceptions into RetryRequests.\"\"\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    @six.wraps(f)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_dd95c2e4","line":59,"in_reply_to":"3aaa91ec_42fd8d39","updated":"2016-06-22 23:03:26.000000000","message":"then you would like it more I assume :)","commit_id":"b4c40ef4c2da390eccb78178757506bfc6300354"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d2d7596e50a677ac3aa3b3619c122c65143967db","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def convert_retriable_to_retryrequest(f):"},{"line_number":60,"context_line":"    \"\"\"Packs retriable exceptions into RetryRequests.\"\"\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    @six.wraps(f)"},{"line_number":63,"context_line":"    def wrapped(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_62e249d7","line":60,"updated":"2016-06-22 13:28:33.000000000","message":"I\u0027d use singular here rather than plurals but that\u0027s a nit","commit_id":"b4c40ef4c2da390eccb78178757506bfc6300354"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e759aa91428779def0997f3f1056a82ef904d5e7","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def convert_retriable_to_retryrequest(f):"},{"line_number":60,"context_line":"    \"\"\"Packs retriable exceptions into RetryRequests.\"\"\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    @six.wraps(f)"},{"line_number":63,"context_line":"    def wrapped(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_fda23e4a","line":60,"in_reply_to":"3aaa91ec_62e249d7","updated":"2016-06-22 23:03:26.000000000","message":"Done","commit_id":"b4c40ef4c2da390eccb78178757506bfc6300354"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d2d7596e50a677ac3aa3b3619c122c65143967db","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            return f(*args, **kwargs)"},{"line_number":66,"context_line":"        except Exception as e:"},{"line_number":67,"context_line":"            with excutils.save_and_reraise_exception() as ctx:"},{"line_number":68,"context_line":"                if is_retriable(e):"},{"line_number":69,"context_line":"                    ctx.reraise \u003d False"},{"line_number":70,"context_line":"                    raise db_exc.RetryRequest(e)"},{"line_number":71,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_424aadc6","line":68,"updated":"2016-06-22 13:28:33.000000000","message":"not sure I understand why you need to change is_retriable here. I am almost tempted to say that you\u0027d need to use _is_nested_instance directly and keep that the former unaffected.","commit_id":"b4c40ef4c2da390eccb78178757506bfc6300354"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"82d4ca9de255d66960286e7d8f32ac96a7f5af7f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            return f(*args, **kwargs)"},{"line_number":66,"context_line":"        except Exception as e:"},{"line_number":67,"context_line":"            with excutils.save_and_reraise_exception() as ctx:"},{"line_number":68,"context_line":"                if is_retriable(e):"},{"line_number":69,"context_line":"                    ctx.reraise \u003d False"},{"line_number":70,"context_line":"                    raise db_exc.RetryRequest(e)"},{"line_number":71,"context_line":"    return wrapped"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_e0ff35ff","line":68,"in_reply_to":"3aaa91ec_424aadc6","updated":"2016-06-22 23:08:51.000000000","message":"See response on L42","commit_id":"b4c40ef4c2da390eccb78178757506bfc6300354"}],"neutron/db/db_base_plugin_v2.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"4077a8d4bfcf15ecb4e46ce3c71c953971448b82","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        registry.notify("},{"line_number":83,"context_line":"            resources.SUBNET, events.BEFORE_DELETE, None, **kwargs)"},{"line_number":84,"context_line":"    except exceptions.CallbackFailure as e:"},{"line_number":85,"context_line":"        db_api.reraise_if_retriable(e)"},{"line_number":86,"context_line":"        raise exc.SubnetInUse(subnet_id\u003dsubnet_id, reason\u003de)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7aa08908_d1f3099e","line":85,"updated":"2016-06-16 08:25:05.000000000","message":"have you consider it doing this in the registry notify loop? That may avoid the sprinkling.","commit_id":"43a3fa73606572debc13ceb756bd2349d2c3327a"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"de6d27398ee332d5ad50d8797c2b7e0bc75970dd","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        registry.notify("},{"line_number":83,"context_line":"            resources.SUBNET, events.BEFORE_DELETE, None, **kwargs)"},{"line_number":84,"context_line":"    except exceptions.CallbackFailure as e:"},{"line_number":85,"context_line":"        db_api.reraise_if_retriable(e)"},{"line_number":86,"context_line":"        raise exc.SubnetInUse(subnet_id\u003dsubnet_id, reason\u003de)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a9d85d2_051ef80b","line":85,"in_reply_to":"7aa08908_d1f3099e","updated":"2016-06-20 18:25:21.000000000","message":"i thought about this too but it to me it seemed like this didn\u0027t belong in the registry or callbacks code.  I don\u0027t think that registry or callbacks code should be aware of the retriability (another new word!) of an exception.\n\nThis is subjective though and I\u0027m not really against either option, I don\u0027t like the sprinkling either.","commit_id":"43a3fa73606572debc13ceb756bd2349d2c3327a"}]}
