)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"840f544bca6608d24613f1d2eeb12cdfd515706f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e4c75285_95113805","updated":"2024-05-16 09:42:11.000000000","message":"lgtm","commit_id":"83af2c458b311bd33a16c3321ab7c881b0624668"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8792e0d883ac2066f46398a02900cdebc888daa8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"897edaa9_b52026a3","updated":"2025-09-30 12:35:08.000000000","message":"i think the overall logic is correct but the testing and release note can be improved","commit_id":"0dbec3e73b6b1a6f6727df41e92d0d756ac6cc25"}],"nova/api/metadata/base.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8792e0d883ac2066f46398a02900cdebc888daa8","unresolved":true,"context_lines":[{"line_number":737,"context_line":"        if isinstance(data, dict) and path_tokens[i] in data:"},{"line_number":738,"context_line":"            data \u003d data[path_tokens[i]]"},{"line_number":739,"context_line":"        else:"},{"line_number":740,"context_line":"            raise KeyError(\"/\".join(path_tokens[0:i]))"},{"line_number":741,"context_line":"    return data"}],"source_content_type":"text/x-python","patch_set":2,"id":"36a13b18_1ca7ea4e","line":740,"updated":"2025-09-30 12:35:08.000000000","message":"we should ideally have a test that assert the http responce code\n\nin this case if the path is invalid it shoudl be a 404","commit_id":"0dbec3e73b6b1a6f6727df41e92d0d756ac6cc25"}],"nova/tests/unit/test_metadata.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8792e0d883ac2066f46398a02900cdebc888daa8","unresolved":true,"context_lines":[{"line_number":579,"context_line":"        inst \u003d self.instance.obj_clone()"},{"line_number":580,"context_line":"        md \u003d fake_InstanceMetadata(self, inst)"},{"line_number":581,"context_line":"        self.assertRaises(base.InvalidMetadataPath,"},{"line_number":582,"context_line":"            md.lookup, \"/abc\")"},{"line_number":583,"context_line":"        self.assertRaises(base.InvalidMetadataPath,"},{"line_number":584,"context_line":"            md.lookup, \"/latest/abc\")"},{"line_number":585,"context_line":"        self.assertRaises(base.InvalidMetadataPath,"}],"source_content_type":"text/x-python","patch_set":2,"id":"0c2373d0_3f1263b5","line":582,"updated":"2025-09-30 12:35:08.000000000","message":"this almost does what i want but  InvalidMetadataPath inherits form Exception\n\nhttps://github.com/openstack/nova/blob/b99a882366251f88d145e27312b94692e0b2266f/nova/api/metadata/base.py#L108-L109\n\nwhich does indeed get translated to a 404 later \n\nhttps://github.com/openstack/nova/blob/master/nova/api/metadata/handler.py#L129-L130\n\nbut it would be nice if we could also extend the functional test to assert the fineal responce code like this\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/test_metadata.py#L89-L95\n\nin a negitive test\n\nideally if you followed or normal 2 commit/patch patteren you woudl add a new test case in a repoducer commit that just asset calling an invlaide path returns the 500 reported in the linked bugs\n\nthen you woudl rebase this patch on top of that and upstate the test to show it now retured a 404.","commit_id":"0dbec3e73b6b1a6f6727df41e92d0d756ac6cc25"}],"releasenotes/notes/metadata-api-enhance-error-handling-beb587a82c13f2ad.yaml":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8792e0d883ac2066f46398a02900cdebc888daa8","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Enhance error handling for incorrect queries to the metadata API service,"},{"line_number":5,"context_line":"    preventing tracebacks in logs and providing clearer responses to incorrect"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"77e102e0_a8a03b46","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":5},"updated":"2025-09-30 12:35:08.000000000","message":"this shoudl proably use fixes instead of other","commit_id":"0dbec3e73b6b1a6f6727df41e92d0d756ac6cc25"}]}
