)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9712,"name":"Dougal Matthews","email":"dougal.matthews@canonical.com","username":"dougal"},"change_message_id":"a17d8b80db18bf8474de9e83c554be7334741d5c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Until now, we were using Mistral to get all the validations available on"},{"line_number":10,"context_line":"the Undercloud. This patch drops the Mistral support for the validations"},{"line_number":11,"context_line":"listing through the CLI and will parse them directly on the filesystem"},{"line_number":12,"context_line":"instead of parsing from the *tripleo-validations* Swift container."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change makes the CLI faster:"},{"line_number":15,"context_line":"- ~6s with Mistral"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3fa7e38b_c8cf8889","line":12,"range":{"start_line":12,"start_character":29,"end_line":12,"end_character":48},"updated":"2019-11-11 15:07:38.000000000","message":"Does this mean this container is no longer used? Can we delete it?","commit_id":"a0095aff4cd7334337b54c7575e6713c7c5a6bce"}],"tripleoclient/utils.py":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"3b6643653e487f92f2baf1e2bcd186d87245080f","unresolved":false,"context_lines":[{"line_number":1772,"context_line":"    try:"},{"line_number":1773,"context_line":"        return validation[0][\u0027vars\u0027][\u0027metadata\u0027][key]"},{"line_number":1774,"context_line":"    except KeyError:"},{"line_number":1775,"context_line":"        return default_metadata.get(key)"},{"line_number":1776,"context_line":"    except TypeError:"},{"line_number":1777,"context_line":"        LOG.exception(\"Failed to get validation metadata.\")"},{"line_number":1778,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_6adeb311","line":1775,"updated":"2019-11-05 17:17:47.000000000","message":"What\u0027s about if the key doesn\u0027t exist in `default_metadata`?\n\nIf key doesn\u0027t exist in `default_metadata` you will return None, that\u0027s a correct behaviour? I don\u0027t think that\u0027s what you want, I\u0027m right?\n\nI think something like the following example is more secure:\n\n```\ntry:\n    return validation[0][\u0027vars\u0027][\u0027metadata\u0027].get(key, default_metadata[key])\nexcept KeyError:\n    LOG.exception(\"Key ({key}) not found even in default data.\".format(key\u003dkey))\nexcept TypeError:\n    LOG.exception(\"Failed to get validation metadata.\")\n```\n\nHere you will get a `KeyError` in the worst case (even if not exist in default).","commit_id":"027d1d28b56060fcb9258c9d2bd7334b7f86ad4e"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"d443d05f76118c73b2d943e3f4cf827f1b10b8a7","unresolved":false,"context_lines":[{"line_number":1787,"context_line":"            for k, v in validation[0][\u0027vars\u0027].items()"},{"line_number":1788,"context_line":"            if k !\u003d \u0027metadata\u0027"},{"line_number":1789,"context_line":"        }"},{"line_number":1790,"context_line":"    except KeyError:"},{"line_number":1791,"context_line":"        return dict()"},{"line_number":1792,"context_line":""},{"line_number":1793,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_25a685ad","line":1790,"updated":"2019-11-08 07:52:37.000000000","message":"maybe a log.debug() here?","commit_id":"a0095aff4cd7334337b54c7575e6713c7c5a6bce"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"d443d05f76118c73b2d943e3f4cf827f1b10b8a7","unresolved":false,"context_lines":[{"line_number":1796,"context_line":"    validations_abspath \u003d glob.glob(\"{path}/*.yaml\".format(path\u003dpath))"},{"line_number":1797,"context_line":""},{"line_number":1798,"context_line":"    for pl in validations_abspath:"},{"line_number":1799,"context_line":"        validation_id, ext \u003d os.path.splitext(os.path.basename(pl))"},{"line_number":1800,"context_line":"        if ext !\u003d \u0027.yaml\u0027:"},{"line_number":1801,"context_line":"            continue"},{"line_number":1802,"context_line":""},{"line_number":1803,"context_line":"        with open(pl, \u0027r\u0027) as val_playbook:"},{"line_number":1804,"context_line":"            contents \u003d yaml.safe_load(val_playbook)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_c5b451d7","line":1801,"range":{"start_line":1799,"start_character":0,"end_line":1801,"end_character":20},"updated":"2019-11-08 07:52:37.000000000","message":"is this really useful? the \"glob\" is already filtering out non-yaml files.","commit_id":"a0095aff4cd7334337b54c7575e6713c7c5a6bce"}]}
