)]}'
{"nova/scheduler/client/report.py":[{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"5872c537ead7bcf69ff6d880df6bb9d7fa69fe6b","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            #    trigger a delete of the old allocation records and then set"},{"line_number":342,"context_line":"            #    the new inventory, and then set the allocation record to the"},{"line_number":343,"context_line":"            #    new CUSTOM_IRON_SILVER record."},{"line_number":344,"context_line":"            match \u003d _INV_IN_USE_RE.match(result.text)"},{"line_number":345,"context_line":"            if match:"},{"line_number":346,"context_line":"                rc \u003d match.group(1)"},{"line_number":347,"context_line":"                raise exception.InventoryInUse("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_5014e29e","line":344,"range":{"start_line":344,"start_character":12,"end_line":344,"end_character":53},"updated":"2016-12-05 13:04:17.000000000","message":"Maybe it\u0027s me, but I\u0027d prefer to get this information via different code for the 409, which API could provide in the response body, instead parsing strings…","commit_id":"33289e1652fa9910a04c8c30a062ef80ccdb8e85"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"55162438940648c1a509a66ffe4620991af710e8","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            #    trigger a delete of the old allocation records and then set"},{"line_number":342,"context_line":"            #    the new inventory, and then set the allocation record to the"},{"line_number":343,"context_line":"            #    new CUSTOM_IRON_SILVER record."},{"line_number":344,"context_line":"            match \u003d _INV_IN_USE_RE.match(result.text)"},{"line_number":345,"context_line":"            if match:"},{"line_number":346,"context_line":"                rc \u003d match.group(1)"},{"line_number":347,"context_line":"                raise exception.InventoryInUse("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_73d5651a","line":344,"range":{"start_line":344,"start_character":12,"end_line":344,"end_character":53},"in_reply_to":"3a71b18c_5014e29e","updated":"2016-12-05 14:20:36.000000000","message":"Yeah, I know... it\u0027s not ideal for sure. The API isn\u0027t frozen but would require a microversion bump...","commit_id":"33289e1652fa9910a04c8c30a062ef80ccdb8e85"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"d56c727d5e23186b2b9515a67686cb7450210467","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            #    trigger a delete of the old allocation records and then set"},{"line_number":342,"context_line":"            #    the new inventory, and then set the allocation record to the"},{"line_number":343,"context_line":"            #    new CUSTOM_IRON_SILVER record."},{"line_number":344,"context_line":"            match \u003d _INV_IN_USE_RE.match(result.text)"},{"line_number":345,"context_line":"            if match:"},{"line_number":346,"context_line":"                rc \u003d match.group(1)"},{"line_number":347,"context_line":"                raise exception.InventoryInUse("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_857b5b7a","line":344,"range":{"start_line":344,"start_character":12,"end_line":344,"end_character":53},"in_reply_to":"3a71b18c_73d5651a","updated":"2016-12-06 16:44:41.000000000","message":"It\u0027s not terrible, but far from perfect. I can handle this in separate patch if you like.","commit_id":"33289e1652fa9910a04c8c30a062ef80ccdb8e85"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"7f9e1263dd29609116f95c99880e27d604e2736f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"VCPU \u003d fields.ResourceClass.VCPU"},{"line_number":35,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":36,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":37,"context_line":"_INV_IN_USE_RE \u003d re.compile("},{"line_number":38,"context_line":"    \".*Inventory for (.+) on resource provider .* in use\""},{"line_number":39,"context_line":")"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def safe_connect(f):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_feffc6fe","line":39,"range":{"start_line":37,"start_character":0,"end_line":39,"end_character":1},"updated":"2017-01-03 16:26:25.000000000","message":"Judging from https://github.com/openstack/nova/blob/53b46aa7942652a6674b90f8cbd3851c97ce8b54/nova/exception.py#L2136-L2137 seems that if there is provided translation for this message and operator will use localized version of Nova, that RE might never match.","commit_id":"1aa21ebedb469c55ba69756f339c99a66d72e09f"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"3e0dc1598adb401c387b8f1ecb582e0bee750b86","unresolved":false,"context_lines":[{"line_number":34,"context_line":"VCPU \u003d fields.ResourceClass.VCPU"},{"line_number":35,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":36,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":37,"context_line":"_INV_IN_USE_RE \u003d re.compile("},{"line_number":38,"context_line":"    \".*Inventory for (.+) on resource provider .* in use\""},{"line_number":39,"context_line":")"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def safe_connect(f):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_2096884c","line":39,"range":{"start_line":37,"start_character":0,"end_line":39,"end_character":1},"in_reply_to":"ba5201f7_74d21502","updated":"2017-01-03 19:03:49.000000000","message":"I remember having a conversation on your BP (https://review.openstack.org/#/c/338618/8/specs/newton/approved/generic-resource-pools.rst) with Chris and Ed regarding returning codes during different scenarios. Although it was on different endpoint (allocations) but also apply for what we have here.\n\nJust my 2 cents - I\u0027d like to keep HTTP as strict as possible, but sometimes (like in those cases) it might be necessary to bend the rules a bit, especially that HTTP wasn\u0027t designed for applications, but for content rather, so sometimes it\u0027s rather hard to match right code which have a meaning. In other words, we could avoid similar situation like this :)","commit_id":"1aa21ebedb469c55ba69756f339c99a66d72e09f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6410cd2400613fe59812ad19a9dc9f04c9eb1f02","unresolved":false,"context_lines":[{"line_number":34,"context_line":"VCPU \u003d fields.ResourceClass.VCPU"},{"line_number":35,"context_line":"MEMORY_MB \u003d fields.ResourceClass.MEMORY_MB"},{"line_number":36,"context_line":"DISK_GB \u003d fields.ResourceClass.DISK_GB"},{"line_number":37,"context_line":"_INV_IN_USE_RE \u003d re.compile("},{"line_number":38,"context_line":"    \".*Inventory for (.+) on resource provider .* in use\""},{"line_number":39,"context_line":")"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"def safe_connect(f):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_74d21502","line":39,"range":{"start_line":37,"start_character":0,"end_line":39,"end_character":1},"in_reply_to":"ba5201f7_feffc6fe","updated":"2017-01-03 17:27:23.000000000","message":"Yeah, mreidem brought that up on the last patchset. Unfortunately, until we get a fault code in the returned response body, instead of just the fault message, this is the only way we can differentiate between an inventory in use problem vs. a concurrent update issue. :(","commit_id":"1aa21ebedb469c55ba69756f339c99a66d72e09f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"be8c7c79241c399e0cbbb056412807b416589e51","unresolved":false,"context_lines":[{"line_number":438,"context_line":"            #    trigger a delete of the old allocation records and then set"},{"line_number":439,"context_line":"            #    the new inventory, and then set the allocation record to the"},{"line_number":440,"context_line":"            #    new CUSTOM_IRON_SILVER record."},{"line_number":441,"context_line":"            match \u003d _RE_INV_IN_USE.search(result.text)"},{"line_number":442,"context_line":"            if match:"},{"line_number":443,"context_line":"                rc \u003d match.group(1)"},{"line_number":444,"context_line":"                raise exception.InventoryInUse("}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_c737a8ae","line":441,"range":{"start_line":441,"start_character":20,"end_line":441,"end_character":54},"updated":"2017-01-26 15:53:08.000000000","message":"We\u0027re using a regex to discover parse the exception type? That doesn\u0027t seem hacky at all :) However, that was already in use before so moving on...","commit_id":"78d439df2d8b8a7acaf6cab38743135470eaa80a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"18f23d6c83c3b9ccf31cc4a5b6d98e82142ede10","unresolved":false,"context_lines":[{"line_number":438,"context_line":"            #    trigger a delete of the old allocation records and then set"},{"line_number":439,"context_line":"            #    the new inventory, and then set the allocation record to the"},{"line_number":440,"context_line":"            #    new CUSTOM_IRON_SILVER record."},{"line_number":441,"context_line":"            match \u003d _RE_INV_IN_USE.search(result.text)"},{"line_number":442,"context_line":"            if match:"},{"line_number":443,"context_line":"                rc \u003d match.group(1)"},{"line_number":444,"context_line":"                raise exception.InventoryInUse("},{"line_number":445,"context_line":"                    resource_classes\u003drc,"},{"line_number":446,"context_line":"                    resource_provider\u003drp_uuid,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_539aba15","line":443,"range":{"start_line":441,"start_character":12,"end_line":443,"end_character":35},"updated":"2017-01-26 01:31:59.000000000","message":"Re-use _extract_inventory_in_use here. That can be done in a follow up cleanup though after the feature freeze.","commit_id":"78d439df2d8b8a7acaf6cab38743135470eaa80a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"be8c7c79241c399e0cbbb056412807b416589e51","unresolved":false,"context_lines":[{"line_number":438,"context_line":"            #    trigger a delete of the old allocation records and then set"},{"line_number":439,"context_line":"            #    the new inventory, and then set the allocation record to the"},{"line_number":440,"context_line":"            #    new CUSTOM_IRON_SILVER record."},{"line_number":441,"context_line":"            match \u003d _RE_INV_IN_USE.search(result.text)"},{"line_number":442,"context_line":"            if match:"},{"line_number":443,"context_line":"                rc \u003d match.group(1)"},{"line_number":444,"context_line":"                raise exception.InventoryInUse("},{"line_number":445,"context_line":"                    resource_classes\u003drc,"},{"line_number":446,"context_line":"                    resource_provider\u003drp_uuid,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_07429010","line":443,"range":{"start_line":441,"start_character":12,"end_line":443,"end_character":35},"in_reply_to":"3a461143_539aba15","updated":"2017-01-26 15:53:08.000000000","message":"+1","commit_id":"78d439df2d8b8a7acaf6cab38743135470eaa80a"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"18f23d6c83c3b9ccf31cc4a5b6d98e82142ede10","unresolved":false,"context_lines":[{"line_number":689,"context_line":"        }"},{"line_number":690,"context_line":"        mock_put.return_value.status_code \u003d 409"},{"line_number":691,"context_line":"        rc_str \u003d \"VCPU, MEMORY_MB\""},{"line_number":692,"context_line":"        in_use_exc \u003d exception.InventoryInUse("},{"line_number":693,"context_line":"            resource_classes\u003drc_str,"},{"line_number":694,"context_line":"            resource_provider\u003dcn.uuid,"},{"line_number":695,"context_line":"        )"},{"line_number":696,"context_line":"        fault_text \u003d \"\"\""},{"line_number":697,"context_line":"409 Conflict"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"There was a conflict when trying to complete your request."},{"line_number":700,"context_line":""},{"line_number":701,"context_line":" update conflict: %s"},{"line_number":702,"context_line":" \"\"\" % six.text_type(in_use_exc)"},{"line_number":703,"context_line":"        mock_put.return_value.text \u003d fault_text"},{"line_number":704,"context_line":"        mock_put.return_value.json.return_value \u003d {"},{"line_number":705,"context_line":"            \u0027resource_provider_generation\u0027: 44,"},{"line_number":706,"context_line":"            \u0027inventories\u0027: {"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_1653c0e2","line":703,"range":{"start_line":692,"start_character":0,"end_line":703,"end_character":47},"updated":"2017-01-26 01:31:59.000000000","message":"nit: I\u0027d prefer to use something like this in the new test, but that could be a later cleanup.","commit_id":"78d439df2d8b8a7acaf6cab38743135470eaa80a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"18f23d6c83c3b9ccf31cc4a5b6d98e82142ede10","unresolved":false,"context_lines":[{"line_number":916,"context_line":"        mock_get.return_value \u003d {}"},{"line_number":917,"context_line":"        mock_put.return_value.status_code \u003d 409"},{"line_number":918,"context_line":"        mock_put.return_value.text \u003d ("},{"line_number":919,"context_line":"            \"update conflict: Inventory for VCPU on \""},{"line_number":920,"context_line":"            \"resource provider 123 in use\""},{"line_number":921,"context_line":"        )"},{"line_number":922,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_36ba7ce2","line":919,"range":{"start_line":919,"start_character":44,"end_line":919,"end_character":48},"updated":"2017-01-26 01:31:59.000000000","message":"Technically this would be \u0027VCPU\u0027.","commit_id":"78d439df2d8b8a7acaf6cab38743135470eaa80a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"18f23d6c83c3b9ccf31cc4a5b6d98e82142ede10","unresolved":false,"context_lines":[{"line_number":917,"context_line":"        mock_put.return_value.status_code \u003d 409"},{"line_number":918,"context_line":"        mock_put.return_value.text \u003d ("},{"line_number":919,"context_line":"            \"update conflict: Inventory for VCPU on \""},{"line_number":920,"context_line":"            \"resource provider 123 in use\""},{"line_number":921,"context_line":"        )"},{"line_number":922,"context_line":""},{"line_number":923,"context_line":"        inv_data \u003d report._compute_node_to_inventory_dict(compute_node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_f60394b6","line":920,"range":{"start_line":920,"start_character":31,"end_line":920,"end_character":34},"updated":"2017-01-26 01:31:59.000000000","message":"And this would be \u0027123\u0027.","commit_id":"78d439df2d8b8a7acaf6cab38743135470eaa80a"}]}
