)]}'
{"nova/scheduler/client/report.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5f4458848212cf753c0ee56f0958a7696fa424d3","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                 if k.startswith(\u0027resources:\u0027)}"},{"line_number":164,"context_line":"    alloc_dict.update("},{"line_number":165,"context_line":"        {k: int(v) for k, v in overrides.items()"},{"line_number":166,"context_line":"         if (k.startswith(objects.ResourceClass.CUSTOM_NAMESPACE) or"},{"line_number":167,"context_line":"             k in fields.ResourceClass.STANDARD)})"},{"line_number":168,"context_line":"    # Remove any zero allocations."},{"line_number":169,"context_line":"    return {key: val for key, val in alloc_dict.items() if val}"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_d997e647","line":167,"range":{"start_line":166,"start_character":9,"end_line":167,"end_character":49},"updated":"2017-07-18 21:47:23.000000000","message":"There should not be any need to to check \n\n  if (k.startswith(objects.ResourceClass.CUSTOM_NAMESPACE) or\n             k in fields.ResourceClass.STANDARD)\n\nAnything in extra_specs that starts with \u0027resources:\u0027 will satisfy those two conditions. Unless, of course, the operator wants to completely disregard the spec and put gibberish in there.","commit_id":"657b67533e2f0a14b5d1be1708067bd494eb148f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6c3f01533914591d14bbebb585a9c8536c22486d","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        VCPU: instance.flavor.vcpus,"},{"line_number":159,"context_line":"        DISK_GB: disk,"},{"line_number":160,"context_line":"    }"},{"line_number":161,"context_line":"    overrides \u003d {k.split(\u0027:\u0027, 1)[1]: v for k, v in"},{"line_number":162,"context_line":"                 instance.flavor.extra_specs.items()"},{"line_number":163,"context_line":"                 if k.startswith(\u0027resources:\u0027)}"},{"line_number":164,"context_line":"    alloc_dict.update("},{"line_number":165,"context_line":"        {k: int(v) for k, v in overrides.items()"},{"line_number":166,"context_line":"         if (k.startswith(objects.ResourceClass.CUSTOM_NAMESPACE) or"},{"line_number":167,"context_line":"             k in fields.ResourceClass.STANDARD)})"},{"line_number":168,"context_line":"    # Remove any zero allocations."},{"line_number":169,"context_line":"    return {key: val for key, val in alloc_dict.items() if val}"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_7e42f8ac","line":167,"range":{"start_line":161,"start_character":4,"end_line":167,"end_character":50},"updated":"2017-07-18 21:23:00.000000000","message":"This is a bit confusing, could you add a comment in here about this - I mean I know, but for posterity.","commit_id":"657b67533e2f0a14b5d1be1708067bd494eb148f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"128b6972b0f6a3f9ac719c369a68c5e061f7cd24","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                 if k.startswith(\u0027resources:\u0027)}"},{"line_number":164,"context_line":"    alloc_dict.update("},{"line_number":165,"context_line":"        {k: int(v) for k, v in overrides.items()"},{"line_number":166,"context_line":"         if (k.startswith(objects.ResourceClass.CUSTOM_NAMESPACE) or"},{"line_number":167,"context_line":"             k in fields.ResourceClass.STANDARD)})"},{"line_number":168,"context_line":"    # Remove any zero allocations."},{"line_number":169,"context_line":"    return {key: val for key, val in alloc_dict.items() if val}"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_39c49af4","line":167,"range":{"start_line":166,"start_character":9,"end_line":167,"end_character":49},"in_reply_to":"1f1a1f67_d997e647","updated":"2017-07-18 22:04:38.000000000","message":"The operator could have put anything in extra_specs that they want, ages ago, before any of this started. It\u0027s the nature of extra_specs and one of the reasons why it\u0027s a wasteland of terrible. Being defensive here is appropriate, IMHO.","commit_id":"657b67533e2f0a14b5d1be1708067bd494eb148f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5bd5d6c9fed7b53a348c4c1908cc538398e9f53f","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    # integers, we convert them here too for any that we find."},{"line_number":174,"context_line":"    overrides \u003d {k: int(v) for k, v in overrides.items()"},{"line_number":175,"context_line":"            if (k.startswith(objects.ResourceClass.CUSTOM_NAMESPACE) or"},{"line_number":176,"context_line":"                k in fields.ResourceClass.STANDARD)}"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    alloc_dict.update(overrides)"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_c0a36aff","line":176,"updated":"2017-07-18 22:58:03.000000000","message":"check. better safe than sorry.","commit_id":"a22ae8baa23e5661fbbf0495cb6057f620de0608"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5f4458848212cf753c0ee56f0958a7696fa424d3","unresolved":false,"context_lines":[{"line_number":1620,"context_line":"        specs \u003d {"},{"line_number":1621,"context_line":"            \u0027resources:CUSTOM_DAN\u0027: \u0027123\u0027,"},{"line_number":1622,"context_line":"            \u0027resources:%s\u0027 % fields.ResourceClass.VCPU: \u00274\u0027,"},{"line_number":1623,"context_line":"            \u0027resources:NOTATHING\u0027: \u0027456\u0027,"},{"line_number":1624,"context_line":"            \u0027resources:NOTEVENANUMBER\u0027: \u0027catfood\u0027,"},{"line_number":1625,"context_line":"            \u0027resources:\u0027: \u00277\u0027,"},{"line_number":1626,"context_line":"            \u0027resources:ferret:weasel\u0027: \u0027smelly\u0027,"},{"line_number":1627,"context_line":"            \u0027foo\u0027: \u0027bar\u0027,"},{"line_number":1628,"context_line":"        }"},{"line_number":1629,"context_line":"        inst \u003d objects.Instance("}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_1998be67","line":1626,"range":{"start_line":1623,"start_character":12,"end_line":1626,"end_character":48},"updated":"2017-07-18 21:47:23.000000000","message":"ok, I guess we can assume that operators are idiots, but if that\u0027s the case, then we need to raise exceptions whenever we encounter one of these cases. We should never fail silently.","commit_id":"657b67533e2f0a14b5d1be1708067bd494eb148f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"128b6972b0f6a3f9ac719c369a68c5e061f7cd24","unresolved":false,"context_lines":[{"line_number":1620,"context_line":"        specs \u003d {"},{"line_number":1621,"context_line":"            \u0027resources:CUSTOM_DAN\u0027: \u0027123\u0027,"},{"line_number":1622,"context_line":"            \u0027resources:%s\u0027 % fields.ResourceClass.VCPU: \u00274\u0027,"},{"line_number":1623,"context_line":"            \u0027resources:NOTATHING\u0027: \u0027456\u0027,"},{"line_number":1624,"context_line":"            \u0027resources:NOTEVENANUMBER\u0027: \u0027catfood\u0027,"},{"line_number":1625,"context_line":"            \u0027resources:\u0027: \u00277\u0027,"},{"line_number":1626,"context_line":"            \u0027resources:ferret:weasel\u0027: \u0027smelly\u0027,"},{"line_number":1627,"context_line":"            \u0027foo\u0027: \u0027bar\u0027,"},{"line_number":1628,"context_line":"        }"},{"line_number":1629,"context_line":"        inst \u003d objects.Instance("}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_f96e22fe","line":1626,"range":{"start_line":1623,"start_character":12,"end_line":1626,"end_character":48},"in_reply_to":"1f1a1f67_1998be67","updated":"2017-07-18 22:04:38.000000000","message":"No, they\u0027re not idiots. They\u0027re allowed to put anything they want in a key value store. Since we\u0027ll fail if we include something they didn\u0027t intend, we should not set them up for failure. Just like we normalize the ironic node class, since they\u0027re not instructed to use any specific schema there, we should be defensive here about what we include and not include stuff that doesn\u0027t match and might\u0027ve been there since Essex.\n\nWe can log a warning if you think it\u0027s necessary, but it\u0027ll be a lot of logging if they have 100k instances with something that matches our filter and suddenly roll new code.","commit_id":"657b67533e2f0a14b5d1be1708067bd494eb148f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"efb05aa7b0cef511aaf7eca119b18e3c114ae9eb","unresolved":false,"context_lines":[{"line_number":1624,"context_line":"            \u0027resources:NOTEVENANUMBER\u0027: \u0027catfood\u0027,"},{"line_number":1625,"context_line":"            \u0027resources:\u0027: \u00277\u0027,"},{"line_number":1626,"context_line":"            \u0027resources:ferret:weasel\u0027: \u0027smelly\u0027,"},{"line_number":1627,"context_line":"            \u0027foo\u0027: \u0027bar\u0027,"},{"line_number":1628,"context_line":"        }"},{"line_number":1629,"context_line":"        inst \u003d objects.Instance("},{"line_number":1630,"context_line":"            uuid\u003duuids.inst,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_4c5d5145","line":1627,"range":{"start_line":1627,"start_character":12,"end_line":1627,"end_character":25},"updated":"2017-07-19 02:27:33.000000000","message":"now you\u0027re just getting lazy","commit_id":"a22ae8baa23e5661fbbf0495cb6057f620de0608"}]}
