)]}'
{"validations_libs/ansible.py":[{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"13a7f05bc21e84f271a84127baeee98b25fd52d9","unresolved":true,"context_lines":[{"line_number":68,"context_line":"            if not os.path.exists(play):"},{"line_number":69,"context_line":"                raise RuntimeError(\u0027No such playbook: {}\u0027.format(play))"},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            utils.verify_validation_schema(playbook\u003dplay)"},{"line_number":72,"context_line":"        except (ValueError, TypeError, KeyError) as err:"},{"line_number":73,"context_line":"            raise RuntimeError("},{"line_number":74,"context_line":"                \u0027{err}: Invalid validation file specified \"{play}\".\u0027.format("}],"source_content_type":"text/x-python","patch_set":5,"id":"364aa54d_02a1d25b","line":71,"updated":"2021-09-14 08:46:49.000000000","message":"This should happen earlier in the process as we already check the validations existence in the run_validations method of the ValidationActions class.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"e858979d4ae1d966c36d844c3e845df26dc4e6c3","unresolved":true,"context_lines":[{"line_number":73,"context_line":"                (\u0027Validation file specified \"{play}\"\u0027"},{"line_number":74,"context_line":"                 \u0027contains following issues: {errs}\u0027).format("},{"line_number":75,"context_line":"                    play\u003dplay,"},{"line_number":76,"context_line":"                    errs\u003d\u0027\\n-\u0027+(\u0027\\n-\u0027.join(playbook_issues))))"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        self.log.debug(\u0027Ansible playbook {} found\u0027.format(play))"},{"line_number":79,"context_line":"        return play"}],"source_content_type":"text/x-python","patch_set":6,"id":"8cae0e52_361d65a0","line":76,"updated":"2021-09-16 08:46:10.000000000","message":"something is done wrong here, got this:\n\nhttps://paste.opendev.org/show/809359/","commit_id":"302e7841e302a9d5aad8eab8148f21f66a102388"}],"validations_libs/constants.py":[{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"fd4722accd01f2bf176f3cfbbb5720244e96eca8","unresolved":true,"context_lines":[{"line_number":44,"context_line":"                                    \u0027project_dir\u0027, \u0027quiet\u0027, \u0027rotate_artifacts\u0027]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"VALIDATION_PLAYBOOK_SCHEMA \u003d {"},{"line_number":47,"context_line":"    \u0027hosts\u0027: str,"},{"line_number":48,"context_line":"    \u0027vars\u0027: {"},{"line_number":49,"context_line":"        \u0027metadata\u0027: {"},{"line_number":50,"context_line":"            \u0027name\u0027: str,"}],"source_content_type":"text/x-python","patch_set":5,"id":"04945dde_b6da0943","line":47,"updated":"2021-09-13 13:04:36.000000000","message":"What about the gather_facts key some validations have in their playbook?","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"4ab5029842e59017303482bb774c03cbbcfa2f23","unresolved":true,"context_lines":[{"line_number":44,"context_line":"                                    \u0027project_dir\u0027, \u0027quiet\u0027, \u0027rotate_artifacts\u0027]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"VALIDATION_PLAYBOOK_SCHEMA \u003d {"},{"line_number":47,"context_line":"    \u0027hosts\u0027: str,"},{"line_number":48,"context_line":"    \u0027vars\u0027: {"},{"line_number":49,"context_line":"        \u0027metadata\u0027: {"},{"line_number":50,"context_line":"            \u0027name\u0027: str,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a9a318b_049e84a5","line":47,"in_reply_to":"04945dde_b6da0943","updated":"2021-09-13 14:29:22.000000000","message":"The \u0027gather_facts\u0027 key is optional and validations can work without it. So the schema does not require its presence.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"fd4722accd01f2bf176f3cfbbb5720244e96eca8","unresolved":true,"context_lines":[{"line_number":50,"context_line":"            \u0027name\u0027: str,"},{"line_number":51,"context_line":"            \u0027description\u0027: str,"},{"line_number":52,"context_line":"            \u0027groups\u0027: list"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027roles\u0027: list"},{"line_number":56,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":5,"id":"a85049a2_44dd7a53","line":53,"updated":"2021-09-13 13:04:36.000000000","message":"What about the categories and products keys?","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"cec8605f5ea3b533bb8f2e10697141fc4b505e11","unresolved":true,"context_lines":[{"line_number":50,"context_line":"            \u0027name\u0027: str,"},{"line_number":51,"context_line":"            \u0027description\u0027: str,"},{"line_number":52,"context_line":"            \u0027groups\u0027: list"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027roles\u0027: list"},{"line_number":56,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f6f79e0_d05540f0","line":53,"in_reply_to":"460de7a4_08c94b34","updated":"2021-09-14 08:52:33.000000000","message":"only the validations in validations-common will have to be patched asap. Otherwise, validations from TV are ok in master and the backport is on his way into wallaby [1].\n\n[1] https://review.opendev.org/c/openstack/tripleo-validations/+/807996","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"a0c2c404fc632c775665c50de55d6721cdcd9473","unresolved":true,"context_lines":[{"line_number":50,"context_line":"            \u0027name\u0027: str,"},{"line_number":51,"context_line":"            \u0027description\u0027: str,"},{"line_number":52,"context_line":"            \u0027groups\u0027: list"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027roles\u0027: list"},{"line_number":56,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":5,"id":"8b928908_387a7620","line":53,"in_reply_to":"5deea05a_417a6562","updated":"2021-09-14 07:24:50.000000000","message":"Nope, we already had this discussion and it is written in the validation metadata evolution specification in a red note:\n\n\u003c\u003c The products and the categories keys will have to be present in the validation playbooks but as for the groups, these keys might be set to an empty list. \u003e\u003e\n\nThe custom Ansible-lint you\u0027ve improved went into this direction too!\n\nPS: Categories and products will only hit master and wallaby.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"01baa75385708c67e290e386ceedbd3e1fef0624","unresolved":true,"context_lines":[{"line_number":50,"context_line":"            \u0027name\u0027: str,"},{"line_number":51,"context_line":"            \u0027description\u0027: str,"},{"line_number":52,"context_line":"            \u0027groups\u0027: list"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027roles\u0027: list"},{"line_number":56,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":5,"id":"460de7a4_08c94b34","line":53,"in_reply_to":"8b928908_387a7620","updated":"2021-09-14 08:25:05.000000000","message":"I have to point out, that right now, numerous validation playbooks are not compliant with this specification. The playbook validator patch, if set up so that it demands these keys, would inevitably break things. Unless the playbooks were changed first.\n\nThe schema would have to be delayed, or merged now and updated later otherwise.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"4ab5029842e59017303482bb774c03cbbcfa2f23","unresolved":true,"context_lines":[{"line_number":50,"context_line":"            \u0027name\u0027: str,"},{"line_number":51,"context_line":"            \u0027description\u0027: str,"},{"line_number":52,"context_line":"            \u0027groups\u0027: list"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027roles\u0027: list"},{"line_number":56,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":5,"id":"5deea05a_417a6562","line":53,"in_reply_to":"a85049a2_44dd7a53","updated":"2021-09-13 14:29:22.000000000","message":"Unlike \u0027groups\u0027 which are used in all validations to some degree and have a pre-defined list of accepted values, the categories and products are relatively recent addition and are explicitly optional.\n\nTherefor the schema does not require them.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"fd4722accd01f2bf176f3cfbbb5720244e96eca8","unresolved":true,"context_lines":[{"line_number":52,"context_line":"            \u0027groups\u0027: list"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027roles\u0027: list"},{"line_number":56,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":5,"id":"00ef84bc_6c62616f","line":55,"updated":"2021-09-13 13:04:36.000000000","message":"Some validations are calling tasks from a role playbook like this way:\n\n     tasks:\n       - include_role:\n           name: role_name\n           tasks_from: playbook.yaml\n\nWhich means they won\u0027t pass the schema validation!","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"4ab5029842e59017303482bb774c03cbbcfa2f23","unresolved":true,"context_lines":[{"line_number":52,"context_line":"            \u0027groups\u0027: list"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    },"},{"line_number":55,"context_line":"    \u0027roles\u0027: list"},{"line_number":56,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":5,"id":"52ac961c_9fcb18af","line":55,"in_reply_to":"00ef84bc_6c62616f","updated":"2021-09-13 14:29:22.000000000","message":"A good point, this will require adjustment.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"}],"validations_libs/utils.py":[{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"13a7f05bc21e84f271a84127baeee98b25fd52d9","unresolved":true,"context_lines":[{"line_number":622,"context_line":"    :raises: TypeError if the type of the value does not match expectations"},{"line_number":623,"context_line":"    :raises: ValueError in strict mode if the playbook does not have expected number of keys"},{"line_number":624,"context_line":"    :raises: KeyError in strict mode if there are additional keys present in the playbook"},{"line_number":625,"context_line":"    \"\"\""},{"line_number":626,"context_line":"    if type(playbook) is str:"},{"line_number":627,"context_line":"        playbook \u003d _load_playbook(playbook)[0]"},{"line_number":628,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fc268503_2b4445e1","line":625,"updated":"2021-09-14 08:46:49.000000000","message":"In addition to the fact that this check should be done earlier, we should be strongly inspired by the way our ansible-lint rule works here. By that, I mean, collect all the anomalies found and present them to the user in one shot! And not raising an exception at the first issue.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"2ffafc724c494a68d299fa37cafb7eb3fed0d087","unresolved":false,"context_lines":[{"line_number":622,"context_line":"    :raises: TypeError if the type of the value does not match expectations"},{"line_number":623,"context_line":"    :raises: ValueError in strict mode if the playbook does not have expected number of keys"},{"line_number":624,"context_line":"    :raises: KeyError in strict mode if there are additional keys present in the playbook"},{"line_number":625,"context_line":"    \"\"\""},{"line_number":626,"context_line":"    if type(playbook) is str:"},{"line_number":627,"context_line":"        playbook \u003d _load_playbook(playbook)[0]"},{"line_number":628,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"d42af51b_a69f8626","line":625,"in_reply_to":"de185d16_d1c09b39","updated":"2021-11-26 15:32:50.000000000","message":"Done","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"887ad5e67a9419b774461f19fa63ae1db9738f5d","unresolved":true,"context_lines":[{"line_number":622,"context_line":"    :raises: TypeError if the type of the value does not match expectations"},{"line_number":623,"context_line":"    :raises: ValueError in strict mode if the playbook does not have expected number of keys"},{"line_number":624,"context_line":"    :raises: KeyError in strict mode if there are additional keys present in the playbook"},{"line_number":625,"context_line":"    \"\"\""},{"line_number":626,"context_line":"    if type(playbook) is str:"},{"line_number":627,"context_line":"        playbook \u003d _load_playbook(playbook)[0]"},{"line_number":628,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"de185d16_d1c09b39","line":625,"in_reply_to":"fc268503_2b4445e1","updated":"2021-09-14 10:50:55.000000000","message":"Reasonable change, it would simplify the code a bit as well.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"13a7f05bc21e84f271a84127baeee98b25fd52d9","unresolved":true,"context_lines":[{"line_number":644,"context_line":"            LOG.error(msg)"},{"line_number":645,"context_line":"            raise TypeError(msg)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    if strict:"},{"line_number":648,"context_line":"        if len(playbook) !\u003d len(schema):"},{"line_number":649,"context_line":"            raise ValueError("},{"line_number":650,"context_line":"                (\"The data structure doesn\u0027t have required number of keys %s\""}],"source_content_type":"text/x-python","patch_set":5,"id":"b1d54fbb_4f800645","line":647,"updated":"2021-09-14 08:46:49.000000000","message":"Do we really need a strict mode? if we have a known and official structure we can already check above?","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"2ffafc724c494a68d299fa37cafb7eb3fed0d087","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            LOG.error(msg)"},{"line_number":645,"context_line":"            raise TypeError(msg)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    if strict:"},{"line_number":648,"context_line":"        if len(playbook) !\u003d len(schema):"},{"line_number":649,"context_line":"            raise ValueError("},{"line_number":650,"context_line":"                (\"The data structure doesn\u0027t have required number of keys %s\""}],"source_content_type":"text/x-python","patch_set":5,"id":"90184d48_35d971ab","line":647,"in_reply_to":"4c7b9fde_b51435b1","updated":"2021-11-26 15:32:50.000000000","message":"Done","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"887ad5e67a9419b774461f19fa63ae1db9738f5d","unresolved":true,"context_lines":[{"line_number":644,"context_line":"            LOG.error(msg)"},{"line_number":645,"context_line":"            raise TypeError(msg)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    if strict:"},{"line_number":648,"context_line":"        if len(playbook) !\u003d len(schema):"},{"line_number":649,"context_line":"            raise ValueError("},{"line_number":650,"context_line":"                (\"The data structure doesn\u0027t have required number of keys %s\""}],"source_content_type":"text/x-python","patch_set":5,"id":"4c7b9fde_b51435b1","line":647,"in_reply_to":"b1d54fbb_4f800645","updated":"2021-09-14 10:50:55.000000000","message":"Eh, need is a relative term, but in this case I tend to agree. The schema is getting a bit too strict already.","commit_id":"344893a4905e83c3a54ac61c77b7ed90e7996719"}]}
