)]}'
{"storlets/agent/common/manager.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return func"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SBusDaemon(object):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self, sbus_path, logger):"},{"line_number":33,"context_line":"        self.sbus_path \u003d sbus_path"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_236e8a96","line":30,"updated":"2017-01-16 03:00:25.000000000","message":"Actually, I don\u0027t like this kind of sketchy abstraction.\n\nThat is because this class implements only a part of methods called in the methods. (not all, e.g. dispatch_command doesn\u0027t exist) And no information like \"this cannot work independently, just a definition for interface\". On the other hand, a method, _terminate, looks to address for just do nothing to avoid AttributionError.\n\nIf we want to define the interface, something like \"BaseSBusDaemonInterface\" or \"BaseSBusDaemon\" with description, \"this is not designed to use independently\".\n\nAnd I\u0027m realizing to wonder the good name for this one because the class *really* address whole things for SBus? Or just supporting the feature for daemonizing? That is why I said this one as sketchy.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3717b3c940a8383d96878a3b35684c92430bdcea","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    return func"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class SBusDaemon(object):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self, sbus_path, logger):"},{"line_number":33,"context_line":"        self.sbus_path \u003d sbus_path"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_bb5e22e7","line":30,"in_reply_to":"7a3c09a3_236e8a96","updated":"2017-01-16 05:20:51.000000000","message":"\u003e That is because this class implements only a part of methods called in the methods. (not all, e.g. dispatch_command doesn\u0027t exist)\n\nI know that I need to implement more method like dispatch_command or each command handlers like ping, but I\u0027d like leave these items now because it takes some more time to solve interface difference between StorletDaemon and StorletDaemonFactory.\n\n\u003e And no information like \"this cannot work independently, just a definition for interface\".\n\nI think I should rename this class to Base*** to show this is a base class definition, which is the ordinal way in Python (ex. BaseHttpServer)\n\n\u003e On the other hand, a method, _terminate, looks to address for just do nothing to avoid AttributionError.\n\nWe don\u0027t need to implement _terminate for all cases (ex. We have nothing to do in _terminate in StorletDaemonFactory), and that is why I just \u0027pass\u0027 in _terminate.\nOf cause, for the functions we expect individual implementations for child classes, we should do something like raising NotImplementedError.\n\n\u003e If we want to define the interface, something like \"BaseSBusDaemonInterface\" or \"BaseSBusDaemon\" with description, \"this is not designed to use independently\".\n\nThis sounds very reasonable to me. will fix!\n\n\u003e And I\u0027m realizing to wonder the good name for this one because the class *really* address whole things for SBus? Or just supporting the feature for daemonizing? That is why I said this one as sketchy.\n\nHow about BaseSBusServer, as it provides basic server implementation which execute callback functions listening on SBus.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_handler(self, command):"},{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        Decide handler function correspoiding to the recieved command"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        :param command: command"},{"line_number":41,"context_line":"        :returns: handler function"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_6347b24b","line":38,"range":{"start_line":38,"start_character":32,"end_line":38,"end_character":45},"updated":"2017-01-16 03:00:25.000000000","message":"corresponding","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3717b3c940a8383d96878a3b35684c92430bdcea","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_handler(self, command):"},{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        Decide handler function correspoiding to the recieved command"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        :param command: command"},{"line_number":41,"context_line":"        :returns: handler function"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_db776e9d","line":38,"range":{"start_line":38,"start_character":32,"end_line":38,"end_character":45},"in_reply_to":"7a3c09a3_6347b24b","updated":"2017-01-16 05:20:51.000000000","message":"will fix","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4289eb8e7a09c269ca8be48a237f4a5b13bdb823","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_handler(self, command):"},{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        Decide handler function correspoiding to the recieved command"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        :param command: command"},{"line_number":41,"context_line":"        :returns: handler function"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a3905b3_5d986cc0","line":38,"range":{"start_line":38,"start_character":32,"end_line":38,"end_character":45},"in_reply_to":"7a3c09a3_db776e9d","updated":"2017-01-23 16:26:21.000000000","message":"Done","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        Main loop to run storlet application"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        sbus \u003d SBus()"},{"line_number":61,"context_line":"        fd \u003d sbus.create(self.sbus_path)"},{"line_number":62,"context_line":"        if fd \u003c 0:"},{"line_number":63,"context_line":"            self.logger.error(\"Failed to create SBus. exiting.\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_436d5697","line":60,"updated":"2017-01-16 03:00:25.000000000","message":"Perhaps, all we need in this class should be initialized at __init__ to be robust.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3717b3c940a8383d96878a3b35684c92430bdcea","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":"        Main loop to run storlet application"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        sbus \u003d SBus()"},{"line_number":61,"context_line":"        fd \u003d sbus.create(self.sbus_path)"},{"line_number":62,"context_line":"        if fd \u003c 0:"},{"line_number":63,"context_line":"            self.logger.error(\"Failed to create SBus. exiting.\")"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_1b72d6ad","line":60,"in_reply_to":"7a3c09a3_436d5697","updated":"2017-01-16 05:20:51.000000000","message":"Personally, I don\u0027t like to move all things which can cause Exception in __init__, because it requires mocking so much time, when we test that class.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"}],"storlets/agent/common/server.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"43cb821efd737bb67944eee4ee1afd988e84dd7c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        self.status \u003d status"},{"line_number":39,"context_line":"        self.message \u003d message"},{"line_number":40,"context_line":"        self.iterable \u003d iterable"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @property"},{"line_number":43,"context_line":"    def report_message(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_03f7608b","line":40,"updated":"2017-01-31 06:31:50.000000000","message":"I know this isn\u0027t new, but I find the name iterable confusing.\nLet\u0027s not change it (as it is all over the place :-) but can we add something like:\n# iterable controls whether the server main loop should exit or not as a result of processing the command","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2900954249aeb33878e55290c12d98d77440817c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        \"\"\""},{"line_number":38,"context_line":"        self.status \u003d status"},{"line_number":39,"context_line":"        self.message \u003d message"},{"line_number":40,"context_line":"        self.iterable \u003d iterable"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    @property"},{"line_number":43,"context_line":"    def report_message(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_fc4d7cc4","line":40,"in_reply_to":"3a461143_03f7608b","updated":"2017-01-31 18:05:00.000000000","message":"Done","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"43cb821efd737bb67944eee4ee1afd988e84dd7c","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    def halt(self, dtg):"},{"line_number":142,"context_line":"        return CommandSuccess(\u0027OK\u0027, False)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @command_handler"},{"line_number":145,"context_line":"    def stop_daemons(self, dtg):"},{"line_number":146,"context_line":"        raise NotImplementedError()"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_b2950a88","line":144,"updated":"2017-01-31 06:31:50.000000000","message":"General question regarding the NotImplemented handlers:\nWhy do we list here all possible commands?\nIn my understanding SBusServer is a server that listens on SBus and works with datagrams, IMHO, it does not mean that it needs to implement all possible commands.\nAnother way to put this question is: What is the benefit of listing here commands with NotImplemented and having dispatch_command catch this exception over raising an exception in get_handler if the handler does not exist in the implementing class?\nIt appears to me that it is easier not to list commands that are not implemented as future commands that are added to one server type (e.g. only to the factory) do not imply adding the command also here.\nThis is all not crucial, I am mostly curious.","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2900954249aeb33878e55290c12d98d77440817c","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    def halt(self, dtg):"},{"line_number":142,"context_line":"        return CommandSuccess(\u0027OK\u0027, False)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    @command_handler"},{"line_number":145,"context_line":"    def stop_daemons(self, dtg):"},{"line_number":146,"context_line":"        raise NotImplementedError()"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_3bc9c7ac","line":144,"in_reply_to":"3a461143_b2950a88","updated":"2017-01-31 18:05:00.000000000","message":"The first motivation I put these skeletons here is that I\u0027d like to make it clean whether the command is not defined (In this case server class does not have the method for that command) or the command is not implemented (in this case server class has the method, but it raises NotImplementedError) to tell client if the given error is caused by a kind of protocol violation or limitations in server side.\nBut as you pointed out, the current design makes it difficult to add new command, because we always need to add methods according to command definitions.\n\nPlease find my updated patch set. I believe it can be a solution for this problem.","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"e27485ecc9cc4a90103a77e43f5b469a6d18294a","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        # TODO(takashi): Currently we return response via service out fd only"},{"line_number":120,"context_line":"        #                for service commands, but to be more consistent, we"},{"line_number":121,"context_line":"        #                should do the same for execute command"},{"line_number":122,"context_line":"        outfd \u003d dtg.service_out_fd"},{"line_number":123,"context_line":"        if outfd:"},{"line_number":124,"context_line":"            with os.fdopen(outfd, \u0027w\u0027) as outfile:"},{"line_number":125,"context_line":"                self._respond(outfile, resp)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_9eeeb2b2","line":122,"range":{"start_line":122,"start_character":8,"end_line":122,"end_character":34},"updated":"2017-02-06 11:18:04.000000000","message":"If the dtg is SBusExecuteDatagram, Attribute Error occures. Because SBusExecuteDatagram doesn\u0027t have service_out_fd.\nI think you should add \u0027try catch\u0027 in this code.","commit_id":"f167b79a5c0c5896bd993ee783bd7e87995dd148"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"f8025396e823fe66d16e3032e20b648c93435586","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        # TODO(takashi): Currently we return response via service out fd only"},{"line_number":120,"context_line":"        #                for service commands, but to be more consistent, we"},{"line_number":121,"context_line":"        #                should do the same for execute command"},{"line_number":122,"context_line":"        outfd \u003d dtg.service_out_fd"},{"line_number":123,"context_line":"        if outfd:"},{"line_number":124,"context_line":"            with os.fdopen(outfd, \u0027w\u0027) as outfile:"},{"line_number":125,"context_line":"                self._respond(outfile, resp)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_c1ba1fe1","line":122,"range":{"start_line":122,"start_character":8,"end_line":122,"end_character":34},"in_reply_to":"1a430d35_9eeeb2b2","updated":"2017-02-06 11:37:54.000000000","message":"Done","commit_id":"f167b79a5c0c5896bd993ee783bd7e87995dd148"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d69c68b822e877401868935a3a4507da41b9bd0","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            handler \u003d self.get_handler(command)"},{"line_number":104,"context_line":"        except ValueError as err:"},{"line_number":105,"context_line":"            self.logger.error(err.message)"},{"line_number":106,"context_line":"            resp \u003d CommandFailure(str(err))"},{"line_number":107,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba2be162_1696324c","line":104,"range":{"start_line":104,"start_character":15,"end_line":104,"end_character":25},"updated":"2017-03-02 02:07:00.000000000","message":"We should catch NotImplementedError also.","commit_id":"bab6769c617ec14ab8cf22354704c9e61d24df03"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"a91b24d0ef0d3d9a39df66d1330b6fc4616e73d1","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        try:"},{"line_number":103,"context_line":"            handler \u003d self.get_handler(command)"},{"line_number":104,"context_line":"        except ValueError as err:"},{"line_number":105,"context_line":"            self.logger.error(err.message)"},{"line_number":106,"context_line":"            resp \u003d CommandFailure(str(err))"},{"line_number":107,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba2be162_b4706241","line":104,"range":{"start_line":104,"start_character":15,"end_line":104,"end_character":25},"in_reply_to":"ba2be162_1696324c","updated":"2017-03-06 11:37:57.000000000","message":"Thank you.\nI will fix it.","commit_id":"bab6769c617ec14ab8cf22354704c9e61d24df03"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if not hasattr(sbus_cmd, command):"},{"line_number":79,"context_line":"            raise ValueError(\u0027Unknown command %s\u0027 % command)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        func_name \u003d command[len(\u0027SBUS_CMD_\u0027):].lower()"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            handler \u003d getattr(self, func_name)"},{"line_number":84,"context_line":"            getattr(handler, \u0027is_command_handler\u0027)"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_0841073a","line":81,"updated":"2017-03-14 08:05:33.000000000","message":"why does this make a regression from the variable SBUS_CMD_PREFIX to the hard coded string?","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if not hasattr(sbus_cmd, command):"},{"line_number":79,"context_line":"            raise ValueError(\u0027Unknown command %s\u0027 % command)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"        func_name \u003d command[len(\u0027SBUS_CMD_\u0027):].lower()"},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            handler \u003d getattr(self, func_name)"},{"line_number":84,"context_line":"            getattr(handler, \u0027is_command_handler\u0027)"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_69a77151","line":81,"in_reply_to":"5a22e58a_0841073a","updated":"2018-03-19 16:35:06.000000000","message":"Done","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def ping(self, dtg):"},{"line_number":146,"context_line":"        return CommandSuccess(\u0027OK\u0027)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @command_handler"},{"line_number":149,"context_line":"    def halt(self, dtg):"},{"line_number":150,"context_line":"        return CommandSuccess(\u0027OK\u0027, False)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _terminate(self):"},{"line_number":153,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_cb11a95f","line":150,"range":{"start_line":148,"start_character":0,"end_line":150,"end_character":42},"updated":"2017-03-14 08:05:33.000000000","message":"DON\u0027T MAKE the halt as such a mock method here. This is so much dangerous for us because if the child doesn\u0027t override the method, no process get halted but return success with this method.\n\nFWIW, when I removed this block, some tests failed so some test is under invalid test setting, i think.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def ping(self, dtg):"},{"line_number":146,"context_line":"        return CommandSuccess(\u0027OK\u0027)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    @command_handler"},{"line_number":149,"context_line":"    def halt(self, dtg):"},{"line_number":150,"context_line":"        return CommandSuccess(\u0027OK\u0027, False)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _terminate(self):"},{"line_number":153,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_e403a872","line":150,"range":{"start_line":148,"start_character":0,"end_line":150,"end_character":42},"in_reply_to":"5a22e58a_cb11a95f","updated":"2018-03-19 16:35:06.000000000","message":"Done","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    def halt(self, dtg):"},{"line_number":150,"context_line":"        return CommandSuccess(\u0027OK\u0027, False)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _terminate(self):"},{"line_number":153,"context_line":"        pass"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def main_loop(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_c8a44f0a","line":152,"updated":"2017-03-14 08:05:33.000000000","message":"To be honest, I don\u0027t like to make a method to do nothing. If this is an abstraction, we should raise NotImplementedError because we expects the child implements this method correctly.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    def halt(self, dtg):"},{"line_number":150,"context_line":"        return CommandSuccess(\u0027OK\u0027, False)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _terminate(self):"},{"line_number":153,"context_line":"        pass"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def main_loop(self):"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_84f8ac7c","line":152,"in_reply_to":"5a22e58a_c8a44f0a","updated":"2018-03-19 16:35:06.000000000","message":"Done","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"be479a69bb0f76a97e4d7c21185097276ebf7301","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import storlets.sbus.command as sbus_cmd"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"EXIT_SUCCESS \u003d 0"},{"line_number":22,"context_line":"EXIT_FAILURE \u003d 0"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class CommandResponse(Exception):"}],"source_content_type":"text/x-python","patch_set":36,"id":"df7087c5_ea7a1875","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":16},"updated":"2018-03-23 10:51:40.000000000","message":"should we set 1 to EXIT_FAILURE?\n\nAt least, the original sbus manager sets it as 1.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"dcbb1f94c365b512e5409facbf16d5dd6d8809e5","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import storlets.sbus.command as sbus_cmd"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"EXIT_SUCCESS \u003d 0"},{"line_number":22,"context_line":"EXIT_FAILURE \u003d 0"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class CommandResponse(Exception):"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_d6f938c8","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":16},"in_reply_to":"bf659307_9ad9e984","updated":"2018-03-28 02:24:14.000000000","message":"Done","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1b7d207468f0a3088a9ed2e06f6694e509199f91","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import storlets.sbus.command as sbus_cmd"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"EXIT_SUCCESS \u003d 0"},{"line_number":22,"context_line":"EXIT_FAILURE \u003d 0"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class CommandResponse(Exception):"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_fcae9a96","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":16},"in_reply_to":"bf659307_d6f938c8","updated":"2018-03-28 07:05:49.000000000","message":"This is not tested yet, and should be testsd in the ut for main loop.\n\nCurrently unit tests for main loop has a smallest implementation, as the first base implementation. I\u0027ll submit another patch later, to add required unit tests including returning error code.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"9e9f5be1804e4d16adc0b73a3f10d4e24e26ac80","unresolved":false,"context_lines":[{"line_number":19,"context_line":"import storlets.sbus.command as sbus_cmd"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"EXIT_SUCCESS \u003d 0"},{"line_number":22,"context_line":"EXIT_FAILURE \u003d 0"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class CommandResponse(Exception):"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_9ad9e984","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":16},"in_reply_to":"df7087c5_ea7a1875","updated":"2018-03-26 05:46:54.000000000","message":"Nice catch. I\u0027ll fix","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"be479a69bb0f76a97e4d7c21185097276ebf7301","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class SBusServer(object):"},{"line_number":63,"context_line":"    \"\"\""},{"line_number":64,"context_line":"    Basic implementation for server processes listening on sbus protocol"},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    def __init__(self, sbus_path, logger):"},{"line_number":67,"context_line":"        self.sbus_path \u003d sbus_path"}],"source_content_type":"text/x-python","patch_set":36,"id":"df7087c5_05117f04","line":64,"updated":"2018-03-23 10:51:40.000000000","message":"Should we inherit this class? Otherwise, the termination process causes NotImplementedError.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"dcbb1f94c365b512e5409facbf16d5dd6d8809e5","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class SBusServer(object):"},{"line_number":63,"context_line":"    \"\"\""},{"line_number":64,"context_line":"    Basic implementation for server processes listening on sbus protocol"},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    def __init__(self, sbus_path, logger):"},{"line_number":67,"context_line":"        self.sbus_path \u003d sbus_path"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_562f683e","line":64,"in_reply_to":"bf659307_fad26534","updated":"2018-03-28 02:24:14.000000000","message":"Added some comments. Done","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"9e9f5be1804e4d16adc0b73a3f10d4e24e26ac80","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class SBusServer(object):"},{"line_number":63,"context_line":"    \"\"\""},{"line_number":64,"context_line":"    Basic implementation for server processes listening on sbus protocol"},{"line_number":65,"context_line":"    \"\"\""},{"line_number":66,"context_line":"    def __init__(self, sbus_path, logger):"},{"line_number":67,"context_line":"        self.sbus_path \u003d sbus_path"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_fad26534","line":64,"in_reply_to":"df7087c5_05117f04","updated":"2018-03-26 05:46:54.000000000","message":"coCan I ask a little more about your concern?\n\nI make _terminate function raise NotImplementedError based on your comment, to make developers more aware of the need to implement cleanup process. Please let me know if I\u0027m doing a wrong thing.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"be479a69bb0f76a97e4d7c21185097276ebf7301","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            handler \u003d getattr(self, func_name)"},{"line_number":84,"context_line":"            getattr(handler, \u0027is_command_handler\u0027)"},{"line_number":85,"context_line":"        except AttributeError:"},{"line_number":86,"context_line":"            raise NotImplementedError(\u0027Command %s is not allowd for this \u0027"},{"line_number":87,"context_line":"                                      \u0027server\u0027 % command)"},{"line_number":88,"context_line":"        return handler"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"df7087c5_0502df6f","line":86,"range":{"start_line":86,"start_character":18,"end_line":86,"end_character":37},"updated":"2018-03-23 10:51:40.000000000","message":"Honesty, I don\u0027t like to raise NotImplementedError here because it\u0027s actually implemented but not allowed.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"dcbb1f94c365b512e5409facbf16d5dd6d8809e5","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            handler \u003d getattr(self, func_name)"},{"line_number":84,"context_line":"            getattr(handler, \u0027is_command_handler\u0027)"},{"line_number":85,"context_line":"        except AttributeError:"},{"line_number":86,"context_line":"            raise NotImplementedError(\u0027Command %s is not allowd for this \u0027"},{"line_number":87,"context_line":"                                      \u0027server\u0027 % command)"},{"line_number":88,"context_line":"        return handler"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_7632aca9","line":86,"range":{"start_line":86,"start_character":18,"end_line":86,"end_character":37},"in_reply_to":"bf659307_3abf7dfc","updated":"2018-03-28 02:24:14.000000000","message":"Done","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"9e9f5be1804e4d16adc0b73a3f10d4e24e26ac80","unresolved":false,"context_lines":[{"line_number":83,"context_line":"            handler \u003d getattr(self, func_name)"},{"line_number":84,"context_line":"            getattr(handler, \u0027is_command_handler\u0027)"},{"line_number":85,"context_line":"        except AttributeError:"},{"line_number":86,"context_line":"            raise NotImplementedError(\u0027Command %s is not allowd for this \u0027"},{"line_number":87,"context_line":"                                      \u0027server\u0027 % command)"},{"line_number":88,"context_line":"        return handler"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_3abf7dfc","line":86,"range":{"start_line":86,"start_character":18,"end_line":86,"end_character":37},"in_reply_to":"df7087c5_0502df6f","updated":"2018-03-26 05:46:54.000000000","message":"I see. ValueError or a special exception like SBusCommandNotAllowed seems better for this. wiil fix.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"be479a69bb0f76a97e4d7c21185097276ebf7301","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        except (ValueError, NotImplementedError) as err:"},{"line_number":105,"context_line":"            self.logger.error(err.message)"},{"line_number":106,"context_line":"            resp \u003d CommandFailure(str(err))"},{"line_number":107,"context_line":"        else:"},{"line_number":108,"context_line":"            try:"},{"line_number":109,"context_line":"                resp \u003d handler(dtg)"},{"line_number":110,"context_line":"            except CommandResponse as err:"},{"line_number":111,"context_line":"                resp \u003d err"}],"source_content_type":"text/x-python","patch_set":36,"id":"df7087c5_457c5782","line":108,"range":{"start_line":107,"start_character":0,"end_line":108,"end_character":16},"updated":"2018-03-23 10:51:40.000000000","message":"probably we can do just like as:\n\ntry:\n  handler \u003d self.get_handler(command)\n  resp \u003d handler(dtg)\nexcept (ValueError, NotImplementedError) as err:\n...\nexcept CommandResponse as err:\n...\nexcept Exception:\n...\n\nIsn\u0027t it?","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"dcbb1f94c365b512e5409facbf16d5dd6d8809e5","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        except (ValueError, NotImplementedError) as err:"},{"line_number":105,"context_line":"            self.logger.error(err.message)"},{"line_number":106,"context_line":"            resp \u003d CommandFailure(str(err))"},{"line_number":107,"context_line":"        else:"},{"line_number":108,"context_line":"            try:"},{"line_number":109,"context_line":"                resp \u003d handler(dtg)"},{"line_number":110,"context_line":"            except CommandResponse as err:"},{"line_number":111,"context_line":"                resp \u003d err"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_1629f036","line":108,"range":{"start_line":107,"start_character":0,"end_line":108,"end_character":16},"in_reply_to":"bf659307_dad0c153","updated":"2018-03-28 02:24:14.000000000","message":"Done","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"9e9f5be1804e4d16adc0b73a3f10d4e24e26ac80","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        except (ValueError, NotImplementedError) as err:"},{"line_number":105,"context_line":"            self.logger.error(err.message)"},{"line_number":106,"context_line":"            resp \u003d CommandFailure(str(err))"},{"line_number":107,"context_line":"        else:"},{"line_number":108,"context_line":"            try:"},{"line_number":109,"context_line":"                resp \u003d handler(dtg)"},{"line_number":110,"context_line":"            except CommandResponse as err:"},{"line_number":111,"context_line":"                resp \u003d err"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_dad0c153","line":108,"range":{"start_line":107,"start_character":0,"end_line":108,"end_character":16},"in_reply_to":"df7087c5_457c5782","updated":"2018-03-26 05:46:54.000000000","message":"makes sense. will fix according to your comment.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"}],"storlets/agent/common/utils.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def start_logger(logger_name, log_level, container_id):"},{"line_number":20,"context_line":"    \"\"\""},{"line_number":21,"context_line":"    Initialize logging of this process and set logger format"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_c3822600","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":9},"updated":"2017-01-16 03:00:25.000000000","message":"get_logger? Because it looks like setup-ed logger will return , FWIW.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4289eb8e7a09c269ca8be48a237f4a5b13bdb823","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def start_logger(logger_name, log_level, container_id):"},{"line_number":20,"context_line":"    \"\"\""},{"line_number":21,"context_line":"    Initialize logging of this process and set logger format"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a3905b3_7d952885","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":9},"in_reply_to":"7a3c09a3_5b6e1e97","updated":"2017-01-23 16:26:21.000000000","message":"Done","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3717b3c940a8383d96878a3b35684c92430bdcea","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def start_logger(logger_name, log_level, container_id):"},{"line_number":20,"context_line":"    \"\"\""},{"line_number":21,"context_line":"    Initialize logging of this process and set logger format"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_5b6e1e97","line":19,"range":{"start_line":19,"start_character":4,"end_line":19,"end_character":9},"in_reply_to":"7a3c09a3_c3822600","updated":"2017-01-16 05:20:51.000000000","message":"I prefer get_logger, so will fix.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    :param log_level: The verbosity level. This should be selected"},{"line_number":25,"context_line":"    :param container_id: container id"},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":"    logging.raiseExceptions \u003d False"},{"line_number":28,"context_line":"    log_level \u003d log_level.upper()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    # NOTE(takashi): currently logging.WARNING is defined as the same value"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_83d3be37","line":27,"updated":"2017-01-16 03:00:25.000000000","message":"This is not a guilty for this patch but raiseExceptions \u003d False may be bad because it would suppress some bugs in the logger side?","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3717b3c940a8383d96878a3b35684c92430bdcea","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    :param log_level: The verbosity level. This should be selected"},{"line_number":25,"context_line":"    :param container_id: container id"},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":"    logging.raiseExceptions \u003d False"},{"line_number":28,"context_line":"    log_level \u003d log_level.upper()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    # NOTE(takashi): currently logging.WARNING is defined as the same value"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_9b688689","line":27,"in_reply_to":"7a3c09a3_83d3be37","updated":"2017-01-16 05:20:51.000000000","message":"will fix, thanks!","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4289eb8e7a09c269ca8be48a237f4a5b13bdb823","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    :param log_level: The verbosity level. This should be selected"},{"line_number":25,"context_line":"    :param container_id: container id"},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":"    logging.raiseExceptions \u003d False"},{"line_number":28,"context_line":"    log_level \u003d log_level.upper()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    # NOTE(takashi): currently logging.WARNING is defined as the same value"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a3905b3_bd8b1067","line":27,"in_reply_to":"7a3c09a3_9b688689","updated":"2017-01-23 16:26:21.000000000","message":"Done","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    if log_level \u003d\u003d \u0027OFF\u0027:"},{"line_number":40,"context_line":"        logging.disable(logging.CRITICAL)"},{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        logger.setLevel(level)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    log_handler \u003d SysLogHandler(\u0027/dev/log\u0027)"},{"line_number":45,"context_line":"    str_format \u003d \u0027%(name)-12s: %(levelname)-8s %(funcName)s\u0027 + \\"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_63733216","line":42,"range":{"start_line":42,"start_character":7,"end_line":42,"end_character":30},"updated":"2017-01-16 03:00:25.000000000","message":"Just a question, not looking the side effect deeply, do we need try/except block? Or is it ok to raise ValueError if non-available value incoming as a level (e.g. \"foo\")?","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3717b3c940a8383d96878a3b35684c92430bdcea","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    if log_level \u003d\u003d \u0027OFF\u0027:"},{"line_number":40,"context_line":"        logging.disable(logging.CRITICAL)"},{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        logger.setLevel(level)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    log_handler \u003d SysLogHandler(\u0027/dev/log\u0027)"},{"line_number":45,"context_line":"    str_format \u003d \u0027%(name)-12s: %(levelname)-8s %(funcName)s\u0027 + \\"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_db084edc","line":42,"range":{"start_line":42,"start_character":7,"end_line":42,"end_character":30},"in_reply_to":"7a3c09a3_63733216","updated":"2017-01-16 05:20:51.000000000","message":"I think we don\u0027t need try-except here.\n\nWe confirm that log_level is defined in previous try-except block (L32-35), and replace the level to ERROR if undefined one is set.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d69c68b822e877401868935a3a4507da41b9bd0","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def get_logger(logger_name, log_level, container_id):"},{"line_number":20,"context_line":"    \"\"\""},{"line_number":21,"context_line":"    Initialize logging of this process and set logger format"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"ba2be162_16a472a4","line":19,"range":{"start_line":19,"start_character":15,"end_line":19,"end_character":51},"updated":"2017-03-02 02:07:00.000000000","message":"In the future, we should replace this interface (by conf dict?) to allow more flexible logger settings.","commit_id":"bab6769c617ec14ab8cf22354704c9e61d24df03"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"a91b24d0ef0d3d9a39df66d1330b6fc4616e73d1","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def get_logger(logger_name, log_level, container_id):"},{"line_number":20,"context_line":"    \"\"\""},{"line_number":21,"context_line":"    Initialize logging of this process and set logger format"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"ba2be162_d414f6a0","line":19,"range":{"start_line":19,"start_character":15,"end_line":19,"end_character":51},"in_reply_to":"ba2be162_16a472a4","updated":"2017-03-06 11:37:57.000000000","message":"I understand.\nI will fix it on following patch.\n\u003chttps://review.openstack.org/#/c/436263/\u003e","commit_id":"bab6769c617ec14ab8cf22354704c9e61d24df03"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":30,"id":"5a22e58a_2bacfdec","updated":"2017-03-14 08:05:33.000000000","message":"OK, this is from storlets.agent.daemon_factory.manager and renamed to get_logger because it returns a logger instance.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":30,"id":"df7087c5_843d0c2e","in_reply_to":"5a22e58a_2bacfdec","updated":"2018-03-19 16:35:06.000000000","message":"right","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"be479a69bb0f76a97e4d7c21185097276ebf7301","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def get_logger(logger_name, log_level, container_id):"},{"line_number":20,"context_line":"    \"\"\""},{"line_number":21,"context_line":"    Initialize logging of this process and set logger format"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"df7087c5_255602d0","line":19,"updated":"2018-03-23 10:51:40.000000000","message":"off topic: if we could take same syntax with swift.common.utils.get_logger, it\u0027s helpful to understand but I know we would have difference because this will be designed to be used in a storlet container, tho.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"9e9f5be1804e4d16adc0b73a3f10d4e24e26ac80","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from logging.handlers import SysLogHandler"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"def get_logger(logger_name, log_level, container_id):"},{"line_number":20,"context_line":"    \"\"\""},{"line_number":21,"context_line":"    Initialize logging of this process and set logger format"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_da5e81e5","line":19,"in_reply_to":"df7087c5_255602d0","updated":"2018-03-26 05:46:54.000000000","message":"To have the same semanthics as swift\u0027s one, a config mechanism is needed, which is planned after this patch.\n(some works to add configuration files for agent processes)","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"}],"storlets/agent/daemon/manager.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"38a174a2575e6d182412177158018316ec17b5a5","unresolved":false,"context_lines":[{"line_number":287,"context_line":"    \"\"\""},{"line_number":288,"context_line":"    if (len(argv) !\u003d 5):"},{"line_number":289,"context_line":"        usage()"},{"line_number":290,"context_line":"        return 1"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    storlet_name \u003d argv[0]"},{"line_number":293,"context_line":"    sbus_path \u003d argv[1]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_30e97681","line":290,"updated":"2016-12-13 20:08:22.000000000","message":"Should we replace this with something like a call to parent\u0027s return exit_failure?","commit_id":"57335f4040ca35c2dd35fab63b53095cffbad968"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    pass"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class StorletDaemon(SBusDaemon):"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    Daemon class to run python program on storlet container"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_23784a2b","line":33,"updated":"2017-01-16 03:00:25.000000000","message":"StorletManagerDaemon?","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4289eb8e7a09c269ca8be48a237f4a5b13bdb823","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    pass"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class StorletDaemon(SBusDaemon):"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    Daemon class to run python program on storlet container"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5a3905b3_5d6f8c2a","line":33,"in_reply_to":"7a3c09a3_23784a2b","updated":"2017-01-23 16:26:21.000000000","message":"As for now, I leave these namings as they are, because it requires changes not only about server classes, but also about exceptions and some logs, which calls it SDaemon.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"}],"storlets/agent/daemon/server.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"43cb821efd737bb67944eee4ee1afd988e84dd7c","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class StorletDaemon(SBusServer):"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    Daemon class to run python program on storlet container"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    :param storlet_name: the program name string which formatted as"},{"line_number":38,"context_line":"                         \u0027module.class\u0027. Note that nested module"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_6cae6599","line":35,"updated":"2017-01-31 06:31:50.000000000","message":"How about: An SBusServer implementation for python storlets applications","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2900954249aeb33878e55290c12d98d77440817c","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class StorletDaemon(SBusServer):"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    Daemon class to run python program on storlet container"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    :param storlet_name: the program name string which formatted as"},{"line_number":38,"context_line":"                         \u0027module.class\u0027. Note that nested module"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_5c6930f8","line":35,"in_reply_to":"3a461143_6cae6599","updated":"2017-01-31 18:05:00.000000000","message":"Done","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d69c68b822e877401868935a3a4507da41b9bd0","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            module \u003d __import__(module_name, fromlist\u003d[cls_name])"},{"line_number":56,"context_line":"            self.storlet_cls \u003d getattr(module, cls_name)"},{"line_number":57,"context_line":"        except (ImportError, AttributeError):"},{"line_number":58,"context_line":"            raise StorletDaemonException("},{"line_number":59,"context_line":"                \"Failed to load storlet %s\" % self.storlet_name)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        self.pool_size \u003d pool_size"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba2be162_76d76eed","line":58,"range":{"start_line":58,"start_character":18,"end_line":58,"end_character":40},"updated":"2017-03-02 02:07:00.000000000","message":"I noticed that we use StorletDamonException only here, and IMO it is better to show more detailed reason, like StorletDaemonLoadError or just to use something like ValueError instead.","commit_id":"bab6769c617ec14ab8cf22354704c9e61d24df03"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"a91b24d0ef0d3d9a39df66d1330b6fc4616e73d1","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            module \u003d __import__(module_name, fromlist\u003d[cls_name])"},{"line_number":56,"context_line":"            self.storlet_cls \u003d getattr(module, cls_name)"},{"line_number":57,"context_line":"        except (ImportError, AttributeError):"},{"line_number":58,"context_line":"            raise StorletDaemonException("},{"line_number":59,"context_line":"                \"Failed to load storlet %s\" % self.storlet_name)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        self.pool_size \u003d pool_size"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba2be162_f4cc9a36","line":58,"range":{"start_line":58,"start_character":18,"end_line":58,"end_character":40},"in_reply_to":"ba2be162_76d76eed","updated":"2017-03-06 11:37:57.000000000","message":"I see.\nI will fix it to \u0027StorletDaemonLoadError\u0027.","commit_id":"bab6769c617ec14ab8cf22354704c9e61d24df03"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class StorletDaemon(SBusServer):"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    An SBusServer implementation for python storlets applications"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    :param storlet_name: the program name string which formatted as"},{"line_number":38,"context_line":"                         \u0027module.class\u0027. Note that nested module"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_0b202149","line":35,"updated":"2017-03-14 08:05:33.000000000","message":"Er, StorletDaemon for Java is in src/java/SDaemon/src/main/org/openstack/storlet/daemon/SDaemon.java so this is only for python storlet applications.\n\nPerhaps, docs for code tree may be helpful to us to understand the structure.\n\nTo call correctly, SDaemon or PythonSDaemon?","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class StorletDaemon(SBusServer):"},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":"    An SBusServer implementation for python storlets applications"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    :param storlet_name: the program name string which formatted as"},{"line_number":38,"context_line":"                         \u0027module.class\u0027. Note that nested module"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_64e0f897","line":35,"in_reply_to":"5a22e58a_0b202149","updated":"2018-03-19 16:35:06.000000000","message":"In this patch, I don\u0027t include Python in the class naming because ...\n\n* Now we don\u0027t include Java in the storlet daemon for Java\n* We don\u0027t expect to execute storlet applications written in languages which is different from execution server \n\nIf we rename this to PythonStorletDaemon, then IMO we should rename java storlet daemon also, and I\u0027m afraid that including the change makes this patch unnecessarily big.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"}],"storlets/agent/daemon_factory/manager.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"class StorletDaemonFactory(SBusDaemon):"},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    This class acts as the manager for storlet daemons."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_a3e0bacd","line":65,"updated":"2017-01-16 03:00:25.000000000","message":"StorletDaemonFactoryDaemon?\n\nI think if this could work as daemon, it should end with \"Daemon\" suffix to clarify the role.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1c7ad62efede9e8fc9ee93bd8b99108eab523263","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"da36d5c6_68409f08","line":1,"updated":"2017-02-28 07:14:20.000000000","message":"I\u0027m not sure whether we can do this with git, but IMO it is better to rename manager.py to server.py instead of deleting manager.py and creating server.py, to make this change more clear.","commit_id":"f3ee22598de5ec08e2fbe5ed821a40625e2c3810"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"549f984884bd70f94807342dea09a88414eead11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"da36d5c6_0ed80b1d","line":1,"in_reply_to":"da36d5c6_68409f08","updated":"2017-02-28 08:32:32.000000000","message":"sorry. I didn\u0027t find to rename it on git...","commit_id":"f3ee22598de5ec08e2fbe5ed821a40625e2c3810"}],"storlets/agent/daemon_factory/server.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"43cb821efd737bb67944eee4ee1afd988e84dd7c","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class StorletDaemonFactory(SBusServer):"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    This class acts as the manager for storlet daemons."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    It listens to commands and reacts on them in an internal loop."},{"line_number":40,"context_line":"    As for now (01-Dec-2014) it is a single thread, synchronous"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_cc74b937","line":37,"updated":"2017-01-31 06:31:50.000000000","message":"How about: An SBusServer implementation for storlets application factory","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2900954249aeb33878e55290c12d98d77440817c","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class StorletDaemonFactory(SBusServer):"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    This class acts as the manager for storlet daemons."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    It listens to commands and reacts on them in an internal loop."},{"line_number":40,"context_line":"    As for now (01-Dec-2014) it is a single thread, synchronous"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_bcb3f496","line":37,"in_reply_to":"3a461143_cc74b937","updated":"2017-01-31 18:05:00.000000000","message":"Done","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"43cb821efd737bb67944eee4ee1afd988e84dd7c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    This class acts as the manager for storlet daemons."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    It listens to commands and reacts on them in an internal loop."},{"line_number":40,"context_line":"    As for now (01-Dec-2014) it is a single thread, synchronous"},{"line_number":41,"context_line":"    processing."},{"line_number":42,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_ecbfb5a7","line":39,"updated":"2017-01-31 06:31:50.000000000","message":"I think we can delete this comment.","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2900954249aeb33878e55290c12d98d77440817c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    This class acts as the manager for storlet daemons."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    It listens to commands and reacts on them in an internal loop."},{"line_number":40,"context_line":"    As for now (01-Dec-2014) it is a single thread, synchronous"},{"line_number":41,"context_line":"    processing."},{"line_number":42,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_fca9fc24","line":39,"in_reply_to":"3a461143_ecbfb5a7","updated":"2017-01-31 18:05:00.000000000","message":"Done","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"81cf9a014cdef8247ac98a6e3da1a70576c9d4cf","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    An SBusServer implementation for storlets application factory"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    As for now (01-Dec-2014) it is a single thread, synchronous"},{"line_number":40,"context_line":"    processing."},{"line_number":41,"context_line":"    \"\"\""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def __init__(self, sbus_path, logger, container_id):"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_3fea7ddb","line":40,"updated":"2017-02-01 08:32:35.000000000","message":"I actually meant for this comment to be deleted :-)\nLets do it later though.","commit_id":"239e00314d94c86b7bd19e1f78ee77047506ff24"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # TODO(takashi): We had better use contextmanager"},{"line_number":129,"context_line":"        # TODO(takashi): Where is this closed?"},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            dn \u003d open(os.devnull, \u0027w\u0027)"},{"line_number":132,"context_line":"            daemon_p \u003d subprocess.Popen("},{"line_number":133,"context_line":"                pargs, stdout\u003ddn, stderr\u003dsubprocess.PIPE,"},{"line_number":134,"context_line":"                close_fds\u003dTrue, shell\u003dFalse, env\u003denv)"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_6b1d15bd","line":131,"updated":"2017-03-14 08:05:33.000000000","message":"Off-topic: we should close dev null descriptor open here at somewhere. Otherwise, the fd will be leaked. Perhaps, it won\u0027t be a big problem because it will be collected when the subprocess finished.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # TODO(takashi): We had better use contextmanager"},{"line_number":129,"context_line":"        # TODO(takashi): Where is this closed?"},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            dn \u003d open(os.devnull, \u0027w\u0027)"},{"line_number":132,"context_line":"            daemon_p \u003d subprocess.Popen("},{"line_number":133,"context_line":"                pargs, stdout\u003ddn, stderr\u003dsubprocess.PIPE,"},{"line_number":134,"context_line":"                close_fds\u003dTrue, shell\u003dFalse, env\u003denv)"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_a95b4952","line":131,"in_reply_to":"5a22e58a_6b1d15bd","updated":"2018-03-19 16:35:06.000000000","message":"Fortunately, we haven\u0027t seen that fd leaking, maybe because of the reason you described, but we surely need to be careful about this.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"9c1b99e7ac5c25f0b4f1856f9dc2b67472406c33","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # TODO(takashi): We had better use contextmanager"},{"line_number":129,"context_line":"        # TODO(takashi): Where is this closed?"},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            dn \u003d open(os.devnull, \u0027w\u0027)"},{"line_number":132,"context_line":"            daemon_p \u003d subprocess.Popen("},{"line_number":133,"context_line":"                pargs, stdout\u003ddn, stderr\u003dsubprocess.PIPE,"},{"line_number":134,"context_line":"                close_fds\u003dTrue, shell\u003dFalse, env\u003denv)"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_19f34ca0","line":131,"in_reply_to":"df7087c5_a95b4952","updated":"2018-03-22 11:45:43.000000000","message":"I noticed I missed one thing here.\n\nAs we set close_fds as True when we call subprocess.Popen, so the passed fds surely closed when the child process exits.\n\nhttps://docs.python.org/2/library/subprocess.html?highlight\u003dsubprocess#popen-constructor","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        :returns: True if it starts a new subprocess"},{"line_number":215,"context_line":"                  False if there already exists a running process"},{"line_number":216,"context_line":"        \"\"\""},{"line_number":217,"context_line":"        if daemon_language.lower() in [\u0027java\u0027]:"},{"line_number":218,"context_line":"            pargs, env \u003d self.get_jvm_args("},{"line_number":219,"context_line":"                daemon_language, storlet_path, storlet_name,"},{"line_number":220,"context_line":"                pool_size, uds_path, log_level)"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_4bfcd93e","line":217,"updated":"2017-03-14 08:05:33.000000000","message":"off-topic:\n\nwhy using list here even the python is using \u003d\u003d at L221?","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        :returns: True if it starts a new subprocess"},{"line_number":215,"context_line":"                  False if there already exists a running process"},{"line_number":216,"context_line":"        \"\"\""},{"line_number":217,"context_line":"        if daemon_language.lower() in [\u0027java\u0027]:"},{"line_number":218,"context_line":"            pargs, env \u003d self.get_jvm_args("},{"line_number":219,"context_line":"                daemon_language, storlet_path, storlet_name,"},{"line_number":220,"context_line":"                pool_size, uds_path, log_level)"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_c9123d63","line":217,"in_reply_to":"5a22e58a_4bfcd93e","updated":"2018-03-19 16:35:06.000000000","message":"Fixed. This comes from the idea that there are some other languages which uses jvm, like Sclar, but I noticed that we have different command for them. :-(","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        :raises SDaemonError: when failed to kill one of the storlet daemons"},{"line_number":336,"context_line":"        \"\"\""},{"line_number":337,"context_line":"        failed \u003d []"},{"line_number":338,"context_line":"        for storlet_name in self.storlet_name_to_pid.keys():"},{"line_number":339,"context_line":"            try:"},{"line_number":340,"context_line":"                self.process_kill(storlet_name)"},{"line_number":341,"context_line":"            except SDaemonError:"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_ab670d24","line":338,"updated":"2017-03-14 08:05:33.000000000","message":"off-topic:\nno need to call keys(). the iteration of dict will return only keys inside.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        :raises SDaemonError: when failed to kill one of the storlet daemons"},{"line_number":336,"context_line":"        \"\"\""},{"line_number":337,"context_line":"        failed \u003d []"},{"line_number":338,"context_line":"        for storlet_name in self.storlet_name_to_pid.keys():"},{"line_number":339,"context_line":"            try:"},{"line_number":340,"context_line":"                self.process_kill(storlet_name)"},{"line_number":341,"context_line":"            except SDaemonError:"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_a40e1030","line":338,"in_reply_to":"5a22e58a_ab670d24","updated":"2018-03-19 16:35:06.000000000","message":"As far as I remeber, this comes from comparability problem with py3. will check it again and submit a different patch if needed.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"be479a69bb0f76a97e4d7c21185097276ebf7301","unresolved":false,"context_lines":[{"line_number":526,"context_line":"    # Initialize logger"},{"line_number":527,"context_line":"    logger \u003d get_logger(\"daemon-factory\", log_level, container_id)"},{"line_number":528,"context_line":"    logger.debug(\"Daemon factory started\")"},{"line_number":529,"context_line":"    SBus.start_logger(\"DEBUG\", container_id\u003dcontainer_id)"},{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    # Impersonate the swift user"},{"line_number":532,"context_line":"    pw \u003d pwd.getpwnam(\u0027swift\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"df7087c5_258042f7","line":529,"updated":"2018-03-23 10:51:40.000000000","message":"oic. this is c logger. previous one is python logger.","commit_id":"0320433bd113f2c746fa9afd4f37d093e2408efe"}],"tests/unit/agent/common/test_server.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"43cb821efd737bb67944eee4ee1afd988e84dd7c","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        # not command handler"},{"line_number":121,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":122,"context_line":"            self.server.get_handler(\u0027SBUS_CMD_GET_JVM_ARGS\u0027)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":126,"context_line":"    unittest.main()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_2349bcd0","line":123,"updated":"2017-01-31 06:31:50.000000000","message":"Do we want to move the test mainloop functions from daemon/test_server.py to here?","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"2900954249aeb33878e55290c12d98d77440817c","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        # not command handler"},{"line_number":121,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":122,"context_line":"            self.server.get_handler(\u0027SBUS_CMD_GET_JVM_ARGS\u0027)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"},{"line_number":126,"context_line":"    unittest.main()"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_789995c3","line":123,"in_reply_to":"3a461143_2349bcd0","updated":"2017-01-31 18:05:00.000000000","message":"Done","commit_id":"a3d7f0bbecccc8164715e18a5a16e5524c625418"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        with self.assertRaises(NotImplementedError):"},{"line_number":98,"context_line":"            self.server.get_handler(\u0027SBUS_CMD_DAEMON_STATUS\u0027)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # invalid command"},{"line_number":101,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":102,"context_line":"            self.server.get_handler(\u0027FOO\u0027)"},{"line_number":103,"context_line":"        # unknown command"},{"line_number":104,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":105,"context_line":"            self.server.get_handler(\u0027SBUS_CMD_UNKNOWN\u0027)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def create_fake_sbus_class(scenario):"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_ae863b63","line":105,"range":{"start_line":100,"start_character":0,"end_line":105,"end_character":55},"updated":"2017-03-14 08:05:33.000000000","message":"nits) worth to assert the error message to make sure the difference between unknown vs invalid.","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        self._test_main_loop_stop(sbus_cmd.SBUS_CMD_HALT)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"class TestSBusServerMain(SBusServerMainTestMixIn, unittest.TestCase):"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def _get_server(self):"},{"line_number":189,"context_line":"        return SBusServer(self.sbus_path, self.logger)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_8e041fc7","line":189,"range":{"start_line":186,"start_character":0,"end_line":189,"end_character":54},"updated":"2017-03-14 08:05:33.000000000","message":"Unnecessary Mixin, why not just using inheritance?\n\ne.g. http://paste.openstack.org/show/602631/","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"a65642d211ab76ebb68cdeabf263e13b93db0cdb","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        self._test_main_loop_stop(sbus_cmd.SBUS_CMD_HALT)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"class TestSBusServerMain(SBusServerMainTestMixIn, unittest.TestCase):"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def _get_server(self):"},{"line_number":189,"context_line":"        return SBusServer(self.sbus_path, self.logger)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_e4ae4897","line":189,"range":{"start_line":186,"start_character":0,"end_line":189,"end_character":54},"in_reply_to":"5a22e58a_8e041fc7","updated":"2018-03-19 16:35:06.000000000","message":"Done","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"969e42543a5e94904fb4a272e9074ffc14dd75e4","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class TestCommandResponse(unittest.TestCase):"},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        pass"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def test_init(self):"},{"line_number":32,"context_line":"        resp \u003d CommandResponse(True, \u0027ok\u0027)"}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_d2fffd31","line":29,"range":{"start_line":28,"start_character":0,"end_line":29,"end_character":12},"updated":"2018-03-28 09:15:02.000000000","message":"nits) unnecessary setUp definition","commit_id":"fc0bdbfd4dbe69ca5eefdc47eb2d7bbb2b9cccfb"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"969e42543a5e94904fb4a272e9074ffc14dd75e4","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class TestCommandSuccess(unittest.TestCase):"},{"line_number":48,"context_line":"    def setUp(self):"},{"line_number":49,"context_line":"        pass"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def test_init(self):"},{"line_number":52,"context_line":"        resp \u003d CommandSuccess(\u0027ok\u0027)"}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_5299ad1c","line":49,"updated":"2018-03-28 09:15:02.000000000","message":"ditto","commit_id":"fc0bdbfd4dbe69ca5eefdc47eb2d7bbb2b9cccfb"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"969e42543a5e94904fb4a272e9074ffc14dd75e4","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class TestCommandFailure(unittest.TestCase):"},{"line_number":59,"context_line":"    def setUp(self):"},{"line_number":60,"context_line":"        pass"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def test_init(self):"},{"line_number":63,"context_line":"        resp \u003d CommandFailure(\u0027error\u0027)"}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_12a33551","line":60,"updated":"2018-03-28 09:15:02.000000000","message":"ditto","commit_id":"fc0bdbfd4dbe69ca5eefdc47eb2d7bbb2b9cccfb"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"969e42543a5e94904fb4a272e9074ffc14dd75e4","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            self.server.get_handler(\u0027SBUS_CMD_DAEMON_STATUS\u0027)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        # invalid command"},{"line_number":102,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":103,"context_line":"            self.server.get_handler(\u0027FOO\u0027)"},{"line_number":104,"context_line":"        # unknown command"},{"line_number":105,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":106,"context_line":"            self.server.get_handler(\u0027SBUS_CMD_UNKNOWN\u0027)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def create_fake_sbus_class(scenario):"}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_0d26bab8","line":106,"range":{"start_line":102,"start_character":0,"end_line":106,"end_character":55},"updated":"2018-03-28 09:15:02.000000000","message":"it\u0027s ok to be as future work but I like to add message assertions here.","commit_id":"fc0bdbfd4dbe69ca5eefdc47eb2d7bbb2b9cccfb"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"969e42543a5e94904fb4a272e9074ffc14dd75e4","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.sbus_path \u003d \u0027fake_path\u0027"},{"line_number":161,"context_line":"        self.server \u003d self._get_test_server()"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _test_main_loop_stop(self, stop_command):"},{"line_number":164,"context_line":"        metadata \u003d [FDMetadata(SBUS_FD_SERVICE_OUT).to_dict()]"},{"line_number":165,"context_line":"        scenario \u003d ["},{"line_number":166,"context_line":"            (\u0027create\u0027, 1),"}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_cd6522e3","line":163,"range":{"start_line":163,"start_character":8,"end_line":163,"end_character":9},"updated":"2018-03-28 09:15:02.000000000","message":"should we remove this underscore?\nOtherwise, TestSBusServerMain will not be tested, right?\n\nAh... I found this test class is inherited by some child classes that call this method. Perhaps, inline comments or change the test class name as BaseXXXXXX would help us to understand.","commit_id":"fc0bdbfd4dbe69ca5eefdc47eb2d7bbb2b9cccfb"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"969e42543a5e94904fb4a272e9074ffc14dd75e4","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        with mock.patch(\u0027storlets.agent.common.server.SBus\u0027, fake_sbus_class):"},{"line_number":175,"context_line":"            with mock.patch(\u0027os.fdopen\u0027):"},{"line_number":176,"context_line":"                self.pile.spawn(self.server.main_loop)"},{"line_number":177,"context_line":"                eventlet.sleep()"},{"line_number":178,"context_line":"                ret \u003d [ret for ret in self.pile][0]"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        self.assertEqual(EXIT_SUCCESS, ret)"}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_cd90c251","line":177,"updated":"2018-03-28 09:15:02.000000000","message":"not sure (I\u0027m not trying by myself yet) but i\u0027m wondering if pile is actually necessary or not. Because the main_loop is not actually doing trampoline in the green thread and nothing makes conversation via the SBus.\n\nIf we don\u0027t need it, list comprehension for \u0027ret\u0027 below is unnecessary too.\n\n\nOh, git blame show me that this is my code so if it\u0027s unnecessary, I should fix by myself.","commit_id":"fc0bdbfd4dbe69ca5eefdc47eb2d7bbb2b9cccfb"}],"tests/unit/agent/common/test_utils.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"610f4f22c21a73805c20baaa7d9d547eb9a736ec","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class TestLogger(unittest.TestCase):"},{"line_number":24,"context_line":"    def setUp(self):"},{"line_number":25,"context_line":"        pass"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_start_logger(self):"},{"line_number":28,"context_line":"        sio \u003d StringIO()"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_03f98e80","line":25,"range":{"start_line":24,"start_character":3,"end_line":25,"end_character":12},"updated":"2017-01-16 03:00:25.000000000","message":"nits) we don\u0027t have to define seUp if we want nothing to do at that time.","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3717b3c940a8383d96878a3b35684c92430bdcea","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class TestLogger(unittest.TestCase):"},{"line_number":24,"context_line":"    def setUp(self):"},{"line_number":25,"context_line":"        pass"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_start_logger(self):"},{"line_number":28,"context_line":"        sio \u003d StringIO()"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a3c09a3_7b04babf","line":25,"range":{"start_line":24,"start_character":3,"end_line":25,"end_character":12},"in_reply_to":"7a3c09a3_03f98e80","updated":"2017-01-16 05:20:51.000000000","message":"will remove this, thanks!","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4289eb8e7a09c269ca8be48a237f4a5b13bdb823","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class TestLogger(unittest.TestCase):"},{"line_number":24,"context_line":"    def setUp(self):"},{"line_number":25,"context_line":"        pass"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    def test_start_logger(self):"},{"line_number":28,"context_line":"        sio \u003d StringIO()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a3905b3_bd5dd016","line":25,"range":{"start_line":24,"start_character":3,"end_line":25,"end_character":12},"in_reply_to":"7a3c09a3_7b04babf","updated":"2017-01-23 16:26:21.000000000","message":"Done","commit_id":"0b1fe25ae5bc6236523766bd2b144df431e31d1f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b0a0e464eb456672d6196722b00f6eb9625f8b7c","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class TestLogger(unittest.TestCase):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def test_get_logger(self):"},{"line_number":26,"context_line":"        sio \u003d StringIO()"},{"line_number":27,"context_line":"        logger \u003d logging.getLogger(\u0027CONT #abcdef: test\u0027)"},{"line_number":28,"context_line":"        logger.addHandler(logging.StreamHandler(sio))"}],"source_content_type":"text/x-python","patch_set":30,"id":"5a22e58a_99ed4b91","line":25,"range":{"start_line":25,"start_character":7,"end_line":25,"end_character":22},"updated":"2017-03-14 08:05:33.000000000","message":"nice","commit_id":"14ed5829d6d945cdded5a0a7e0f58757d4285008"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"969e42543a5e94904fb4a272e9074ffc14dd75e4","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        logger.debug(\u0027test3\u0027)"},{"line_number":45,"context_line":"        self.assertEqual(\u0027test1\\ntest3\\n\u0027, sio.getvalue())"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        # If the level parameter is unknown, use ERROR as log level"},{"line_number":48,"context_line":"        logger \u003d get_logger(\u0027test\u0027, \u0027foo\u0027, \u0027abcdef\u0027)"},{"line_number":49,"context_line":"        self.assertEqual(logging.ERROR, logger.level)"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_6d789629","line":47,"range":{"start_line":47,"start_character":49,"end_line":47,"end_character":55},"updated":"2018-03-28 09:15:02.000000000","message":"Hmm... INFO might be nice by default.","commit_id":"fc0bdbfd4dbe69ca5eefdc47eb2d7bbb2b9cccfb"}],"tests/unit/agent/daemon/test_server.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"3d69c68b822e877401868935a3a4507da41b9bd0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":"import unittest"},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":"from tests.unit import FakeLogger"},{"line_number":18,"context_line":"from tests.unit.agent.common.test_server import SBusServerMainTestMixIn"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"ba2be162_f638be3f","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":11},"updated":"2017-03-02 02:07:00.000000000","message":"(nit) It is better to place \u0027import mock\u0027 before \u0027import unittest\u0027 considering dictionary order.","commit_id":"bab6769c617ec14ab8cf22354704c9e61d24df03"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"a91b24d0ef0d3d9a39df66d1330b6fc4616e73d1","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":"import unittest"},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":"from tests.unit import FakeLogger"},{"line_number":18,"context_line":"from tests.unit.agent.common.test_server import SBusServerMainTestMixIn"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"ba2be162_f4f3ba70","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":11},"in_reply_to":"ba2be162_f638be3f","updated":"2017-03-06 11:37:57.000000000","message":"OK.\nI will fix it.","commit_id":"bab6769c617ec14ab8cf22354704c9e61d24df03"}],"tests/unit/agent/storlet_daemon/test_daemon.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"baf0e3b9cffb2f146a1e968e2737a53b2d2af086","unresolved":false,"context_lines":[{"line_number":5,"context_line":"# You may obtain a copy of the License at"},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#    http://www.apache.org/licenses/LICENSE-2.0"},{"line_number":8,"context_line":"#"},{"line_number":9,"context_line":"# Unless required by applicable law or agreed to in writing, software"},{"line_number":10,"context_line":"# distributed under the License is distributed on an \"AS IS\" BASIS,"},{"line_number":11,"context_line":"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or"}],"source_content_type":"text/x-python","patch_set":28,"id":"da36d5c6_4862fbae","line":8,"updated":"2017-02-28 07:16:37.000000000","message":"This file is duplicated as we have storlets/daemon/test_server.py on the other hand.","commit_id":"f3ee22598de5ec08e2fbe5ed821a40625e2c3810"},{"author":{"_account_id":17901,"name":"Akihito Takai","email":"takaiak@nttdata.co.jp","username":"AkihitoTakai"},"change_message_id":"549f984884bd70f94807342dea09a88414eead11","unresolved":false,"context_lines":[{"line_number":5,"context_line":"# You may obtain a copy of the License at"},{"line_number":6,"context_line":"#"},{"line_number":7,"context_line":"#    http://www.apache.org/licenses/LICENSE-2.0"},{"line_number":8,"context_line":"#"},{"line_number":9,"context_line":"# Unless required by applicable law or agreed to in writing, software"},{"line_number":10,"context_line":"# distributed under the License is distributed on an \"AS IS\" BASIS,"},{"line_number":11,"context_line":"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or"}],"source_content_type":"text/x-python","patch_set":28,"id":"da36d5c6_cefef337","line":8,"in_reply_to":"da36d5c6_4862fbae","updated":"2017-02-28 08:32:32.000000000","message":"I will merge storlet_daemon/test_daemon.py to daemon/test_server.py.","commit_id":"f3ee22598de5ec08e2fbe5ed821a40625e2c3810"}]}
