)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"b22585f38b34bba48db20b8ec2810dd5b1af198b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"bd0eb8ff_7c0e2de9","updated":"2022-04-20 11:55:22.000000000","message":"I take it all back, sorry. It does indeed work as described.\n\nMaybe a single line letting the user know that we\u0027re rendering templates would be a nice middle ground though?","commit_id":"4062bdb60d045c4d06c12cabd09a25a10e3c027f"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"cde67ea3e9c570e4c8b36ea1e3f078aa9acd9ec3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"c4474da2_d4551c4d","updated":"2022-04-20 11:45:37.000000000","message":"One minor problem with this. But overall, I like the direction. There is a fine line between informative information, and drowning the user in too much information to comb through should something fail. ","commit_id":"4062bdb60d045c4d06c12cabd09a25a10e3c027f"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"5fe16396db6ac008483edec4b61c9d1ca006994a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"608a3d5b_def02867","updated":"2022-04-18 13:59:58.000000000","message":"i feel like if there is an error, this isn\u0027t an improvement. Having to reproduce manually feels like a regression in UX. Could we save the output and display it only if there is an error?","commit_id":"4062bdb60d045c4d06c12cabd09a25a10e3c027f"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"d8fd9c8088a7221124448ddc0a77f02c7779e812","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f8a65a9f_52116851","updated":"2022-04-19 16:28:03.000000000","message":"recheck","commit_id":"4062bdb60d045c4d06c12cabd09a25a10e3c027f"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"c2ed2255d61c2febbbb53c5f6a93ede9296c8d5a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3d88b9c0_38478717","in_reply_to":"608a3d5b_def02867","updated":"2022-04-18 14:15:12.000000000","message":"I guess we could only log if there\u0027s an error? Sadly the way this all works: we\u0027re shelling out to another tool which doesn\u0027t take care of logging. All the stdout is returned as a WARNING log message which is both too verbose and misleading.\n\nI see the current output as mostly useless; it\u0027s a mess mixed with ansible/tripleo/and random tools. With this change a user will know what failed and how to reproduce it, which will generate useful log information if required.","commit_id":"4062bdb60d045c4d06c12cabd09a25a10e3c027f"},{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"571e7e06ed40fd001d86b98dc859130430565cc2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"04717a4a_328fe71f","updated":"2022-04-21 03:48:43.000000000","message":"If the logs are too verbose to our liking, why not change in the script[1] itself to remove or use add --debug flag to print those?\n\n[1] https://github.com/openstack/tripleo-heat-templates/blob/master/tools/process-templates.py#L82\n    https://github.com/openstack/tripleo-heat-templates/blob/master/tools/process-templates.py#L307","commit_id":"45cf5cbbefc5b9bfd96fa397b343b5a2da963e55"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"0f4f6c7a67bb0d67a14acdfd04d8322a7b968180","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"1f2cb5db_38a7f622","in_reply_to":"04717a4a_328fe71f","updated":"2022-04-28 15:31:33.000000000","message":"I think we should do this too. However, I\u0027d like to also start refactoring how we execute and external scripts / binaries from within the client; mostly so we\u0027re not always logging warnings for all of a given script\u0027s stdout.","commit_id":"45cf5cbbefc5b9bfd96fa397b343b5a2da963e55"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"2de652225b862b763cd2b36e000043127d1ab5d8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3346838d_1e5652ab","updated":"2022-05-12 16:31:21.000000000","message":"i\u0027m fine to see if there other opinions on this one. I feel that we should always show errors, and that the current behavior (while not great), is better in that it will show the error without having to reproduce the failure.","commit_id":"a8f9e1e868f8d4392c1cf1fb263951745ed9ac9f"}],"tripleoclient/utils.py":[{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"cde67ea3e9c570e4c8b36ea1e3f078aa9acd9ec3","unresolved":true,"context_lines":[{"line_number":1903,"context_line":"        args,"},{"line_number":1904,"context_line":"        working_dir,"},{"line_number":1905,"context_line":"        retcode_only\u003dFalse"},{"line_number":1906,"context_line":"    ).wait() !\u003d 0:"},{"line_number":1907,"context_line":"        log.error(_("},{"line_number":1908,"context_line":"            \"Problems generating templates. Run the following command to\""},{"line_number":1909,"context_line":"            \" reproduce/debug template generation failure.\\n\\n{}\\n\".format("}],"source_content_type":"text/x-python","patch_set":1,"id":"b8fd8d29_9da46c41","line":1906,"updated":"2022-04-20 11:45:37.000000000","message":"I don\u0027t think it will print the error because of this wait(). \n\nI tested my suspicions, see below:\n\nIf I remove the wait(), I see the intended error:\n\n```\n2022-04-20 07:41:57.980 1010733 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud [-] Problems generating templates. Run the following command to reproduce/debug template generation failure.\n\npython3 /usr/share/openstack-tripleo-heat-templates/tools/process-templates.py --roles-data /home/stack/overcloud-deploy/overcloud/tripleo-overcloud-roles-data.yaml --network-data /home/stack/overcloud-deploy/overcloud/tripleo-overcloud-network-data.yaml -p /home/stack/overcloud-deploy/overcloud/tripleo-heat-templates\n\n2022-04-20 07:41:57.981 1010733 ERROR openstack [-] Template rendering failed.: tripleoclient.exceptions.DeploymentError: Template rendering failed.\n2022-04-20 07:41:57.983 1010733 INFO osc_lib.shell [-] END return value: 1\n```\n\nWith the wait(), I just get a traceback:\n```\n2022-04-20 07:39:16.935 1006226 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud   File \"/usr/lib/python3.9/site-packages/heatclient/common/http.py\", line 234, in _http_request\n2022-04-20 07:39:16.935 1006226 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud     raise exc.from_response(resp)\n2022-04-20 07:39:16.935 1006226 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud heatclient.exc.HTTPBadRequest: ERROR: Internal Error\n2022-04-20 07:39:16.935 1006226 ERROR tripleoclient.v1.overcloud_deploy.DeployOvercloud\n2022-04-20 07:39:16.941 1006226 ERROR openstack [-] ERROR: Internal Error: heatclient.exc.HTTPBadRequest: ERROR: Internal Error\n2022-04-20 07:39:16.946 1006226 INFO osc_lib.shell [-] END return value: 1\n```","commit_id":"4062bdb60d045c4d06c12cabd09a25a10e3c027f"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"b22585f38b34bba48db20b8ec2810dd5b1af198b","unresolved":false,"context_lines":[{"line_number":1903,"context_line":"        args,"},{"line_number":1904,"context_line":"        working_dir,"},{"line_number":1905,"context_line":"        retcode_only\u003dFalse"},{"line_number":1906,"context_line":"    ).wait() !\u003d 0:"},{"line_number":1907,"context_line":"        log.error(_("},{"line_number":1908,"context_line":"            \"Problems generating templates. Run the following command to\""},{"line_number":1909,"context_line":"            \" reproduce/debug template generation failure.\\n\\n{}\\n\".format("}],"source_content_type":"text/x-python","patch_set":1,"id":"94891338_30ce42ea","line":1906,"in_reply_to":"5085d938_506ad763","updated":"2022-04-20 11:55:22.000000000","message":"Done","commit_id":"4062bdb60d045c4d06c12cabd09a25a10e3c027f"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"fb49524702ff5b2fc8fb22a29c774b9bd46bac02","unresolved":true,"context_lines":[{"line_number":1903,"context_line":"        args,"},{"line_number":1904,"context_line":"        working_dir,"},{"line_number":1905,"context_line":"        retcode_only\u003dFalse"},{"line_number":1906,"context_line":"    ).wait() !\u003d 0:"},{"line_number":1907,"context_line":"        log.error(_("},{"line_number":1908,"context_line":"            \"Problems generating templates. Run the following command to\""},{"line_number":1909,"context_line":"            \" reproduce/debug template generation failure.\\n\\n{}\\n\".format("}],"source_content_type":"text/x-python","patch_set":1,"id":"5085d938_506ad763","line":1906,"in_reply_to":"b8fd8d29_9da46c41","updated":"2022-04-20 11:48:20.000000000","message":"Actually, if I remove the wait and also fix my template type, I still get the error. So there is more too it than just that.\n\nBut in any case, I believe your intention is to show this error to the user if there is something that prevents us rendering the templates. In which case, I wasn\u0027t seeing the error when my templates contained an issue.","commit_id":"4062bdb60d045c4d06c12cabd09a25a10e3c027f"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"f092442d8be7f1da3e5a815d9f15d717a589a0a0","unresolved":true,"context_lines":[{"line_number":1905,"context_line":"    if run_command_and_log(log, args, working_dir) !\u003d 0:"},{"line_number":1906,"context_line":"        msg \u003d _(\"Problems generating templates.\")"},{"line_number":1907,"context_line":"        log.error(msg)"},{"line_number":1908,"context_line":"        raise exceptions.DeploymentError(msg)"},{"line_number":1909,"context_line":""},{"line_number":1910,"context_line":""},{"line_number":1911,"context_line":"def rewrite_env_path(env_path, tht_root, user_tht_root, log\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"732ee73c_e5a31bad","side":"PARENT","line":1908,"range":{"start_line":1908,"start_character":41,"end_line":1908,"end_character":44},"updated":"2022-05-13 07:02:11.000000000","message":"i am guessing this is what the discussion in the patch is about.\nso why *don\u0027t* we pass the error message back to the user?","commit_id":"e0a70992810e5478cb4d1b1bff2b0cd3fc5dbc26"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"f092442d8be7f1da3e5a815d9f15d717a589a0a0","unresolved":true,"context_lines":[{"line_number":1912,"context_line":"        log.error(_("},{"line_number":1913,"context_line":"            \"Problems generating templates. Run the following command to\""},{"line_number":1914,"context_line":"            \" reproduce/debug template generation failure.\\n\\n{}\\n\".format("},{"line_number":1915,"context_line":"                \u0027 \u0027.join(args)"},{"line_number":1916,"context_line":"            )"},{"line_number":1917,"context_line":"        ))"},{"line_number":1918,"context_line":"        raise exceptions.DeploymentError(\"Template rendering failed.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"4df39f2b_60f0f918","line":1915,"updated":"2022-05-13 07:02:11.000000000","message":"why not include the error message in the log.error?","commit_id":"a8f9e1e868f8d4392c1cf1fb263951745ed9ac9f"}]}
