)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"270306961da775693e0af396a8c6ef3eeb5f84d6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pushkar Umaranikar \u003cpushkar.umaranikar@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-10-19 21:26:55 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"404 response do not indicate what was not found"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add informative messages to the 404 error response from"},{"line_number":10,"context_line":"nova/objects/resource_provider.py"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa6399be_0415dae3","line":7,"updated":"2016-10-20 09:35:58.000000000","message":"You might want to clarify that this is a part of the placement api","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"},{"author":{"_account_id":18335,"name":"Pushkar Umaranikar","email":"pushkar.umaranikar@intel.com","username":"pushkarumaranikar"},"change_message_id":"3845f87c62441b5c5ef2c871b9b0fed53bd70e2b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pushkar Umaranikar \u003cpushkar.umaranikar@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-10-19 21:26:55 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"404 response do not indicate what was not found"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add informative messages to the 404 error response from"},{"line_number":10,"context_line":"nova/objects/resource_provider.py"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da6895a0_935294dc","line":7,"in_reply_to":"fa6399be_0415dae3","updated":"2016-10-20 21:21:20.000000000","message":"Done","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"}],"nova/api/openstack/placement/handlers/allocation.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"270306961da775693e0af396a8c6ef3eeb5f84d6","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        raise webob.exc.HTPPNotFound("},{"line_number":299,"context_line":"              _(\"Allocation for consumer with id %(id)s not found.\""},{"line_number":300,"context_line":"                \"error: %(error)s\") %"},{"line_number":301,"context_line":"              {\u0027id\u0027: consumer_uuid, \u0027error\u0027: exc})"},{"line_number":302,"context_line":"    LOG.debug(\"Successfully deleted allocations %s\", allocations)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    req.response.status \u003d 204"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_4466f251","line":301,"updated":"2016-10-20 09:35:58.000000000","message":"you need to add the json_formatter entry here, same as the exception above (I\u0027ll make a note that we should get rid of this boilerplate in another change).\n\nAlso I think you should leave a comment about why there are two different NotFound exceptions here. As far as I can tell the only time the section one would happens is if something else deleted one of the allocations in the \u0027allocations\u0027 list after it was created. Is that the case you\u0027re trying to deal with here?","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"},{"author":{"_account_id":18335,"name":"Pushkar Umaranikar","email":"pushkar.umaranikar@intel.com","username":"pushkarumaranikar"},"change_message_id":"3845f87c62441b5c5ef2c871b9b0fed53bd70e2b","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        raise webob.exc.HTPPNotFound("},{"line_number":299,"context_line":"              _(\"Allocation for consumer with id %(id)s not found.\""},{"line_number":300,"context_line":"                \"error: %(error)s\") %"},{"line_number":301,"context_line":"              {\u0027id\u0027: consumer_uuid, \u0027error\u0027: exc})"},{"line_number":302,"context_line":"    LOG.debug(\"Successfully deleted allocations %s\", allocations)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    req.response.status \u003d 204"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_735500c5","line":301,"in_reply_to":"fa6399be_4466f251","updated":"2016-10-20 21:21:20.000000000","message":"Done","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bcc6f4829e92cfc28bf6994a73c08d6bed4e4c40","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    # NOTE(pumaranikar): Following NotFound exception added in case"},{"line_number":298,"context_line":"    # when allocation is deleted from allocations list by some other"},{"line_number":299,"context_line":"    # activity. In that case, delete_all() will throw NotFound exception."},{"line_number":300,"context_line":"    except exception.NotFound as exc:"},{"line_number":301,"context_line":"        raise webob.exc.HTPPNotFound("},{"line_number":302,"context_line":"              _(\"Allocation for consumer with id %(id)s not found.\""},{"line_number":303,"context_line":"                \"error: %(error)s\") %"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_b03e2e26","line":300,"updated":"2016-11-09 16:30:14.000000000","message":"Why not scope this to the if block above that calls delete_all()?","commit_id":"9b17b80f107d61eda049fc6992692737b4600afa"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b51126152f6516d3c0c3cd7245b7a24ea516afd4","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        # NOTE(pumaranikar): Following NotFound exception added in the case"},{"line_number":293,"context_line":"        # when allocation is deleted from allocations list by some other"},{"line_number":294,"context_line":"        # activity. In that case, delete_all() will throw a NotFound exception."},{"line_number":295,"context_line":"        except exception.NotFound as exc:"},{"line_number":296,"context_line":"            raise webob.exc.HTPPNotFound("},{"line_number":297,"context_line":"                  _(\"Allocation for consumer with id %(id)s not found.\""},{"line_number":298,"context_line":"                    \"error: %(error)s\") %"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_49f69a8f","line":295,"range":{"start_line":295,"start_character":8,"end_line":295,"end_character":41},"updated":"2016-11-12 06:42:33.000000000","message":"emm....I feel we should mute this exception.\n\nThe check at line 289 means we already found those allocations. When we delete those allocations, those allocations just disappear. I guess this should happen when there is another race delete call.","commit_id":"f87af91d90f8f1322e92f9bc4d198a83162bb118"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"8c1a568d477df9b37fcc74940200fa5cf0abf2f1","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        # NOTE(pumaranikar): Following NotFound exception added in the case"},{"line_number":293,"context_line":"        # when allocation is deleted from allocations list by some other"},{"line_number":294,"context_line":"        # activity. In that case, delete_all() will throw a NotFound exception."},{"line_number":295,"context_line":"        except exception.NotFound as exc:"},{"line_number":296,"context_line":"            raise webob.exc.HTPPNotFound("},{"line_number":297,"context_line":"                  _(\"Allocation for consumer with id %(id)s not found.\""},{"line_number":298,"context_line":"                    \"error: %(error)s\") %"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_a97bb6f3","line":295,"range":{"start_line":295,"start_character":8,"end_line":295,"end_character":41},"in_reply_to":"9a629dbe_49f69a8f","updated":"2016-11-12 07:00:22.000000000","message":"thinking again, maybe this should leave to the client side decided to ignore it or do something else.","commit_id":"f87af91d90f8f1322e92f9bc4d198a83162bb118"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"ee91165e9625a261b44862ca4bd5f26164925e06","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        # NOTE(pumaranikar): Following NotFound exception added in the case"},{"line_number":293,"context_line":"        # when allocation is deleted from allocations list by some other"},{"line_number":294,"context_line":"        # activity. In that case, delete_all() will throw a NotFound exception."},{"line_number":295,"context_line":"        except exception.NotFound as exc:"},{"line_number":296,"context_line":"            raise webob.exc.HTPPNotFound("},{"line_number":297,"context_line":"                  _(\"Allocation for consumer with id %(id)s not found.\""},{"line_number":298,"context_line":"                    \"error: %(error)s\") %"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_3299af20","line":295,"in_reply_to":"9a629dbe_a97bb6f3","updated":"2016-11-14 11:54:21.000000000","message":"I said this in IRC too: yeah, I\u0027m not really sure what the right thing is there. My tendency is to want to share as much information as possible. We don\u0027t really need to be super concerned at this point of being friendly to a human: it is mostly likely the resource tracker (or similar tool) that is going to get the error.","commit_id":"f87af91d90f8f1322e92f9bc4d198a83162bb118"}],"nova/api/openstack/placement/handlers/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"270306961da775693e0af396a8c6ef3eeb5f84d6","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":126,"context_line":"    except exception.NotFound as exc:"},{"line_number":127,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":128,"context_line":"            _(\"No resource provider with id %s found for delete\") % uuid)"},{"line_number":129,"context_line":"    req.response.status \u003d 204"},{"line_number":130,"context_line":"    req.response.content_type \u003d None"},{"line_number":131,"context_line":"    return req.response"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_042a3a90","line":128,"updated":"2016-10-20 09:35:58.000000000","message":"probably best to say \u0027uuid\u0027 instead of \u0027id\u0027 in the message.","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"},{"author":{"_account_id":18335,"name":"Pushkar Umaranikar","email":"pushkar.umaranikar@intel.com","username":"pushkarumaranikar"},"change_message_id":"3845f87c62441b5c5ef2c871b9b0fed53bd70e2b","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            json_formatter\u003dutil.json_error_formatter)"},{"line_number":126,"context_line":"    except exception.NotFound as exc:"},{"line_number":127,"context_line":"        raise webob.exc.HTTPNotFound("},{"line_number":128,"context_line":"            _(\"No resource provider with id %s found for delete\") % uuid)"},{"line_number":129,"context_line":"    req.response.status \u003d 204"},{"line_number":130,"context_line":"    req.response.content_type \u003d None"},{"line_number":131,"context_line":"    return req.response"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_f35750c8","line":128,"in_reply_to":"fa6399be_042a3a90","updated":"2016-10-20 21:21:20.000000000","message":"Done","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"}],"nova/objects/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"270306961da775693e0af396a8c6ef3eeb5f84d6","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        if not result:"},{"line_number":375,"context_line":"            raise exception.NotFound("},{"line_number":376,"context_line":"                \u0027No resource provider with id %s found for delete\u0027"},{"line_number":377,"context_line":"                % _id)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    @staticmethod"},{"line_number":380,"context_line":"    @db_api.api_context_manager.writer"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_c45cc24d","line":377,"updated":"2016-10-20 09:35:58.000000000","message":"_id here is an internal id for the database and not really meaningful here. Since you are not reusing this message when you trap the NotFound in the calling code, I would leave this as is, and not have a message here, just raise the exception as before.","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"},{"author":{"_account_id":18335,"name":"Pushkar Umaranikar","email":"pushkar.umaranikar@intel.com","username":"pushkarumaranikar"},"change_message_id":"3845f87c62441b5c5ef2c871b9b0fed53bd70e2b","unresolved":false,"context_lines":[{"line_number":374,"context_line":"        if not result:"},{"line_number":375,"context_line":"            raise exception.NotFound("},{"line_number":376,"context_line":"                \u0027No resource provider with id %s found for delete\u0027"},{"line_number":377,"context_line":"                % _id)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    @staticmethod"},{"line_number":380,"context_line":"    @db_api.api_context_manager.writer"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_3372a87d","line":377,"in_reply_to":"fa6399be_c45cc24d","updated":"2016-10-20 21:21:20.000000000","message":"Done","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"270306961da775693e0af396a8c6ef3eeb5f84d6","unresolved":false,"context_lines":[{"line_number":500,"context_line":"    if not result:"},{"line_number":501,"context_line":"        raise exception.NotFound("},{"line_number":502,"context_line":"        \u0027No inventory with id %s found\u0027"},{"line_number":503,"context_line":"        % id_)"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_843d6adf","line":503,"updated":"2016-10-20 09:35:58.000000000","message":"See comment above about _id and id_","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"},{"author":{"_account_id":18335,"name":"Pushkar Umaranikar","email":"pushkar.umaranikar@intel.com","username":"pushkarumaranikar"},"change_message_id":"3845f87c62441b5c5ef2c871b9b0fed53bd70e2b","unresolved":false,"context_lines":[{"line_number":500,"context_line":"    if not result:"},{"line_number":501,"context_line":"        raise exception.NotFound("},{"line_number":502,"context_line":"        \u0027No inventory with id %s found\u0027"},{"line_number":503,"context_line":"        % id_)"},{"line_number":504,"context_line":""},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6895a0_536f1c92","line":503,"in_reply_to":"fa6399be_843d6adf","updated":"2016-10-20 21:21:20.000000000","message":"Done","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"}],"nova/tests/functional/api/openstack/placement/gabbits/resource-provider.yaml":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"270306961da775693e0af396a8c6ef3eeb5f84d6","unresolved":false,"context_lines":[{"line_number":223,"context_line":"  DELETE: /resource_providers/d67370b5-4dc0-470d-a4fa-85e8e89abc6c"},{"line_number":224,"context_line":"  status: 404"},{"line_number":225,"context_line":"  response_strings:"},{"line_number":226,"context_line":"      - No resource provider with id d67370b5-4dc0-470d-a4fa-85e8e89abc6c found for delete"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"- name: post resource provider no uuid"},{"line_number":229,"context_line":"  POST: /resource_providers"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"fa6399be_5f1ddf60","line":226,"updated":"2016-10-20 09:35:58.000000000","message":"As I suggest elsewhere, probably best to use \u0027uuid\u0027 instead of \u0027id\u0027 when producing this error.","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"},{"author":{"_account_id":18335,"name":"Pushkar Umaranikar","email":"pushkar.umaranikar@intel.com","username":"pushkarumaranikar"},"change_message_id":"3845f87c62441b5c5ef2c871b9b0fed53bd70e2b","unresolved":false,"context_lines":[{"line_number":223,"context_line":"  DELETE: /resource_providers/d67370b5-4dc0-470d-a4fa-85e8e89abc6c"},{"line_number":224,"context_line":"  status: 404"},{"line_number":225,"context_line":"  response_strings:"},{"line_number":226,"context_line":"      - No resource provider with id d67370b5-4dc0-470d-a4fa-85e8e89abc6c found for delete"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"- name: post resource provider no uuid"},{"line_number":229,"context_line":"  POST: /resource_providers"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"da6895a0_b304f8c6","line":226,"in_reply_to":"fa6399be_5f1ddf60","updated":"2016-10-20 21:21:20.000000000","message":"Done","commit_id":"773316fa75de332d569fc1236a4e4409932d7f5c"}]}
