)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4f82b6ec3b407c61d91185660e05e30031fea98b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"ae9e05bfc3d7ec867bd6ec78c301f11c2bdd0d5f"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: I2ce344330905eef437ef3f89a2a01169a30df8ab"},{"line_number":26,"context_line":"Closes-Bug: #1482382"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f93b717_d640a60a","line":26,"updated":"2018-01-25 16:31:42.000000000","message":"I don\u0027t see how this would solve that bug. The change proposed here should only help with error cases, whereas that bug is not about an error case.","commit_id":"1b5c39ea5138dc0950dad48233f7d29c6e750d14"}],"oslo_concurrency/processutils.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"095858bb2feae6086083d458918c561937de2977","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        # (decoding cannot fail). Decode even if binary is True because"},{"line_number":537,"context_line":"        # mask_password() requires Unicode on Python 3"},{"line_number":538,"context_line":"        stdout \u003d os.fsdecode(stdout)"},{"line_number":539,"context_line":"        stderr \u003d os.fsdecode(stderr)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"    # exit_status \u003d\u003d -1 if no exit code was returned"},{"line_number":542,"context_line":"    if exit_status !\u003d -1:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_84274c13","line":539,"updated":"2018-01-25 12:56:40.000000000","message":"That looks useless decoding when an error occurs.","commit_id":"1b5c39ea5138dc0950dad48233f7d29c6e750d14"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4f82b6ec3b407c61d91185660e05e30031fea98b","unresolved":false,"context_lines":[{"line_number":541,"context_line":"    # exit_status \u003d\u003d -1 if no exit code was returned"},{"line_number":542,"context_line":"    if exit_status !\u003d -1:"},{"line_number":543,"context_line":"        LOG.debug(\u0027Result was %s\u0027 % exit_status)"},{"line_number":544,"context_line":"        sanitized_stdout \u003d strutils.mask_password(stdout)"},{"line_number":545,"context_line":"        sanitized_stderr \u003d strutils.mask_password(stderr)"},{"line_number":546,"context_line":"        if check_exit_code and exit_status !\u003d 0:"},{"line_number":547,"context_line":"            raise ProcessExecutionError(exit_code\u003dexit_status,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_96553e53","line":544,"updated":"2018-01-25 16:31:42.000000000","message":"if check_exit_code \u003d\u003d False, this method returns stdout and stderr even for error cases, yet you\u0027re not sanitizing (or rather you are, but you\u0027re not returning the sanitized values).","commit_id":"1b5c39ea5138dc0950dad48233f7d29c6e750d14"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4993414e312fe1c3ddc5950407f1ff4ccb4db62b","unresolved":false,"context_lines":[{"line_number":504,"context_line":"def ssh_execute(ssh, cmd, process_input\u003dNone,"},{"line_number":505,"context_line":"                addl_env\u003dNone, check_exit_code\u003dTrue,"},{"line_number":506,"context_line":"                binary\u003dFalse, timeout\u003dNone,"},{"line_number":507,"context_line":"                mask_pwd_required\u003dTrue):"},{"line_number":508,"context_line":"    \"\"\"Run a command through SSH."},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    .. versionchanged:: 1.9"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_a2628815","line":507,"range":{"start_line":507,"start_character":16,"end_line":507,"end_character":33},"updated":"2018-02-05 15:28:42.000000000","message":"sanitize_stdout would probably be a better name (assuming you agree with my later comments).","commit_id":"fcb1fa570fe7ea0764d5868722e435b89e2bad42"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4993414e312fe1c3ddc5950407f1ff4ccb4db62b","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                addl_env\u003dNone, check_exit_code\u003dTrue,"},{"line_number":506,"context_line":"                binary\u003dFalse, timeout\u003dNone,"},{"line_number":507,"context_line":"                mask_pwd_required\u003dTrue):"},{"line_number":508,"context_line":"    \"\"\"Run a command through SSH."},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"    .. versionchanged:: 1.9"},{"line_number":511,"context_line":"       Added *binary* optional parameter."}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_c22c749b","line":508,"updated":"2018-02-05 15:28:42.000000000","message":"describing the args and kwargs for this method in the docstring would really help users understand how to use this.","commit_id":"fcb1fa570fe7ea0764d5868722e435b89e2bad42"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4993414e312fe1c3ddc5950407f1ff4ccb4db62b","unresolved":false,"context_lines":[{"line_number":541,"context_line":""},{"line_number":542,"context_line":"    if mask_pwd_required:"},{"line_number":543,"context_line":"        stdout \u003d strutils.mask_password(stdout)"},{"line_number":544,"context_line":"        stderr \u003d strutils.mask_password(stderr)"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"    # exit_status \u003d\u003d -1 if no exit code was returned"},{"line_number":547,"context_line":"    if exit_status !\u003d -1:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_62e9e07e","line":544,"updated":"2018-02-05 15:28:42.000000000","message":"I suggest always sanitizing stderr. If we find a case where that causes an issue, we can add a new sanitize_stderr kwarg to control that, but it seems unlikely.","commit_id":"fcb1fa570fe7ea0764d5868722e435b89e2bad42"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"4993414e312fe1c3ddc5950407f1ff4ccb4db62b","unresolved":false,"context_lines":[{"line_number":547,"context_line":"    if exit_status !\u003d -1:"},{"line_number":548,"context_line":"        LOG.debug(\u0027Result was %s\u0027 % exit_status)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        # In case of \u0027no exit code\u0027 or \u0027exit with an error\u0027, ignore"},{"line_number":551,"context_line":"        # mask_pwd_required flag. here if condition is to skip second time"},{"line_number":552,"context_line":"        # masking."},{"line_number":553,"context_line":"        if not mask_pwd_required:"},{"line_number":554,"context_line":"            stdout \u003d strutils.mask_password(stdout)"},{"line_number":555,"context_line":"            stderr \u003d strutils.mask_password(stderr)"},{"line_number":556,"context_line":"        if check_exit_code and exit_status !\u003d 0:"},{"line_number":557,"context_line":"            raise ProcessExecutionError(exit_code\u003dexit_status,"},{"line_number":558,"context_line":"                                        stdout\u003dstdout,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa0c359_62b7a088","line":555,"range":{"start_line":550,"start_character":0,"end_line":555,"end_character":51},"updated":"2018-02-05 15:28:42.000000000","message":"Assuming we need this at all, I think it needs to move inside the following if statement, and the comment should be clarified (that we\u0027re doing this in case a command is poorly implemented and prints a password from the cmd in stdout during error cases?)","commit_id":"fcb1fa570fe7ea0764d5868722e435b89e2bad42"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"001892ab2d7019f01d184dc98ec8cab9bc1a9349","unresolved":false,"context_lines":[{"line_number":511,"context_line":"    :param cmd: The command string to run."},{"line_number":512,"context_line":"    :param check_exit_code: If an exception should be raised for non-zero exit."},{"line_number":513,"context_line":"    :param timeout: max time in secs to wait for command execution."},{"line_number":514,"context_line":"    :param sanitize_stdout: Flag to skip sanitization of command output."},{"line_number":515,"context_line":"    :returns: (stdout, stderr) from command execution through SSH."},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    .. versionchanged:: 1.9"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_38f6f964","line":514,"range":{"start_line":514,"start_character":28,"end_line":514,"end_character":72},"updated":"2018-02-12 16:22:54.000000000","message":"indicates whether stdout should be sanitized","commit_id":"f338e209bf31c3dcb46e1e5d61401e88ccaaca4c"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"001892ab2d7019f01d184dc98ec8cab9bc1a9349","unresolved":false,"context_lines":[{"line_number":556,"context_line":"        LOG.debug(\u0027Result was %s\u0027 % exit_status)"},{"line_number":557,"context_line":"        if check_exit_code and exit_status !\u003d 0:"},{"line_number":558,"context_line":"            # In case of errors in command run, due to poor implementation of"},{"line_number":559,"context_line":"            # command executable program, their might be chance that it leaks"},{"line_number":560,"context_line":"            # sensitive information like password to stdout. In such cases"},{"line_number":561,"context_line":"            # stdout needs to be sanitized."},{"line_number":562,"context_line":"            if not sanitize_stdout:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_f8ebb174","line":559,"range":{"start_line":559,"start_character":42,"end_line":559,"end_character":47},"updated":"2018-02-12 16:22:54.000000000","message":"nit: there*","commit_id":"f338e209bf31c3dcb46e1e5d61401e88ccaaca4c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a794f76c1d5b937250df20c8b5e4a2f8492c00b2","unresolved":false,"context_lines":[{"line_number":513,"context_line":"                            exit."},{"line_number":514,"context_line":"    :param timeout:         Max time in secs to wait for command execution."},{"line_number":515,"context_line":"    :param sanitize_stdout: Defaults to True. If set to True, stdout is"},{"line_number":516,"context_line":"                            sanitized."},{"line_number":517,"context_line":"    :returns:               (stdout, stderr) from command execution through"},{"line_number":518,"context_line":"                            SSH."},{"line_number":519,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa0c359_6eb89429","line":516,"updated":"2018-02-19 22:38:24.000000000","message":"What does \"sanitize\" mean, though?","commit_id":"ab3d06b71c7ec542e4021d869238dee07e9c9136"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a794f76c1d5b937250df20c8b5e4a2f8492c00b2","unresolved":false,"context_lines":[{"line_number":562,"context_line":"            # command executable program, there might be chance that it leaks"},{"line_number":563,"context_line":"            # sensitive information like password to stdout. In such cases"},{"line_number":564,"context_line":"            # stdout needs to be sanitized."},{"line_number":565,"context_line":"            if not sanitize_stdout:"},{"line_number":566,"context_line":"                stdout \u003d strutils.mask_password(stdout)"},{"line_number":567,"context_line":"            raise ProcessExecutionError(exit_code\u003dexit_status,"},{"line_number":568,"context_line":"                                        stdout\u003dstdout,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa0c359_8ee1602d","line":565,"updated":"2018-02-19 22:38:24.000000000","message":"Someone reading this comment and this conditional, without pausing to reason about the entire function, would likely come to the conclusion that the test is backwards. It\u0027s not, but that\u0027s because the logic is being clever.\n\nIt would be clearer to save the \"raw\" output to a separate variable before setting stdout on 553. Then here we could always mask that raw output again. It\u0027s a small execution price to pay for improved logic clarity and long-term maintainability.","commit_id":"ab3d06b71c7ec542e4021d869238dee07e9c9136"}],"oslo_concurrency/tests/unit/test_processutils.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"f026f1aabf6ddd0151262cd1eb7948095a390694","unresolved":false,"context_lines":[{"line_number":684,"context_line":"        out, err \u003d processutils.ssh_execute(FakeSshConnection(0), \u0027ls\u0027)"},{"line_number":685,"context_line":"        self.assertEqual(\u0027stdout\u0027, out)"},{"line_number":686,"context_line":"        self.assertEqual(\u0027stderr\u0027, err)"},{"line_number":687,"context_line":"        self.assertIsInstance(out, str)"},{"line_number":688,"context_line":"        self.assertIsInstance(err, str)"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"    def test_binary(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f93b717_03e6d745","line":687,"updated":"2018-01-25 10:15:42.000000000","message":"This looks like an API breakage on python2, because str is also binary data while here we didn\u0027t pass binary\u003dTrue.","commit_id":"e088e6d85224579261f42989598e9a75cf60f589"}]}
