)]}'
{"bin/sbus":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a905392f4d29022f9a6eba606cf25ea9f747f350","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from storlets.sbus.client.cli import main"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":20,"context_line":"    main(sys.argv)"}],"source_content_type":"application/octet-stream","patch_set":41,"id":"7faddb67_210b037d","line":20,"updated":"2019-08-07 02:57:14.000000000","message":"Perhaps we could avoid this file but use just an entry_points on python packaging like https://github.com/openstack/swift/blob/master/setup.cfg#L81-L84\n\nMore details are in https://setuptools.readthedocs.io/en/latest/setuptools.html","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"b70d4a3bebf29d7a52f204a410dfe21c1e1a840e","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from storlets.sbus.client.cli import main"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":20,"context_line":"    main(sys.argv)"}],"source_content_type":"application/octet-stream","patch_set":41,"id":"7faddb67_86a8ca20","line":20,"in_reply_to":"7faddb67_210b037d","updated":"2019-08-07 05:40:58.000000000","message":"As we still have some other scripts in bin, I\u0027ll leave this as it is at the moment.\n\nhttps://github.com/openstack/storlets/blob/master/bin/storlets-daemon\n\nI\u0027ll submit a follow-up patch to migrate all of them to entry_points mechanism.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"dd004d4f362d6c6d24fbc852295d1ef36fb2e3ec","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from storlets.sbus.client.cli import main"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":20,"context_line":"    main(sys.argv)"}],"source_content_type":"application/octet-stream","patch_set":41,"id":"7faddb67_3dd79552","line":20,"in_reply_to":"7faddb67_86a8ca20","updated":"2019-08-08 00:54:42.000000000","message":"OK. Please note that the entry_points can be used if it requires just a main method like this module. if we mangle something in the bin, we still needs to locate bin files.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"}],"devstack/plugin.sh":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a905392f4d29022f9a6eba606cf25ea9f747f350","unresolved":false,"context_lines":[{"line_number":303,"context_line":"    sudo chmod 04755 \"$STORLETS_DOCKER_DEVICE\"/scripts/restart_docker_container"},{"line_number":304,"context_line":"    sudo chown root:root \"$STORLETS_DOCKER_DEVICE\"/scripts/restart_docker_container"},{"line_number":305,"context_line":"    sudo chmod 04755 \"$STORLETS_DOCKER_DEVICE\"/scripts/send_halt_cmd_to_daemon_factory.py"},{"line_number":306,"context_line":"    sudo chown root:root \"$STORLETS_DOCKER_DEVICE\"/scripts/send_halt_cmd_to_daemon_factory.py"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    cd -"},{"line_number":309,"context_line":"}"}],"source_content_type":"text/x-sh","patch_set":41,"id":"7faddb67_81667750","side":"PARENT","line":306,"updated":"2019-08-07 02:57:14.000000000","message":"This is good. More common interface eliminates extra redundant scripts.","commit_id":"dbf7da58b2316c4f2c1a37437c651d2a92626e5a"}],"doc/source/engine_dev_installation.rst":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":330,"context_line":"    cp $HOME/scripts/restart_docker_container ."},{"line_number":331,"context_line":"    sudo chown root:root restart_docker_container"},{"line_number":332,"context_line":"    sudo chmod 04755 restart_docker_container"},{"line_number":333,"context_line":"    cp $HOME/scripts/send_halt_cmd_to_daemon_factory.py ."},{"line_number":334,"context_line":"    sudo chown root:root send_halt_cmd_to_daemon_factory.py"},{"line_number":335,"context_line":"    sudo chmod 04755 send_halt_cmd_to_daemon_factory.py"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"ba5201f7_a45b532d","side":"PARENT","line":333,"updated":"2017-01-04 09:38:13.000000000","message":"Just making sure:\nThis looks like a nice cleanup, that is not directly related to this change - right? Its actually some \u0027garbage\u0027 left from taking out the unusable management code that dealt with updating an account docker container","commit_id":"9d215b3ffc6d40a8411c102a811e44eb262e81de"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":330,"context_line":"    cp $HOME/scripts/restart_docker_container ."},{"line_number":331,"context_line":"    sudo chown root:root restart_docker_container"},{"line_number":332,"context_line":"    sudo chmod 04755 restart_docker_container"},{"line_number":333,"context_line":"    cp $HOME/scripts/send_halt_cmd_to_daemon_factory.py ."},{"line_number":334,"context_line":"    sudo chown root:root send_halt_cmd_to_daemon_factory.py"},{"line_number":335,"context_line":"    sudo chmod 04755 send_halt_cmd_to_daemon_factory.py"},{"line_number":336,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"ba5201f7_f008b12f","side":"PARENT","line":333,"in_reply_to":"ba5201f7_a45b532d","updated":"2017-01-04 12:19:32.000000000","message":"Right. As far as I remember, this script was used in old ansible scripts, and currently is not used.\n\nIn addition, we don\u0027t need this particular implementation, after we include sbus cli.","commit_id":"9d215b3ffc6d40a8411c102a811e44eb262e81de"}],"src/java/SDaemon/src/main/org/openstack/storlet/daemon/SCancelTask.java":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"/*----------------------------------------------------------------------------"},{"line_number":26,"context_line":" * SCancelTask"},{"line_number":27,"context_line":" * "},{"line_number":28,"context_line":" * Instantiate AbstractTask class. SCancelTask objects contain the task-id,"},{"line_number":29,"context_line":" * which could later be used to cancel a running storlet (for instance, if"},{"line_number":30,"context_line":" * a timeout is encountered)"}],"source_content_type":"text/x-java","patch_set":18,"id":"ba5201f7_de7109e2","line":27,"updated":"2017-01-04 09:38:13.000000000","message":"Can you please delete space?","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"/*----------------------------------------------------------------------------"},{"line_number":26,"context_line":" * SCancelTask"},{"line_number":27,"context_line":" * "},{"line_number":28,"context_line":" * Instantiate AbstractTask class. SCancelTask objects contain the task-id,"},{"line_number":29,"context_line":" * which could later be used to cancel a running storlet (for instance, if"},{"line_number":30,"context_line":" * a timeout is encountered)"}],"source_content_type":"text/x-java","patch_set":18,"id":"ba5201f7_3d03ea0e","line":27,"in_reply_to":"ba5201f7_760afa22","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"/*----------------------------------------------------------------------------"},{"line_number":26,"context_line":" * SCancelTask"},{"line_number":27,"context_line":" * "},{"line_number":28,"context_line":" * Instantiate AbstractTask class. SCancelTask objects contain the task-id,"},{"line_number":29,"context_line":" * which could later be used to cancel a running storlet (for instance, if"},{"line_number":30,"context_line":" * a timeout is encountered)"}],"source_content_type":"text/x-java","patch_set":18,"id":"ba5201f7_760afa22","line":27,"in_reply_to":"ba5201f7_de7109e2","updated":"2017-01-04 12:19:32.000000000","message":"Sure. will fix.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        boolean bStatus \u003d true;"},{"line_number":58,"context_line":"        try {"},{"line_number":59,"context_line":"            this.sOut_.write((new String(\"True: OK\")).getBytes());"},{"line_number":60,"context_line":"            this.sOut_.close();"},{"line_number":61,"context_line":"        } catch (IOException e) {"},{"line_number":62,"context_line":"            e.printStackTrace();"},{"line_number":63,"context_line":"            bStatus \u003d false;"}],"source_content_type":"text/x-java","patch_set":18,"id":"ba5201f7_7e4bbd87","line":60,"updated":"2017-01-04 09:38:13.000000000","message":"Ah, good catch!","commit_id":"935564eb3130942fc436e33015438903c02f2afd"}],"src/java/SDaemon/src/main/org/openstack/storlet/daemon/SPingTask.java":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    /*------------------------------------------------------------------------"},{"line_number":43,"context_line":"     * run"},{"line_number":44,"context_line":"     * "},{"line_number":45,"context_line":"     * The actual response on \"ping\" command."},{"line_number":46,"context_line":"     * */"},{"line_number":47,"context_line":"    public boolean run() {"}],"source_content_type":"text/x-java","patch_set":18,"id":"ba5201f7_5e55191b","line":44,"updated":"2017-01-04 09:38:13.000000000","message":"Can we clean?","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    /*------------------------------------------------------------------------"},{"line_number":43,"context_line":"     * run"},{"line_number":44,"context_line":"     * "},{"line_number":45,"context_line":"     * The actual response on \"ping\" command."},{"line_number":46,"context_line":"     * */"},{"line_number":47,"context_line":"    public boolean run() {"}],"source_content_type":"text/x-java","patch_set":18,"id":"ba5201f7_d60f262c","line":44,"in_reply_to":"ba5201f7_5e55191b","updated":"2017-01-04 12:19:32.000000000","message":"will fix","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    /*------------------------------------------------------------------------"},{"line_number":43,"context_line":"     * run"},{"line_number":44,"context_line":"     * "},{"line_number":45,"context_line":"     * The actual response on \"ping\" command."},{"line_number":46,"context_line":"     * */"},{"line_number":47,"context_line":"    public boolean run() {"}],"source_content_type":"text/x-java","patch_set":18,"id":"ba5201f7_eb07df19","line":44,"in_reply_to":"ba5201f7_d60f262c","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"}],"storlets/agent/daemon_factory/manager.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                resp \u003d client.ping()"},{"line_number":221,"context_line":"                if resp.status:"},{"line_number":222,"context_line":"                    return True"},{"line_number":223,"context_line":"            except SBusClientSendError:"},{"line_number":224,"context_line":"                pass"},{"line_number":225,"context_line":"            time.sleep(1)"},{"line_number":226,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_b927ff62","line":223,"updated":"2017-01-04 09:38:13.000000000","message":"Pls see remark in line 445","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                resp \u003d client.ping()"},{"line_number":221,"context_line":"                if resp.status:"},{"line_number":222,"context_line":"                    return True"},{"line_number":223,"context_line":"            except SBusClientSendError:"},{"line_number":224,"context_line":"                pass"},{"line_number":225,"context_line":"            time.sleep(1)"},{"line_number":226,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_f6634ada","line":223,"in_reply_to":"ba5201f7_b927ff62","updated":"2017-01-04 12:19:32.000000000","message":"Basically SBusClientSendError happens when the remote server is not running. In this case, we need to \u0027pass\u0027 the exception because we get this error just after launching the server process.\n\nHowever, when we get SBusClientMalformedRequest here, it is possible that there are some bugs in server side, and we can not expect that the error is fixed by retrying. So we need to think different policy for the remaining exceptions than SBusClientSendError, IMO.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                resp \u003d client.ping()"},{"line_number":221,"context_line":"                if resp.status:"},{"line_number":222,"context_line":"                    return True"},{"line_number":223,"context_line":"            except SBusClientSendError:"},{"line_number":224,"context_line":"                pass"},{"line_number":225,"context_line":"            time.sleep(1)"},{"line_number":226,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_0bbb430f","line":223,"in_reply_to":"ba5201f7_df9f394e","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"efeb44bcb7ee3cef057931272a8c3dc6482b82f4","unresolved":false,"context_lines":[{"line_number":220,"context_line":"                resp \u003d client.ping()"},{"line_number":221,"context_line":"                if resp.status:"},{"line_number":222,"context_line":"                    return True"},{"line_number":223,"context_line":"            except SBusClientSendError:"},{"line_number":224,"context_line":"                pass"},{"line_number":225,"context_line":"            time.sleep(1)"},{"line_number":226,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_df9f394e","line":223,"in_reply_to":"ba5201f7_f6634ada","updated":"2017-01-04 13:22:07.000000000","message":"Gotcha, agree.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                raise SDaemonError("},{"line_number":443,"context_line":"                    \u0027Failed to send halt to {0}\u0027.format(storlet_name))"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"        except SBusClientSendError:"},{"line_number":446,"context_line":"            self.logger.exception(\u0027Failed to send sbus command\u0027)"},{"line_number":447,"context_line":"            raise SDaemonError("},{"line_number":448,"context_line":"                \u0027Failed to send halt to {0}\u0027.format(storlet_name))"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_19f64bd7","line":445,"updated":"2017-01-04 09:38:13.000000000","message":"Should we also account here for SBusClientMalformedResponse? Perhaps replace SBusClientSendError with SBusClientException?","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                raise SDaemonError("},{"line_number":443,"context_line":"                    \u0027Failed to send halt to {0}\u0027.format(storlet_name))"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"        except SBusClientSendError:"},{"line_number":446,"context_line":"            self.logger.exception(\u0027Failed to send sbus command\u0027)"},{"line_number":447,"context_line":"            raise SDaemonError("},{"line_number":448,"context_line":"                \u0027Failed to send halt to {0}\u0027.format(storlet_name))"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_f6350ada","line":445,"in_reply_to":"ba5201f7_19f64bd7","updated":"2017-01-04 12:19:32.000000000","message":"will fix.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                raise SDaemonError("},{"line_number":443,"context_line":"                    \u0027Failed to send halt to {0}\u0027.format(storlet_name))"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"        except SBusClientSendError:"},{"line_number":446,"context_line":"            self.logger.exception(\u0027Failed to send sbus command\u0027)"},{"line_number":447,"context_line":"            raise SDaemonError("},{"line_number":448,"context_line":"                \u0027Failed to send halt to {0}\u0027.format(storlet_name))"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_2b3807a0","line":445,"in_reply_to":"ba5201f7_f6350ada","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"}],"storlets/agent/daemon_factory/server.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a905392f4d29022f9a6eba606cf25ea9f747f350","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        for i in range(self.NUM_OF_TRIES_PINGING_STARTING_DAEMON):"},{"line_number":192,"context_line":"            try:"},{"line_number":193,"context_line":"                resp \u003d client.ping()"},{"line_number":194,"context_line":"                if resp.status:"},{"line_number":195,"context_line":"                    return True"},{"line_number":196,"context_line":"            except SBusClientSendError:"},{"line_number":197,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_01d7e7c0","line":194,"updated":"2019-08-07 02:57:14.000000000","message":"Not sure if we should not the status code here?\n\nOriginal code checks it\u0027s true but this checks only the status variable.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"b70d4a3bebf29d7a52f204a410dfe21c1e1a840e","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        for i in range(self.NUM_OF_TRIES_PINGING_STARTING_DAEMON):"},{"line_number":192,"context_line":"            try:"},{"line_number":193,"context_line":"                resp \u003d client.ping()"},{"line_number":194,"context_line":"                if resp.status:"},{"line_number":195,"context_line":"                    return True"},{"line_number":196,"context_line":"            except SBusClientSendError:"},{"line_number":197,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_66c90e24","line":194,"in_reply_to":"7faddb67_01d7e7c0","updated":"2019-08-07 05:40:58.000000000","message":"In short, we are doing the same thing.\n\nCurrently we get response from sbus server in the following format.\n \u0027True: Everything OK\u0027\n \u0027False: Something wrong\u0027\n\nIn previous code, we read the beginning of the response.\nIn current code, we parse the whole response, with splitting status and the message by \u0027:\u0027 and check the status field here.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"dd004d4f362d6c6d24fbc852295d1ef36fb2e3ec","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        for i in range(self.NUM_OF_TRIES_PINGING_STARTING_DAEMON):"},{"line_number":192,"context_line":"            try:"},{"line_number":193,"context_line":"                resp \u003d client.ping()"},{"line_number":194,"context_line":"                if resp.status:"},{"line_number":195,"context_line":"                    return True"},{"line_number":196,"context_line":"            except SBusClientSendError:"},{"line_number":197,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_fde01d29","line":194,"in_reply_to":"7faddb67_66c90e24","updated":"2019-08-08 00:54:42.000000000","message":"Alright. that\u0027s what we discussed in another place.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"}],"storlets/gateway/gateways/docker/runtime.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                self.logger.error(\u0027Failed to ping to daemon factory: %s\u0027 %"},{"line_number":272,"context_line":"                                  resp.message)"},{"line_number":273,"context_line":"                return 0"},{"line_number":274,"context_line":"        except SBusClientSendError:"},{"line_number":275,"context_line":"            return -1"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def wait(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_79903744","line":274,"updated":"2017-01-04 09:38:13.000000000","message":"See manager.py L445 remark","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                self.logger.error(\u0027Failed to ping to daemon factory: %s\u0027 %"},{"line_number":272,"context_line":"                                  resp.message)"},{"line_number":273,"context_line":"                return 0"},{"line_number":274,"context_line":"        except SBusClientSendError:"},{"line_number":275,"context_line":"            return -1"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def wait(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_8b5c93ee","line":274,"in_reply_to":"ba5201f7_79903744","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":363,"context_line":"                self.logger.error(\u0027Failed to start storlet daemon: %s\u0027 %"},{"line_number":364,"context_line":"                                  resp.message)"},{"line_number":365,"context_line":"                return 0"},{"line_number":366,"context_line":"        except SBusClientSendError:"},{"line_number":367,"context_line":"            return -1"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"    def stop_storlet_daemon(self, storlet_id):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_4b61da38","line":366,"updated":"2017-01-04 09:38:13.000000000","message":"ditto","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":363,"context_line":"                self.logger.error(\u0027Failed to start storlet daemon: %s\u0027 %"},{"line_number":364,"context_line":"                                  resp.message)"},{"line_number":365,"context_line":"                return 0"},{"line_number":366,"context_line":"        except SBusClientSendError:"},{"line_number":367,"context_line":"            return -1"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"    def stop_storlet_daemon(self, storlet_id):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_ab73177f","line":366,"in_reply_to":"ba5201f7_4b61da38","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                self.logger.error(\u0027Failed to stop storlet daemon: %s\u0027 %"},{"line_number":381,"context_line":"                                  resp.message)"},{"line_number":382,"context_line":"                return 0"},{"line_number":383,"context_line":"        except SBusClientSendError:"},{"line_number":384,"context_line":"            return -1"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def get_storlet_daemon_status(self, storlet_id):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_2ec5845a","line":383,"updated":"2017-01-04 09:38:13.000000000","message":"ditto","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                self.logger.error(\u0027Failed to stop storlet daemon: %s\u0027 %"},{"line_number":381,"context_line":"                                  resp.message)"},{"line_number":382,"context_line":"                return 0"},{"line_number":383,"context_line":"        except SBusClientSendError:"},{"line_number":384,"context_line":"            return -1"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def get_storlet_daemon_status(self, storlet_id):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_cb6e9b95","line":383,"in_reply_to":"ba5201f7_2ec5845a","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                self.logger.error(\u0027Failed to get status about storlet \u0027"},{"line_number":398,"context_line":"                                  \u0027daemon: %s\u0027 % resp.message)"},{"line_number":399,"context_line":"                return 0"},{"line_number":400,"context_line":"        except SBusClientSendError:"},{"line_number":401,"context_line":"            return -1"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def _get_storlet_classpath(self, storlet_main, storlet_id, dependencies):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_6ea5ccb3","line":400,"updated":"2017-01-04 09:38:13.000000000","message":"ditto","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                self.logger.error(\u0027Failed to get status about storlet \u0027"},{"line_number":398,"context_line":"                                  \u0027daemon: %s\u0027 % resp.message)"},{"line_number":399,"context_line":"                return 0"},{"line_number":400,"context_line":"        except SBusClientSendError:"},{"line_number":401,"context_line":"            return -1"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"    def _get_storlet_classpath(self, storlet_main, storlet_id, dependencies):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_eb6d1f99","line":400,"in_reply_to":"ba5201f7_6ea5ccb3","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":658,"context_line":"            resp \u003d client.cancel(self.task_id)"},{"line_number":659,"context_line":"            if not resp.status:"},{"line_number":660,"context_line":"                raise StorletRuntimeException(\u0027Failed to cancel task\u0027)"},{"line_number":661,"context_line":"        except SBusClientSendError:"},{"line_number":662,"context_line":"            raise StorletRuntimeException(\u0027Failed to cancel task\u0027)"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    def _invoke(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_6e930c50","line":661,"updated":"2017-01-04 09:38:13.000000000","message":"ditto","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":658,"context_line":"            resp \u003d client.cancel(self.task_id)"},{"line_number":659,"context_line":"            if not resp.status:"},{"line_number":660,"context_line":"                raise StorletRuntimeException(\u0027Failed to cancel task\u0027)"},{"line_number":661,"context_line":"        except SBusClientSendError:"},{"line_number":662,"context_line":"            raise StorletRuntimeException(\u0027Failed to cancel task\u0027)"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":"    def _invoke(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_0b69838b","line":661,"in_reply_to":"ba5201f7_6e930c50","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"}],"storlets/sbus/client/__init__.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.message \u003d message"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class SBusClient(object):"},{"line_number":33,"context_line":"    def __init__(self, socket_path):"},{"line_number":34,"context_line":"        self.socket_path \u003d socket_path"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_3efe9537","line":32,"updated":"2017-01-04 09:38:13.000000000","message":"I wonder if we should split this to:\nSBusClient:\n_parse_response\n_request\n\nSBusDaemonClient(SBusClient)\nping\nexecute\nhalt\ncancel\n\nSBusDaemonFactoryClient(SBusClient)\nping (?)\nstart_daemon\nstop_daemon\nstop_daemons\ndaemon_status\n\nWhile this is a semantic change, I think it will make the code more readable and allow to better understand the context when debugging.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.message \u003d message"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class SBusClient(object):"},{"line_number":33,"context_line":"    def __init__(self, socket_path):"},{"line_number":34,"context_line":"        self.socket_path \u003d socket_path"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_f6ab4a1b","line":32,"in_reply_to":"ba5201f7_3efe9537","updated":"2017-01-04 12:19:32.000000000","message":"IMO sbus client should care only about sbus protocol itself, and should not care about the server to communicate.\n\nIn this point, it seems reasonable to me to implement all command types, which are defined as a part of sbus protocol (they are defined under storlets.sbus), and do not depends on the individual services run depending on the protocol.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"efeb44bcb7ee3cef057931272a8c3dc6482b82f4","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self.message \u003d message"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class SBusClient(object):"},{"line_number":33,"context_line":"    def __init__(self, socket_path):"},{"line_number":34,"context_line":"        self.socket_path \u003d socket_path"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_3f2cc501","line":32,"in_reply_to":"ba5201f7_f6ab4a1b","updated":"2017-01-04 13:22:07.000000000","message":"Sure, that\u0027s fine! Just wanted to bring up the option...","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _request(self, command, params\u003dNone, task_id\u003dNone):"},{"line_number":51,"context_line":"        read_fd, write_fd \u003d os.pipe()"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            try:"},{"line_number":54,"context_line":"                datagram \u003d SBusServiceDatagram("},{"line_number":55,"context_line":"                    command, [write_fd],"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_7ebd7d67","line":52,"updated":"2017-01-04 09:38:13.000000000","message":"Curious to know why didn\u0027t you use @contextmanager as you did in the previous implementation in runtime.py. Was it buggy?","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _request(self, command, params\u003dNone, task_id\u003dNone):"},{"line_number":51,"context_line":"        read_fd, write_fd \u003d os.pipe()"},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            try:"},{"line_number":54,"context_line":"                datagram \u003d SBusServiceDatagram("},{"line_number":55,"context_line":"                    command, [write_fd],"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_d621e6b5","line":52,"in_reply_to":"ba5201f7_7ebd7d67","updated":"2017-01-04 12:19:32.000000000","message":"IMO the previous implementation with contextmanager is not the best way because we can not close whole of the temporal resources (I mean, both of the read fd and write fd) in the one place. While we can let contextmanager care about the one fd, but also we need to close the other fd by ourselves.\n\nThe reason why I explicitly create independent try-finally block in this patch is that I would like to make it clear when to close each fds.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            reply \u003d \u0027\u0027"},{"line_number":69,"context_line":"            while True:"},{"line_number":70,"context_line":"                buf \u003d os.read(read_fd, 10)"},{"line_number":71,"context_line":"                if not buf:"},{"line_number":72,"context_line":"                    break"},{"line_number":73,"context_line":"                reply \u003d reply + buf"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_b9de1f3d","line":70,"updated":"2017-01-04 09:38:13.000000000","message":"I know this was not dealt with in the original code, but do we also need to place the read in a try-except clause raising SBusClientException on error?","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            reply \u003d \u0027\u0027"},{"line_number":69,"context_line":"            while True:"},{"line_number":70,"context_line":"                buf \u003d os.read(read_fd, 10)"},{"line_number":71,"context_line":"                if not buf:"},{"line_number":72,"context_line":"                    break"},{"line_number":73,"context_line":"                reply \u003d reply + buf"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_ab21574f","line":70,"in_reply_to":"ba5201f7_b9de1f3d","updated":"2017-01-04 15:10:36.000000000","message":"Done","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            reply \u003d \u0027\u0027"},{"line_number":69,"context_line":"            while True:"},{"line_number":70,"context_line":"                buf \u003d os.read(read_fd, 10)"},{"line_number":71,"context_line":"                if not buf:"},{"line_number":72,"context_line":"                    break"},{"line_number":73,"context_line":"                reply \u003d reply + buf"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_b6c5428f","line":70,"in_reply_to":"ba5201f7_b9de1f3d","updated":"2017-01-04 12:19:32.000000000","message":"This is surely needed. will fix","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a905392f4d29022f9a6eba606cf25ea9f747f350","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class SBusResponse(object):"},{"line_number":27,"context_line":"    def __init__(self, status, message):"},{"line_number":28,"context_line":"        self.status \u003d status"},{"line_number":29,"context_line":"        self.message \u003d message"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_e1772bd3","line":27,"updated":"2019-08-07 02:57:14.000000000","message":"At least, we should add docs for the args, what\u0027s expected type.\n\nOr check the status in this method.\n\nProbably, calling swift.common.utils.config_true_value will help us to ensure the value. and also change the name from \"status\" to \"success\" or something because status seems like more generic (e.g. status code, not just a bool) .","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"b70d4a3bebf29d7a52f204a410dfe21c1e1a840e","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class SBusResponse(object):"},{"line_number":27,"context_line":"    def __init__(self, status, message):"},{"line_number":28,"context_line":"        self.status \u003d status"},{"line_number":29,"context_line":"        self.message \u003d message"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_a6de26d8","line":27,"in_reply_to":"7faddb67_e1772bd3","updated":"2019-08-07 05:40:58.000000000","message":"Done","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a905392f4d29022f9a6eba606cf25ea9f747f350","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        two_tokens \u003d str_response.split(\u0027:\u0027, 1)"},{"line_number":45,"context_line":"        if len(two_tokens) !\u003d 2:"},{"line_number":46,"context_line":"            raise SBusClientMalformedResponse(\u0027Got malformed answer\u0027)"},{"line_number":47,"context_line":"        status \u003d (two_tokens[0].lower() \u003d\u003d \u0027true\u0027)"},{"line_number":48,"context_line":"        message \u003d two_tokens[1]"},{"line_number":49,"context_line":"        return SBusResponse(status, message)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_81c2f7e7","line":46,"range":{"start_line":46,"start_character":61,"end_line":46,"end_character":67},"updated":"2019-08-07 02:57:14.000000000","message":"nits) response, to be fixed with the error class.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"b70d4a3bebf29d7a52f204a410dfe21c1e1a840e","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\""},{"line_number":44,"context_line":"        two_tokens \u003d str_response.split(\u0027:\u0027, 1)"},{"line_number":45,"context_line":"        if len(two_tokens) !\u003d 2:"},{"line_number":46,"context_line":"            raise SBusClientMalformedResponse(\u0027Got malformed answer\u0027)"},{"line_number":47,"context_line":"        status \u003d (two_tokens[0].lower() \u003d\u003d \u0027true\u0027)"},{"line_number":48,"context_line":"        message \u003d two_tokens[1]"},{"line_number":49,"context_line":"        return SBusResponse(status, message)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_66f26e72","line":46,"range":{"start_line":46,"start_character":61,"end_line":46,"end_character":67},"in_reply_to":"7faddb67_81c2f7e7","updated":"2019-08-07 05:40:58.000000000","message":"Done","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a905392f4d29022f9a6eba606cf25ea9f747f350","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        two_tokens \u003d str_response.split(\u0027:\u0027, 1)"},{"line_number":45,"context_line":"        if len(two_tokens) !\u003d 2:"},{"line_number":46,"context_line":"            raise SBusClientMalformedResponse(\u0027Got malformed answer\u0027)"},{"line_number":47,"context_line":"        status \u003d (two_tokens[0].lower() \u003d\u003d \u0027true\u0027)"},{"line_number":48,"context_line":"        message \u003d two_tokens[1]"},{"line_number":49,"context_line":"        return SBusResponse(status, message)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_01ae072d","line":47,"updated":"2019-08-07 02:57:14.000000000","message":"Okay. this means status should be bool but the SBusResponse class doesn\u0027t ensure the type. hmm.... it seems brittle a bit to me.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"b70d4a3bebf29d7a52f204a410dfe21c1e1a840e","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        two_tokens \u003d str_response.split(\u0027:\u0027, 1)"},{"line_number":45,"context_line":"        if len(two_tokens) !\u003d 2:"},{"line_number":46,"context_line":"            raise SBusClientMalformedResponse(\u0027Got malformed answer\u0027)"},{"line_number":47,"context_line":"        status \u003d (two_tokens[0].lower() \u003d\u003d \u0027true\u0027)"},{"line_number":48,"context_line":"        message \u003d two_tokens[1]"},{"line_number":49,"context_line":"        return SBusResponse(status, message)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_06e7faae","line":47,"in_reply_to":"7faddb67_01ae072d","updated":"2019-08-07 05:40:58.000000000","message":"I know what you mean, but I think it is not useful to implement strict type checking in python.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"}],"storlets/sbus/client/cli.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"def main(argv):"},{"line_number":25,"context_line":"    # TODO(takashi): Add more detailed help message"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    if len(argv) \u003c 3:"},{"line_number":28,"context_line":"        print(\u0027sbus \u003ccommand\u003e \u003cpipe_path\u003e\u0027)"},{"line_number":29,"context_line":"        exit(EXIT_ERROR)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_6ef22c71","line":27,"updated":"2017-01-04 09:38:13.000000000","message":"If we are to break the client to daemon and daemon_factory clients then this should probably change...\nWe could deduce it from the pipe_path although it seems \"hacky\"","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    except (AttributeError, NotImplementedError):"},{"line_number":47,"context_line":"        print(\u0027ERROR: Command %s is not supported\u0027 % command)"},{"line_number":48,"context_line":"        exit(EXIT_ERROR)"},{"line_number":49,"context_line":"    except SBusClientSendError:"},{"line_number":50,"context_line":"        print(\u0027ERROR: Failed to send sbus command %s to %s\u0027"},{"line_number":51,"context_line":"              % (command, pipe_path))"},{"line_number":52,"context_line":"        exit(EXIT_ERROR)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_4e9648f1","line":49,"updated":"2017-01-04 09:38:13.000000000","message":"SBusClientMalformedResponse(?)","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    except (AttributeError, NotImplementedError):"},{"line_number":47,"context_line":"        print(\u0027ERROR: Command %s is not supported\u0027 % command)"},{"line_number":48,"context_line":"        exit(EXIT_ERROR)"},{"line_number":49,"context_line":"    except SBusClientSendError:"},{"line_number":50,"context_line":"        print(\u0027ERROR: Failed to send sbus command %s to %s\u0027"},{"line_number":51,"context_line":"              % (command, pipe_path))"},{"line_number":52,"context_line":"        exit(EXIT_ERROR)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_d93679e6","line":49,"in_reply_to":"ba5201f7_4e9648f1","updated":"2017-01-04 12:19:32.000000000","message":"will fix","commit_id":"935564eb3130942fc436e33015438903c02f2afd"}],"tests/unit/agent/daemon_factory/test_manager.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self.assertTrue(resp.iterable)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"class TestStorletDaemonFactory(unittest.TestCase):"},{"line_number":72,"context_line":"    base_path \u003d \u0027storlets.agent.daemon_factory.manager\u0027"},{"line_number":73,"context_line":"    kill_path \u003d base_path + \u0027.os.kill\u0027"},{"line_number":74,"context_line":"    waitpid_path \u003d base_path + \u0027.os.waitpid\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_e13b8d36","line":71,"updated":"2017-01-04 09:38:13.000000000","message":"Gotcha, so the lower level functions (send, read) are now dealt in SBusClient and so we do not need to mock them here. Even the test code gets cleaner!\nNice! :-)","commit_id":"935564eb3130942fc436e33015438903c02f2afd"}],"tests/unit/gateway/gateways/docker/test_runtime.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        with mock.patch(\u0027storlets.gateway.gateways.docker.runtime.\u0027"},{"line_number":301,"context_line":"                        \u0027SBusClient.ping\u0027) as ping:"},{"line_number":302,"context_line":"            ping.side_effect \u003d SBusClientSendError()"},{"line_number":303,"context_line":"            self.assertEqual(self.sbox.ping(), -1)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def test_wait(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_8121e1a1","line":302,"updated":"2017-01-04 09:38:13.000000000","message":"Can we add a similar test where the side_effect is SBusClientMalformedResponse? Also, if we end up dealing with os.read error handling we should probably account for that too...","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3a5f9758e85b59157ef963e557910f943ed678ff","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        with mock.patch(\u0027storlets.gateway.gateways.docker.runtime.\u0027"},{"line_number":301,"context_line":"                        \u0027SBusClient.ping\u0027) as ping:"},{"line_number":302,"context_line":"            ping.side_effect \u003d SBusClientSendError()"},{"line_number":303,"context_line":"            self.assertEqual(self.sbox.ping(), -1)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def test_wait(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_995b112e","line":302,"in_reply_to":"ba5201f7_8121e1a1","updated":"2017-01-04 12:19:32.000000000","message":"will fix","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                mock.patch(\u0027os.close\u0027) as mock_close:"},{"line_number":468,"context_line":"            mock_fdopen.return_value \u003d mock_writer"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"            # writer context doesn\u0027t suppress any exception"},{"line_number":471,"context_line":"            with self.assertRaises(exception_cls):"},{"line_number":472,"context_line":"                with self.protocol._open_writer(1):"},{"line_number":473,"context_line":"                    raise exception_cls()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_e4c63b48","line":470,"updated":"2017-01-04 09:38:13.000000000","message":"I understand that this is just a semantic change to make the code nicer, but I trying to understand the test:\nAre you trying to make sure that for the following exceptions we do not get os.closed to be called, but rather writer.close?\nStorletTimeout\nIOError\nException\n\nThanks,\nEran","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":467,"context_line":"                mock.patch(\u0027os.close\u0027) as mock_close:"},{"line_number":468,"context_line":"            mock_fdopen.return_value \u003d mock_writer"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"            # writer context doesn\u0027t suppress any exception"},{"line_number":471,"context_line":"            with self.assertRaises(exception_cls):"},{"line_number":472,"context_line":"                with self.protocol._open_writer(1):"},{"line_number":473,"context_line":"                    raise exception_cls()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_6b9a0f65","line":470,"in_reply_to":"ba5201f7_e4c63b48","updated":"2017-01-04 15:10:36.000000000","message":"You are right. I\u0027ll add some more comments to describe this.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"}],"tests/unit/sbus/client/test_client.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"a317f6ebaa5bdda4f8b7d7a2c50ae0a18613393b","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        yield pipes"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"class TestSBusClient(unittest.TestCase):"},{"line_number":77,"context_line":"    def setUp(self):"},{"line_number":78,"context_line":"        self.pipe_path \u003d \u0027pipe_path\u0027"},{"line_number":79,"context_line":"        self.client \u003d SBusClient(self.pipe_path)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_01833199","line":76,"updated":"2017-01-04 09:38:13.000000000","message":"Once stabilised in terms of error handling would be nice to add a test for _request with failures in:\nSbus.send\nos.read\n_parse_response","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"5f2a2e847c99e4f4d50171bdf943ddccd5085b15","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        yield pipes"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"class TestSBusClient(unittest.TestCase):"},{"line_number":77,"context_line":"    def setUp(self):"},{"line_number":78,"context_line":"        self.pipe_path \u003d \u0027pipe_path\u0027"},{"line_number":79,"context_line":"        self.client \u003d SBusClient(self.pipe_path)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba5201f7_ab0dd73f","line":76,"in_reply_to":"ba5201f7_01833199","updated":"2017-01-04 15:10:36.000000000","message":"Currently failures in SBus.send and _parse_response are tested in test_ping. While I still need to find some tricks around Datagram handling to test _request handling, now we have minimum test cases, I think.\n\nTo test failure in os.read, I need some improvements about mocking, so will do that as follow-up.","commit_id":"935564eb3130942fc436e33015438903c02f2afd"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"615a82ebaf494971f1ce5b7ed90f964973ac8fbc","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            raise AssertionError(\u0027pipe called more than expected\u0027)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    with mock.patch(\u0027storlets.sbus.client.os.pipe\u0027, mock_os_pipe), \\"},{"line_number":68,"context_line":"            mock.patch(\u0027storlets.sbus.client.os.read\u0027, fake_os_read),\\"},{"line_number":69,"context_line":"            mock.patch(\u0027storlets.sbus.client.os.close\u0027, fake_os_close):"},{"line_number":70,"context_line":"        yield pipes"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"7faddb67_e2b2ede4","line":68,"updated":"2019-08-05 15:26:00.000000000","message":"need space here?","commit_id":"3d8b367bbaf70d5ba6733c45b1c422b19d55754e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3421eafd8c7ae69564a5b50436af1496e77a664f","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            raise AssertionError(\u0027pipe called more than expected\u0027)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    with mock.patch(\u0027storlets.sbus.client.os.pipe\u0027, mock_os_pipe), \\"},{"line_number":68,"context_line":"            mock.patch(\u0027storlets.sbus.client.os.read\u0027, fake_os_read),\\"},{"line_number":69,"context_line":"            mock.patch(\u0027storlets.sbus.client.os.close\u0027, fake_os_close):"},{"line_number":70,"context_line":"        yield pipes"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"7faddb67_71d7a6c0","line":68,"in_reply_to":"7faddb67_e2b2ede4","updated":"2019-08-06 00:57:19.000000000","message":"Done","commit_id":"3d8b367bbaf70d5ba6733c45b1c422b19d55754e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"615a82ebaf494971f1ce5b7ed90f964973ac8fbc","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        with self.assertRaises(SBusClientMalformedResponse):"},{"line_number":92,"context_line":"            resp \u003d self.client._parse_response(\u0027Foo\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _check_all_pipese_closed(self, pipes):"},{"line_number":95,"context_line":"        for _pipe in pipes:"},{"line_number":96,"context_line":"            self.assertTrue(_pipe[0].closed)"},{"line_number":97,"context_line":"            self.assertTrue(_pipe[1].closed)"}],"source_content_type":"text/x-python","patch_set":39,"id":"7faddb67_c2afb17a","line":94,"range":{"start_line":94,"start_character":19,"end_line":94,"end_character":25},"updated":"2019-08-05 15:26:00.000000000","message":"typo: pipes","commit_id":"3d8b367bbaf70d5ba6733c45b1c422b19d55754e"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3421eafd8c7ae69564a5b50436af1496e77a664f","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        with self.assertRaises(SBusClientMalformedResponse):"},{"line_number":92,"context_line":"            resp \u003d self.client._parse_response(\u0027Foo\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _check_all_pipese_closed(self, pipes):"},{"line_number":95,"context_line":"        for _pipe in pipes:"},{"line_number":96,"context_line":"            self.assertTrue(_pipe[0].closed)"},{"line_number":97,"context_line":"            self.assertTrue(_pipe[1].closed)"}],"source_content_type":"text/x-python","patch_set":39,"id":"7faddb67_11e2f2a0","line":94,"range":{"start_line":94,"start_character":19,"end_line":94,"end_character":25},"in_reply_to":"7faddb67_c2afb17a","updated":"2019-08-06 00:57:19.000000000","message":"Done","commit_id":"3d8b367bbaf70d5ba6733c45b1c422b19d55754e"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a905392f4d29022f9a6eba606cf25ea9f747f350","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        with self.assertRaises(SBusClientMalformedResponse):"},{"line_number":92,"context_line":"            resp \u003d self.client._parse_response(\u0027Foo\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _check_all_pipes_closed(self, pipes):"},{"line_number":95,"context_line":"        for _pipe in pipes:"},{"line_number":96,"context_line":"            self.assertTrue(_pipe[0].closed)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_3cdd6c40","line":93,"updated":"2019-08-07 02:57:14.000000000","message":"e.g. what\u0027s happen when returning \"True: NG\"?","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"b70d4a3bebf29d7a52f204a410dfe21c1e1a840e","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        with self.assertRaises(SBusClientMalformedResponse):"},{"line_number":92,"context_line":"            resp \u003d self.client._parse_response(\u0027Foo\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _check_all_pipes_closed(self, pipes):"},{"line_number":95,"context_line":"        for _pipe in pipes:"},{"line_number":96,"context_line":"            self.assertTrue(_pipe[0].closed)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_26ec768e","line":93,"in_reply_to":"7faddb67_3cdd6c40","updated":"2019-08-07 05:40:58.000000000","message":"It is regarded as a success response with message saying \"NG\".","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a905392f4d29022f9a6eba606cf25ea9f747f350","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        with self.assertRaises(SBusClientMalformedResponse):"},{"line_number":92,"context_line":"            resp \u003d self.client._parse_response(\u0027Foo\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _check_all_pipes_closed(self, pipes):"},{"line_number":95,"context_line":"        for _pipe in pipes:"},{"line_number":96,"context_line":"            self.assertTrue(_pipe[0].closed)"},{"line_number":97,"context_line":"            self.assertTrue(_pipe[1].closed)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_7cc0c450","line":94,"updated":"2019-08-07 02:57:14.000000000","message":"let us to add one more assertion for number of pipes like\n\n self.assertEqual(len(pipes), 2)\n\n\nOtherwise, following for loop might do nothing.","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"b70d4a3bebf29d7a52f204a410dfe21c1e1a840e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        with self.assertRaises(SBusClientMalformedResponse):"},{"line_number":92,"context_line":"            resp \u003d self.client._parse_response(\u0027Foo\u0027)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _check_all_pipes_closed(self, pipes):"},{"line_number":95,"context_line":"        for _pipe in pipes:"},{"line_number":96,"context_line":"            self.assertTrue(_pipe[0].closed)"},{"line_number":97,"context_line":"            self.assertTrue(_pipe[1].closed)"}],"source_content_type":"text/x-python","patch_set":41,"id":"7faddb67_26ba366e","line":94,"in_reply_to":"7faddb67_7cc0c450","updated":"2019-08-07 05:40:58.000000000","message":"Done","commit_id":"d98afcfc4b03c118ebcaf57979dbd572ea88fdb0"}]}
