)]}'
{"Engine/swift/storlet_gateway/gateways/docker/gateway.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                raise ValueError(\u0027Mandatory parameter is missing\u0027"},{"line_number":123,"context_line":"                                 \u0027: {0}\u0027.format(md))"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def invocation_flow(self, sreq, file_manager):"},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":"        Entry point for storlet invocation"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_ab2bbc80","line":125,"range":{"start_line":125,"start_character":36,"end_line":125,"end_character":48},"updated":"2016-08-02 10:31:26.000000000","message":"You need to change the inteface of invocation_flow in the other gateway classes","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"37606e24dd84f008492b42bb772b22fdfc90ebab","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                raise ValueError(\u0027Mandatory parameter is missing\u0027"},{"line_number":123,"context_line":"                                 \u0027: {0}\u0027.format(md))"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def invocation_flow(self, sreq, file_manager):"},{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":"        Entry point for storlet invocation"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_e1dd6843","line":125,"range":{"start_line":125,"start_character":36,"end_line":125,"end_character":48},"in_reply_to":"bacf61ea_ab2bbc80","updated":"2016-08-04 05:38:05.000000000","message":"Yup, that is the reason why the functests failed at the gate.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        :param sreq: StorletRequest instance"},{"line_number":130,"context_line":"        :param file_manager: StorletFileManager instance that impelements 3"},{"line_number":131,"context_line":"                             parameters, storlet_manager, dependency_manager"},{"line_number":132,"context_line":"                             and log_manager"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        run_time_sbox \u003d RunTimeSandbox(self.scope, self.sconf, self.logger)"},{"line_number":135,"context_line":"        docker_updated \u003d self.update_docker_container_from_cache(sreq,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_eb13f462","line":132,"range":{"start_line":131,"start_character":41,"end_line":132,"end_character":44},"updated":"2016-08-02 10:31:26.000000000","message":"If we do not have the base class definition for file_manager, we need to document the interface of these three functions at somewhere in gateway module. IMO.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1b0681a3ba33f7b8d085184175f76b13e3937d08","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        :param sreq: StorletRequest instance"},{"line_number":130,"context_line":"        :param file_manager: StorletFileManager instance that impelements 3"},{"line_number":131,"context_line":"                             parameters, storlet_manager, dependency_manager"},{"line_number":132,"context_line":"                             and log_manager"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        run_time_sbox \u003d RunTimeSandbox(self.scope, self.sconf, self.logger)"},{"line_number":135,"context_line":"        docker_updated \u003d self.update_docker_container_from_cache(sreq,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_64b69cdd","line":132,"range":{"start_line":131,"start_character":41,"end_line":132,"end_character":44},"in_reply_to":"bacf61ea_41c0b42a","updated":"2016-08-04 08:47:13.000000000","message":"I\u0027m currently worry about the interface of these methods, get_file and write_file.\n\nIMO We need to describe not only names of these methods, but also their interfaces(param, returns), and wondering about what is the reasonable way...","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"37606e24dd84f008492b42bb772b22fdfc90ebab","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        :param sreq: StorletRequest instance"},{"line_number":130,"context_line":"        :param file_manager: StorletFileManager instance that impelements 3"},{"line_number":131,"context_line":"                             parameters, storlet_manager, dependency_manager"},{"line_number":132,"context_line":"                             and log_manager"},{"line_number":133,"context_line":"        \"\"\""},{"line_number":134,"context_line":"        run_time_sbox \u003d RunTimeSandbox(self.scope, self.sconf, self.logger)"},{"line_number":135,"context_line":"        docker_updated \u003d self.update_docker_container_from_cache(sreq,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_41c0b42a","line":132,"range":{"start_line":131,"start_character":41,"end_line":132,"end_character":44},"in_reply_to":"bacf61ea_eb13f462","updated":"2016-08-04 05:38:05.000000000","message":"Might be true but right now it seems overkill to me because we don\u0027t have the plan for any other managers right now. And if we make the abstraction in gateway/common, we also need docs about like \"How to develop a your own custom FileManager\", right?\n\nSo it may be better to add some docs to current StorletFileManager class like:\n\n- If you want to make a custom FileManager for your strolets cluster, you need to define 3 parameters as storlet_manager, dependency_manager, and log_manager which implements 2 methods \"get_file\" and \"write_file\".\n\nDoes it fit to your thought?","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        # If the cache needs to be updated, then get on with it"},{"line_number":200,"context_line":"        # bring the object from storge"},{"line_number":201,"context_line":"        file_like_iter \u003d manager.get_file(os.path.basename(cache_file))"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        # TODO(takashi): Do not directly write to target path"},{"line_number":204,"context_line":"        with open(cache_file, \u0027w\u0027) as fn:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_cbeb9011","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":22},"updated":"2016-08-02 10:31:26.000000000","message":"gateway module does not care that is is FileLikeIterator, but only requires it has a same interface as FileObject.\n\nHow about renaming this as something like fobj.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1b0681a3ba33f7b8d085184175f76b13e3937d08","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        # If the cache needs to be updated, then get on with it"},{"line_number":200,"context_line":"        # bring the object from storge"},{"line_number":201,"context_line":"        file_like_iter \u003d manager.get_file(os.path.basename(cache_file))"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        # TODO(takashi): Do not directly write to target path"},{"line_number":204,"context_line":"        with open(cache_file, \u0027w\u0027) as fn:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_c459485d","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":22},"in_reply_to":"bacf61ea_76ff7901","updated":"2016-08-04 08:47:13.000000000","message":"when you use fobj as its name, you need to care about the permission value.\n\nIf you assume to use just FileObject, you need to check if the instance has permission value, with hasattr. If you assume to use something like StorletFileObject, which also has permission value, something like stfobj is better.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"37606e24dd84f008492b42bb772b22fdfc90ebab","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        # If the cache needs to be updated, then get on with it"},{"line_number":200,"context_line":"        # bring the object from storge"},{"line_number":201,"context_line":"        file_like_iter \u003d manager.get_file(os.path.basename(cache_file))"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        # TODO(takashi): Do not directly write to target path"},{"line_number":204,"context_line":"        with open(cache_file, \u0027w\u0027) as fn:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_76ff7901","line":201,"range":{"start_line":201,"start_character":8,"end_line":201,"end_character":22},"in_reply_to":"bacf61ea_cbeb9011","updated":"2016-08-04 05:38:05.000000000","message":"Ah, ok. that\u0027s correct will fix.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                dependency_file \u003d os.path.join(cache_dir, dep)"},{"line_number":307,"context_line":"                file_in_docker_path \u003d os.path.join(docker_storlet_path, dep)"},{"line_number":308,"context_line":"                need_to_update \u003d self.need_update_cache_or_docker("},{"line_number":309,"context_line":"                    dependency_file, file_in_docker_path, storlet_timestamp,"},{"line_number":310,"context_line":"                    storlet_size)"},{"line_number":311,"context_line":"                if need_to_update:"},{"line_number":312,"context_line":"                    self.bring_from_cache("}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_cbd5501c","line":309,"range":{"start_line":309,"start_character":58,"end_line":309,"end_character":75},"updated":"2016-08-02 10:31:26.000000000","message":"We can\u0027t use storlet_timestamp here.\n\nIt is a time stamp of storlet file, not of dependency file.\nWe need to head the dependency object, if we try to check whether we need to update it.\n\nNOTE: In swift, we head a storlet file in the first step of request handling, so we can get metadata about the storlet file without requesting again to swift.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1b0681a3ba33f7b8d085184175f76b13e3937d08","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                dependency_file \u003d os.path.join(cache_dir, dep)"},{"line_number":307,"context_line":"                file_in_docker_path \u003d os.path.join(docker_storlet_path, dep)"},{"line_number":308,"context_line":"                need_to_update \u003d self.need_update_cache_or_docker("},{"line_number":309,"context_line":"                    dependency_file, file_in_docker_path, storlet_timestamp,"},{"line_number":310,"context_line":"                    storlet_size)"},{"line_number":311,"context_line":"                if need_to_update:"},{"line_number":312,"context_line":"                    self.bring_from_cache("}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_e768cebc","line":309,"range":{"start_line":309,"start_character":58,"end_line":309,"end_character":75},"in_reply_to":"bacf61ea_c9c5ea3d","updated":"2016-08-04 08:47:13.000000000","message":"As you already noticed, previously we checked timestamp and size only for storlet.\nWhen handling dependency, we only update it when we detect any updates about storlet file, and does not check timestamp/size when updating it.\n(This is partially described in https://bugs.launchpad.net/storlets/+bug/1525768 )\n\nIMO we can improve this somehow.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"37606e24dd84f008492b42bb772b22fdfc90ebab","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                dependency_file \u003d os.path.join(cache_dir, dep)"},{"line_number":307,"context_line":"                file_in_docker_path \u003d os.path.join(docker_storlet_path, dep)"},{"line_number":308,"context_line":"                need_to_update \u003d self.need_update_cache_or_docker("},{"line_number":309,"context_line":"                    dependency_file, file_in_docker_path, storlet_timestamp,"},{"line_number":310,"context_line":"                    storlet_size)"},{"line_number":311,"context_line":"                if need_to_update:"},{"line_number":312,"context_line":"                    self.bring_from_cache("}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_c9c5ea3d","line":309,"range":{"start_line":309,"start_character":58,"end_line":309,"end_character":75},"in_reply_to":"bacf61ea_cbd5501c","updated":"2016-08-04 05:38:05.000000000","message":"Great catch for this. I\u0027m wondering how previous storlets find the timestamp...oh, is it nothing to check[1], right?\n\nThe timestamp check only happens when is_storlet \u003d\u003d True, hah, this is absolutely side benefit on this cleanup.\n\nWill consider what we should do this.\n\n1: https://review.openstack.org/#/c/349834/1/Engine/swift/storlet_gateway/gateways/docker/gateway.py@a207","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                file_in_docker_path \u003d os.path.join(docker_storlet_path, dep)"},{"line_number":308,"context_line":"                need_to_update \u003d self.need_update_cache_or_docker("},{"line_number":309,"context_line":"                    dependency_file, file_in_docker_path, storlet_timestamp,"},{"line_number":310,"context_line":"                    storlet_size)"},{"line_number":311,"context_line":"                if need_to_update:"},{"line_number":312,"context_line":"                    self.bring_from_cache("},{"line_number":313,"context_line":"                        sreq, dependency_file, file_in_docker_path,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_4bea00dc","line":310,"range":{"start_line":310,"start_character":19,"end_line":310,"end_character":32},"updated":"2016-08-02 10:31:26.000000000","message":"ditto","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"}],"Engine/swift/storlet_middleware/handlers/base.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            _, headers, data_iter \u003d self._internal_client.get_object("},{"line_number":91,"context_line":"                self.account, self.container, obj)"},{"line_number":92,"context_line":"        except UnexpectedResponse:"},{"line_number":93,"context_line":"            # TODO(kota_): do we need to log here? IMO, that should be in"},{"line_number":94,"context_line":"            #              caller"},{"line_number":95,"context_line":"            raise FileManagementError(\u0027get_object from swift failed\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        permission \u003d headers.get("}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_6bd544e3","line":94,"range":{"start_line":93,"start_character":12,"end_line":94,"end_character":33},"updated":"2016-08-02 10:31:26.000000000","message":"We need logging here, because we can\u0027t record the traceback of raised UnexpectedResponse outside this function.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"37606e24dd84f008492b42bb772b22fdfc90ebab","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            _, headers, data_iter \u003d self._internal_client.get_object("},{"line_number":91,"context_line":"                self.account, self.container, obj)"},{"line_number":92,"context_line":"        except UnexpectedResponse:"},{"line_number":93,"context_line":"            # TODO(kota_): do we need to log here? IMO, that should be in"},{"line_number":94,"context_line":"            #              caller"},{"line_number":95,"context_line":"            raise FileManagementError(\u0027get_object from swift failed\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        permission \u003d headers.get("}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_8c7f8065","line":94,"range":{"start_line":93,"start_character":12,"end_line":94,"end_character":33},"in_reply_to":"bacf61ea_6bd544e3","updated":"2016-08-04 05:38:05.000000000","message":"Gotcha. But if we want to the resp and its status code, it might be better to add repr into FileManagementError message. i.e. likely\n\n except UnexpectedResponse:\n   raise FileManagementError(\u0027get_object from swift failed: %s\u0027 % repr(e)","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1b0681a3ba33f7b8d085184175f76b13e3937d08","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            _, headers, data_iter \u003d self._internal_client.get_object("},{"line_number":91,"context_line":"                self.account, self.container, obj)"},{"line_number":92,"context_line":"        except UnexpectedResponse:"},{"line_number":93,"context_line":"            # TODO(kota_): do we need to log here? IMO, that should be in"},{"line_number":94,"context_line":"            #              caller"},{"line_number":95,"context_line":"            raise FileManagementError(\u0027get_object from swift failed\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        permission \u003d headers.get("}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_a75896fb","line":94,"range":{"start_line":93,"start_character":12,"end_line":94,"end_character":33},"in_reply_to":"bacf61ea_8c7f8065","updated":"2016-08-04 08:47:13.000000000","message":"+1. seems better","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            raise FileManagementError(\u0027get_object from swift failed\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        permission \u003d headers.get("},{"line_number":98,"context_line":"            \u0027X-Object-Meta-Storlet-Dependency-Permissions\u0027, \u00270600\u0027)"},{"line_number":99,"context_line":"        return StorletFileLikeIter(data_iter, permission)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def write_file(self, fobj, obj):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_ebe814b5","line":98,"range":{"start_line":98,"start_character":13,"end_line":98,"end_character":57},"updated":"2016-08-02 10:31:26.000000000","message":"This meta key is specific to dependency file, so should not be coded inside SwiftFileManager","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1b0681a3ba33f7b8d085184175f76b13e3937d08","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            raise FileManagementError(\u0027get_object from swift failed\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        permission \u003d headers.get("},{"line_number":98,"context_line":"            \u0027X-Object-Meta-Storlet-Dependency-Permissions\u0027, \u00270600\u0027)"},{"line_number":99,"context_line":"        return StorletFileLikeIter(data_iter, permission)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def write_file(self, fobj, obj):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_e7728e7b","line":98,"range":{"start_line":98,"start_character":13,"end_line":98,"end_character":57},"in_reply_to":"bacf61ea_ccbfb8fa","updated":"2016-08-04 08:47:13.000000000","message":"+1","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"37606e24dd84f008492b42bb772b22fdfc90ebab","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            raise FileManagementError(\u0027get_object from swift failed\u0027)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        permission \u003d headers.get("},{"line_number":98,"context_line":"            \u0027X-Object-Meta-Storlet-Dependency-Permissions\u0027, \u00270600\u0027)"},{"line_number":99,"context_line":"        return StorletFileLikeIter(data_iter, permission)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def write_file(self, fobj, obj):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_ccbfb8fa","line":98,"range":{"start_line":98,"start_character":13,"end_line":98,"end_character":57},"in_reply_to":"bacf61ea_ebe814b5","updated":"2016-08-04 05:38:05.000000000","message":"Exactly, probably it should be specified from caller at init.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            \u0027X-Object-Meta-Storlet-Dependency-Permissions\u0027, \u00270600\u0027)"},{"line_number":99,"context_line":"        return StorletFileLikeIter(data_iter, permission)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def write_file(self, fobj, obj):"},{"line_number":102,"context_line":"        \"\"\""},{"line_number":103,"context_line":"        :param fobj: File object to read object\u0027s content from"},{"line_number":104,"context_line":"        :param obj: a string of object name"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_4b984078","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":13},"updated":"2016-08-02 10:31:26.000000000","message":"if we use \u0027get\u0027 for read function, write function should be named as \u0027put\u0027","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"37606e24dd84f008492b42bb772b22fdfc90ebab","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            \u0027X-Object-Meta-Storlet-Dependency-Permissions\u0027, \u00270600\u0027)"},{"line_number":99,"context_line":"        return StorletFileLikeIter(data_iter, permission)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def write_file(self, fobj, obj):"},{"line_number":102,"context_line":"        \"\"\""},{"line_number":103,"context_line":"        :param fobj: File object to read object\u0027s content from"},{"line_number":104,"context_line":"        :param obj: a string of object name"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_4ce0e8cc","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":13},"in_reply_to":"bacf61ea_4b984078","updated":"2016-08-04 05:38:05.000000000","message":"That comes from context difference between get_file and write_file. get_file is expected to return a file object but write_file is taking complete operation to read from the file object and write the data to fobj path.\n\nIn my thought, put_file sounds like saying \"hey please move this file to there\" so it will take path strings for both of src and dest. i.e. we need to change the args like:\n\n def put_file(self, src_path, dest_path):\n   with open(src_path) as src_file:\n     self.write_file(dest_path, src_file)\n\nThough, I will reconsider the arg name, I don\u0027t think we should change the name casually.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"1b0681a3ba33f7b8d085184175f76b13e3937d08","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            \u0027X-Object-Meta-Storlet-Dependency-Permissions\u0027, \u00270600\u0027)"},{"line_number":99,"context_line":"        return StorletFileLikeIter(data_iter, permission)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def write_file(self, fobj, obj):"},{"line_number":102,"context_line":"        \"\"\""},{"line_number":103,"context_line":"        :param fobj: File object to read object\u0027s content from"},{"line_number":104,"context_line":"        :param obj: a string of object name"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_8744721b","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":13},"in_reply_to":"bacf61ea_4ce0e8cc","updated":"2016-08-04 08:47:13.000000000","message":"will wait for your update.\n\nCurrently, it looks not so odd to use put_file for me, because we get a file object in get function, while we pass a file object to put func.","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4920ef7ed44037bd4a5de2a980dca7ca5978b251","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            self._internal_client.upload_object("},{"line_number":109,"context_line":"                fobj, self.account, self.container, obj)"},{"line_number":110,"context_line":"        except UnexpectedResponse:"},{"line_number":111,"context_line":"            # TODO(kota_): do we need to log here? IMO, that should be in"},{"line_number":112,"context_line":"            #              caller"},{"line_number":113,"context_line":"            raise FileManagementError(\u0027upload_object to swift failed\u0027)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_6ba704a7","line":112,"range":{"start_line":111,"start_character":0,"end_line":112,"end_character":33},"updated":"2016-08-02 10:31:26.000000000","message":"ditto","commit_id":"841b4d41df7fe28f66c2fe85dc72dac9c75360cc"}]}
