)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"2160eb8981929cfb959b5e34d605329a943f6cc3","unresolved":true,"context_lines":[{"line_number":13,"context_line":"on remote hosts)."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The python or bash script provided via the CLI is dumped into a generic"},{"line_number":16,"context_line":"playbook and run with Ansible via the script builtin module."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"the CLI looks like:"},{"line_number":19,"context_line":"validation run --validation py-val.py \\"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"a05a0f70_d0d48651","line":16,"updated":"2021-05-31 07:03:53.000000000","message":"I am wondering if we should interface this with testinfra[1] instead?\nFor example, it is one of the possible Molecule verifier and then Ansible \nalready is well interfaced with it as a backend[2].\n\nJust thinking here... Just something we could take in consideration maybe? \n\n[1] https://testinfra.readthedocs.io/en/latest/modules.html#ansible\n[2] https://testinfra.readthedocs.io/en/latest/backends.html#ansible","commit_id":"c43219eb3bfdb5f9fdb2634579cb555e4a066e13"}],"validations_libs/cli/run.py":[{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"2160eb8981929cfb959b5e34d605329a943f6cc3","unresolved":true,"context_lines":[{"line_number":74,"context_line":"                            default\u003d\u0027ansible\u0027,"},{"line_number":75,"context_line":"                            choices\u003d[\u0027python\u0027, \u0027bash\u0027, \u0027ansible\u0027],"},{"line_number":76,"context_line":"                            help\u003d(\"Type of the Validation to be run.\""},{"line_number":77,"context_line":"                                  \"The default is Ansible playbook format.\""},{"line_number":78,"context_line":"                                  \"Python and bash script are also supported.\""},{"line_number":79,"context_line":"                                  \"For Python Make sure your python file is \""},{"line_number":80,"context_line":"                                  \"executable.\"))"}],"source_content_type":"text/x-python","patch_set":5,"id":"cdc3eb2c_a932b8fd","line":77,"updated":"2021-05-31 07:03:53.000000000","message":"Needs space at the end of the sentence","commit_id":"c43219eb3bfdb5f9fdb2634579cb555e4a066e13"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"2160eb8981929cfb959b5e34d605329a943f6cc3","unresolved":true,"context_lines":[{"line_number":75,"context_line":"                            choices\u003d[\u0027python\u0027, \u0027bash\u0027, \u0027ansible\u0027],"},{"line_number":76,"context_line":"                            help\u003d(\"Type of the Validation to be run.\""},{"line_number":77,"context_line":"                                  \"The default is Ansible playbook format.\""},{"line_number":78,"context_line":"                                  \"Python and bash script are also supported.\""},{"line_number":79,"context_line":"                                  \"For Python Make sure your python file is \""},{"line_number":80,"context_line":"                                  \"executable.\"))"},{"line_number":81,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ef0caee8_4725edf6","line":78,"updated":"2021-05-31 07:03:53.000000000","message":"Here too","commit_id":"c43219eb3bfdb5f9fdb2634579cb555e4a066e13"},{"author":{"_account_id":11491,"name":"Gael Chamoulaud","email":"gchamoul@redhat.com","username":"gchamoul"},"change_message_id":"2160eb8981929cfb959b5e34d605329a943f6cc3","unresolved":true,"context_lines":[{"line_number":172,"context_line":"        if parsed_args.validation_type !\u003d \u0027ansible\u0027 \\"},{"line_number":173,"context_line":"        and parsed_args.limit is None:"},{"line_number":174,"context_line":"            error_msg \u003d ("},{"line_number":175,"context_line":"                \"If you provide a non-ansible Validation type, you must \""},{"line_number":176,"context_line":"                \"specify a target host with --limit option.\")"},{"line_number":177,"context_line":"            raise RuntimeError(error_msg)"},{"line_number":178,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"eb7e865c_307d8789","line":175,"updated":"2021-05-31 07:03:53.000000000","message":"s/non-ansible/non Ansible/\ns/Validation/validation/","commit_id":"c43219eb3bfdb5f9fdb2634579cb555e4a066e13"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"3afa397fc95a61128cc0d0ba1c4e5cd8c5442cd6","unresolved":true,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"            extra_vars \u003d common.read_extra_vars_file(parsed_args.extra_vars_file)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"        if parsed_args.validation_type !\u003d \u0027ansible\u0027 \\"},{"line_number":175,"context_line":"        and parsed_args.limit is None:"},{"line_number":176,"context_line":"            error_msg \u003d ("},{"line_number":177,"context_line":"                \"If you provide a non Ansible validation type, you must \""}],"source_content_type":"text/x-python","patch_set":8,"id":"379049d5_3163200c","line":174,"updated":"2021-06-25 12:46:46.000000000","message":"We should put a debug statement here. Indicating that we are running a non-ansible validation. \nOr, even better, what kind of validation we are running.","commit_id":"a675e6bad95c552fd76f36fb8ae5950599b9a4ce"}],"validations_libs/constants.py":[{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"3afa397fc95a61128cc0d0ba1c4e5cd8c5442cd6","unresolved":true,"context_lines":[{"line_number":28,"context_line":"    VALIDATIONS_LOG_BASEDIR,"},{"line_number":29,"context_line":"    \u0027artifacts\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"GENERIC_PLAYBOOK \u003d ["},{"line_number":32,"context_line":"    {\u0027gather_facts\u0027: False,"},{"line_number":33,"context_line":"     \u0027hosts\u0027: \u0027\u0027,"},{"line_number":34,"context_line":"     \u0027name\u0027: \u0027Generic playbook\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"0c159e21_5465ba8c","line":31,"updated":"2021-06-25 12:46:46.000000000","message":"We could call it a wrapper playbook. As we are using as a vehicle for non-ansible validations.","commit_id":"a675e6bad95c552fd76f36fb8ae5950599b9a4ce"}],"validations_libs/validation_actions.py":[{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"3afa397fc95a61128cc0d0ba1c4e5cd8c5442cd6","unresolved":true,"context_lines":[{"line_number":377,"context_line":"            if _play:"},{"line_number":378,"context_line":"                # Handle non-ansible Validation type:"},{"line_number":379,"context_line":"                filename \u003d None"},{"line_number":380,"context_line":"                if validation_type !\u003d \u0027ansible\u0027:"},{"line_number":381,"context_line":"                    if limit_hosts:"},{"line_number":382,"context_line":"                        for play in constants.GENERIC_PLAYBOOK:"},{"line_number":383,"context_line":"                            play.update({\u0027hosts\u0027: _hosts})"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ca482e0_ec59a62e","line":380,"updated":"2021-06-25 12:46:46.000000000","message":"We should restrict the parameter values. Either here, in the CLI, or even both. There is a great deal of widely different behavior we might end up supporting, for different types of validations, and it would be great if we could differentiate between them.","commit_id":"a675e6bad95c552fd76f36fb8ae5950599b9a4ce"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"3afa397fc95a61128cc0d0ba1c4e5cd8c5442cd6","unresolved":true,"context_lines":[{"line_number":388,"context_line":"                            prefix\u003d\u0027{}-\u0027.format(_play),"},{"line_number":389,"context_line":"                            dir\u003d\u0027/tmp\u0027)"},{"line_number":390,"context_line":"                        try:"},{"line_number":391,"context_line":"                            with open(filename, \u0027w\u0027) as tmp_play:"},{"line_number":392,"context_line":"                                tmp_play.write("},{"line_number":393,"context_line":"                                    yaml.safe_dump(constants.GENERIC_PLAYBOOK,"},{"line_number":394,"context_line":"                                                   default_flow_style\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":8,"id":"880a79d3_0afe0222","line":391,"updated":"2021-06-25 12:46:46.000000000","message":"Debug log message with the selected path would be great.","commit_id":"a675e6bad95c552fd76f36fb8ae5950599b9a4ce"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"3afa397fc95a61128cc0d0ba1c4e5cd8c5442cd6","unresolved":true,"context_lines":[{"line_number":392,"context_line":"                                tmp_play.write("},{"line_number":393,"context_line":"                                    yaml.safe_dump(constants.GENERIC_PLAYBOOK,"},{"line_number":394,"context_line":"                                                   default_flow_style\u003dFalse))"},{"line_number":395,"context_line":"                        except OSError:"},{"line_number":396,"context_line":"                            msg \u003d \"Unable to write temporary playbook in /tmp.\""},{"line_number":397,"context_line":"                            raise OSError(msg)"},{"line_number":398,"context_line":"                        playbook \u003d filename"}],"source_content_type":"text/x-python","patch_set":8,"id":"a6120a6e_553353ab","line":395,"updated":"2021-06-25 12:46:46.000000000","message":"We should also cover the PermissionsError.","commit_id":"a675e6bad95c552fd76f36fb8ae5950599b9a4ce"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"3afa397fc95a61128cc0d0ba1c4e5cd8c5442cd6","unresolved":true,"context_lines":[{"line_number":431,"context_line":"                                })"},{"line_number":432,"context_line":"                # clean /tmp if non Ansible validation"},{"line_number":433,"context_line":"                if filename:"},{"line_number":434,"context_line":"                    os.remove(filename)"},{"line_number":435,"context_line":"            else:"},{"line_number":436,"context_line":"                self.log.debug(\u0027Skipping Validations: {}\u0027.format(playbook))"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"09065b8e_58f4232e","line":434,"updated":"2021-06-25 12:46:46.000000000","message":"Another message about deleting the file could be here. Although it is optional.","commit_id":"a675e6bad95c552fd76f36fb8ae5950599b9a4ce"},{"author":{"_account_id":32926,"name":"Jiri Podivin","display_name":"jpodivin","email":"jpodivin@redhat.com","username":"jpodivin"},"change_message_id":"39b8b25947dd98327017f14a52af11010e7674d9","unresolved":true,"context_lines":[{"line_number":423,"context_line":"                            for tasks in play[\u0027tasks\u0027]:"},{"line_number":424,"context_line":"                                tasks.update({\u0027name\u0027: os.path.basename(_play)})"},{"line_number":425,"context_line":"                                tasks.update({\u0027script\u0027: playbook})"},{"line_number":426,"context_line":"                        _, filename \u003d tempfile.mkstemp("},{"line_number":427,"context_line":"                            prefix\u003d\u0027{}-\u0027.format(_play),"},{"line_number":428,"context_line":"                            dir\u003d\u0027/tmp\u0027)"},{"line_number":429,"context_line":"                        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"baea3c15_b35da3c2","line":426,"updated":"2021-09-10 12:36:24.000000000","message":"I think we might be able to use the TemporaryFile class here. As we already have the tempfile lib imported.","commit_id":"8c4f20751fc066ea29fb56d2a300f2ac8660f4c2"}]}
