)]}'
{"Engine/swift/storlet_gateway/storlet_docker_gateway.py":[{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"10ab06651d69a85e6b0f87559735a1282d6c33f5","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        resp \u003d storlet_req.get_response(self.app)"},{"line_number":334,"context_line":"        if not resp.is_success:"},{"line_number":335,"context_line":"            # NOTE: To dig more deelpy, remove the handling for now"},{"line_number":336,"context_line":"            # if isinstance(resp, Exception):"},{"line_number":337,"context_line":"            #     raise resp"},{"line_number":338,"context_line":"            # else:"},{"line_number":339,"context_line":"            #    raise HTTPUnauthorized(str(resp.status_int))"},{"line_number":340,"context_line":"            raise HTTPUnauthorized(\u0027Account disabled for storlets\u0027,"},{"line_number":341,"context_line":"                                   request\u003dreq)"},{"line_number":342,"context_line":"        return resp.headers"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_7b47991d","line":339,"range":{"start_line":335,"start_character":0,"end_line":339,"end_character":61},"updated":"2016-02-04 08:44:26.000000000","message":"Theses comments should be removed at last.","commit_id":"7e7fcd36fd5785cff58e75ad00223c523d3cc7da"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"f09161b53691861dec82b23896f47af9cea92346","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        resp \u003d storlet_req.get_response(self.app)"},{"line_number":334,"context_line":"        if not resp.is_success:"},{"line_number":335,"context_line":"            # NOTE: To dig more deelpy, remove the handling for now"},{"line_number":336,"context_line":"            # if isinstance(resp, Exception):"},{"line_number":337,"context_line":"            #     raise resp"},{"line_number":338,"context_line":"            # else:"},{"line_number":339,"context_line":"            #    raise HTTPUnauthorized(str(resp.status_int))"},{"line_number":340,"context_line":"            raise HTTPUnauthorized(\u0027Account disabled for storlets\u0027,"},{"line_number":341,"context_line":"                                   request\u003dreq)"},{"line_number":342,"context_line":"        return resp.headers"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_fbbf095e","line":339,"range":{"start_line":335,"start_character":0,"end_line":339,"end_character":61},"in_reply_to":"5a5ae5dd_7b47991d","updated":"2016-02-04 08:57:56.000000000","message":"Done","commit_id":"7e7fcd36fd5785cff58e75ad00223c523d3cc7da"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"c022ed4d415676ef1264f9c7de4efae69b826c33","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    gatewayObjectGetFlow"},{"line_number":52,"context_line":"    gatewayProxyPutFlow"},{"line_number":53,"context_line":"    gatewayProxyGetFlow"},{"line_number":54,"context_line":"3) parse_gateway_conf parses the docker gateway specific configuration. While"},{"line_number":55,"context_line":"    it is part of the API, it is implemented as a static method as the parsing"},{"line_number":56,"context_line":"    of the configuration takes place before the StorletGateway is instantiated"},{"line_number":57,"context_line":"---------------------------------------------------------------------------\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_7880cdc0","line":54,"updated":"2016-02-05 02:02:25.000000000","message":"Unexpected \u0027(\u0027 deletion, will fix.","commit_id":"65a704bea00a42429d8c771714111ca3e46f9fa8"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                                                     sprotocol._cancel)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _verify_access(self, req, version, account, container, object):"},{"line_number":315,"context_line":"        self.logger.info(\u0027Verify access to {0}/{1}/{2}\u0027.format(account,"},{"line_number":316,"context_line":"                                                               container,"},{"line_number":317,"context_line":"                                                               object))"},{"line_number":318,"context_line":"        new_env \u003d dict(req.environ)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_dde413ad","line":315,"updated":"2016-02-07 10:19:26.000000000","message":"Let\u0027s move the log to debug","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                                                     sprotocol._cancel)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def _verify_access(self, req, version, account, container, object):"},{"line_number":315,"context_line":"        self.logger.info(\u0027Verify access to {0}/{1}/{2}\u0027.format(account,"},{"line_number":316,"context_line":"                                                               container,"},{"line_number":317,"context_line":"                                                               object))"},{"line_number":318,"context_line":"        new_env \u003d dict(req.environ)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_bab270e3","line":315,"in_reply_to":"5a5ae5dd_dde413ad","updated":"2016-02-08 02:08:27.000000000","message":"Will do in follow up :-)","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        path \u003d os.path.join(\u0027/\u0027 + version, account,"},{"line_number":327,"context_line":"                            container, object)"},{"line_number":328,"context_line":"        storlet_req \u003d make_subrequest("},{"line_number":329,"context_line":"            new_env, \u0027HEAD\u0027, path,"},{"line_number":330,"context_line":"            headers\u003d{\u0027X-Auth-Token\u0027: req.headers.get(\u0027X-Auth-Token\u0027)},"},{"line_number":331,"context_line":"            swift_source\u003d\u0027SE\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_9df1bb6d","line":328,"updated":"2016-02-07 10:19:26.000000000","message":"Nice cleanup!","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":334,"context_line":"        if not resp.is_success:"},{"line_number":335,"context_line":"            # TODO(takashi): Can we make this message more clear"},{"line_number":336,"context_line":"            #                to tell what\u0027s happening?"},{"line_number":337,"context_line":"            raise HTTPUnauthorized(\u0027Account disabled for storlets\u0027,"},{"line_number":338,"context_line":"                                   request\u003dreq)"},{"line_number":339,"context_line":"        return resp.headers"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_3d01a738","line":337,"updated":"2016-02-07 10:19:26.000000000","message":"Agree with Takashi. How about.\n\u0027Storlet execution authorization failed\u0027","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":334,"context_line":"        if not resp.is_success:"},{"line_number":335,"context_line":"            # TODO(takashi): Can we make this message more clear"},{"line_number":336,"context_line":"            #                to tell what\u0027s happening?"},{"line_number":337,"context_line":"            raise HTTPUnauthorized(\u0027Account disabled for storlets\u0027,"},{"line_number":338,"context_line":"                                   request\u003dreq)"},{"line_number":339,"context_line":"        return resp.headers"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_dae08ccf","line":337,"in_reply_to":"5a5ae5dd_3d01a738","updated":"2016-02-08 02:08:27.000000000","message":"This statements can include other failure cases like \u0027503 Service Unavailable\u0027 or \u0027400 Bad Request\u0027 which are unexpected for the message.\n\nSo from my perspective, we need more concrete exception handlings for any failure cases, though it seems future work.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"}],"Engine/swift/storlet_middleware/storlet_handler.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d55eaff49899158de24896dc4c5960d1d821dd2","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class BaseStorletHandler(object):"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    This is a abstract handler for Proxy/Object Server middleware"},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    def __init__(self, request, conf, app, logger):"},{"line_number":40,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_9f3158ef","line":37,"range":{"start_line":37,"start_character":12,"end_line":37,"end_character":13},"updated":"2016-02-03 10:59:03.000000000","message":"an","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"405684a491c867f00c2833f16e504d5bb47cbdd2","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class BaseStorletHandler(object):"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    This is a abstract handler for Proxy/Object Server middleware"},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    def __init__(self, request, conf, app, logger):"},{"line_number":40,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_7619fe78","line":37,"range":{"start_line":37,"start_character":12,"end_line":37,"end_character":13},"in_reply_to":"5a5ae5dd_9f3158ef","updated":"2016-02-04 01:51:41.000000000","message":"Done","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"44bffa9fdbcbfe65d30781110454dd0aa3f25509","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    @property"},{"line_number":80,"context_line":"    def is_storlet_object_request(self):"},{"line_number":81,"context_line":"        _, _, container, obj \u003d self.get_vaco()"},{"line_number":82,"context_line":"        return container in self.storlet_containers and obj"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @property"},{"line_number":85,"context_line":"    def is_range_request(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_7047c64b","line":82,"range":{"start_line":82,"start_character":56,"end_line":82,"end_character":59},"updated":"2016-02-04 01:10:43.000000000","message":"This checking is also done in get_vaco, but makes it clear that the request path should indicate object.","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"44bffa9fdbcbfe65d30781110454dd0aa3f25509","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def is_slo_response(self, resp):"},{"line_number":92,"context_line":"        _, account, container, obj \u003d self.get_vaco()"},{"line_number":93,"context_line":"        self.logger.info("},{"line_number":94,"context_line":"            \u0027Verify if {0}/{1}/{2} is an SLO assembly object\u0027.format("},{"line_number":95,"context_line":"                account, container, obj))"},{"line_number":96,"context_line":"        is_slo \u003d \u0027X-Static-Large-Object\u0027 in resp.headers"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_b0477e1c","line":93,"range":{"start_line":93,"start_character":20,"end_line":93,"end_character":24},"updated":"2016-02-04 01:10:43.000000000","message":"We should change this log level to debug. It generates too many logs in proxy-server logs.","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"82bc5368ee1546f23a0da3e39a988138003a3480","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def is_slo_response(self, resp):"},{"line_number":92,"context_line":"        _, account, container, obj \u003d self.get_vaco()"},{"line_number":93,"context_line":"        self.logger.info("},{"line_number":94,"context_line":"            \u0027Verify if {0}/{1}/{2} is an SLO assembly object\u0027.format("},{"line_number":95,"context_line":"                account, container, obj))"},{"line_number":96,"context_line":"        is_slo \u003d \u0027X-Static-Large-Object\u0027 in resp.headers"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_16752a97","line":93,"range":{"start_line":93,"start_character":20,"end_line":93,"end_character":24},"in_reply_to":"5a5ae5dd_b0477e1c","updated":"2016-02-04 02:02:13.000000000","message":"＋１","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"44bffa9fdbcbfe65d30781110454dd0aa3f25509","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            self.logger.info(\u0027{0}/{1}/{2} is indeed an SLO assembly \u0027"},{"line_number":99,"context_line":"                             \u0027object\u0027.format(account, container, obj))"},{"line_number":100,"context_line":"        else:"},{"line_number":101,"context_line":"            self.logger.info(\u0027{0}/{1}/{2} is NOT an SLO assembly object\u0027."},{"line_number":102,"context_line":"                             format(account, container, obj))"},{"line_number":103,"context_line":"        return is_slo"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_b0c69e47","line":101,"range":{"start_line":101,"start_character":24,"end_line":101,"end_character":28},"updated":"2016-02-04 01:10:43.000000000","message":"ditto","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"44bffa9fdbcbfe65d30781110454dd0aa3f25509","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def apply_storlet(self, resp):"},{"line_number":121,"context_line":"        _, _, container, obj \u003d self.get_vaco()"},{"line_number":122,"context_line":"        (out_md, app_iter) \u003d self.gateway.gatewayProxyGetFlow("},{"line_number":123,"context_line":"            self.request, container, obj, resp)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # TODO(kota_): make sure why we need new request instance?"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_d00f9adf","line":122,"range":{"start_line":122,"start_character":42,"end_line":122,"end_character":61},"updated":"2016-02-04 01:10:43.000000000","message":"This should be fixed. We should switch the called functions, according to request method and execution_server.","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4ae809e498de317fe54e4b22ce8db635bc56cb08","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def apply_storlet(self, resp):"},{"line_number":121,"context_line":"        _, _, container, obj \u003d self.get_vaco()"},{"line_number":122,"context_line":"        (out_md, app_iter) \u003d self.gateway.gatewayProxyGetFlow("},{"line_number":123,"context_line":"            self.request, container, obj, resp)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # TODO(kota_): make sure why we need new request instance?"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_d3b004e0","line":122,"range":{"start_line":122,"start_character":42,"end_line":122,"end_character":61},"in_reply_to":"5a5ae5dd_d00f9adf","updated":"2016-02-04 01:30:22.000000000","message":"Done","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"44bffa9fdbcbfe65d30781110454dd0aa3f25509","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        (out_md, app_iter) \u003d self.gateway.gatewayProxyGetFlow("},{"line_number":123,"context_line":"            self.request, container, obj, resp)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # TODO(kota_): make sure why we need new request instance?"},{"line_number":126,"context_line":"        old_env \u003d self.request.environ.copy()"},{"line_number":127,"context_line":"        orig_req \u003d Request.blank(old_env[\u0027PATH_INFO\u0027],"},{"line_number":128,"context_line":"                                 old_env)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_308cee34","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":66},"updated":"2016-02-04 01:10:43.000000000","message":"Now I need some more deepdive, but I suppose that is because the original request is overwritten by instance in gatewaymodule to request about storlet objects(like jar files).\n\nIf it is true, we should change it to make gatewaymodule use a copied instance.","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"44bffa9fdbcbfe65d30781110454dd0aa3f25509","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        _, account, container, obj \u003d self.get_vaco()"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        # not sure manifest file should not be run with storlet"},{"line_number":275,"context_line":"        not_runnable \u003d any("},{"line_number":276,"context_line":"            [self.is_range_request, self.is_slo_get_request,"},{"line_number":277,"context_line":"             self.conf[\u0027storlet_execute_on_proxy_only\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_10d4521e","line":274,"range":{"start_line":274,"start_character":8,"end_line":274,"end_character":63},"updated":"2016-02-04 01:10:43.000000000","message":"This may be TODO stuff, right?","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4ae809e498de317fe54e4b22ce8db635bc56cb08","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        _, account, container, obj \u003d self.get_vaco()"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"        # not sure manifest file should not be run with storlet"},{"line_number":275,"context_line":"        not_runnable \u003d any("},{"line_number":276,"context_line":"            [self.is_range_request, self.is_slo_get_request,"},{"line_number":277,"context_line":"             self.conf[\u0027storlet_execute_on_proxy_only\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_b3c6a847","line":274,"range":{"start_line":274,"start_character":8,"end_line":274,"end_character":63},"in_reply_to":"5a5ae5dd_10d4521e","updated":"2016-02-04 01:30:22.000000000","message":"Done\n\nI made this TODO assigned to me.","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"44bffa9fdbcbfe65d30781110454dd0aa3f25509","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        self.stimeout \u003d int(storlet_conf.get(\u0027storlet_timeout\u0027))"},{"line_number":305,"context_line":"        self.storlet_containers \u003d [storlet_conf.get(\u0027storlet_container\u0027),"},{"line_number":306,"context_line":"                                   storlet_conf.get(\u0027storlet_dependency\u0027)]"},{"line_number":307,"context_line":"        self.exec_server \u003d storlet_conf.get(\u0027execution_server\u0027)"},{"line_number":308,"context_line":"        if self.exec_server \u003d\u003d \u0027proxy\u0027:"},{"line_number":309,"context_line":"            self.handler_class \u003d StorletProxyHandler"},{"line_number":310,"context_line":"        elif self.exec_server \u003d\u003d \u0027object\u0027:"},{"line_number":311,"context_line":"            self.handler_class \u003d StorletObjectHandler"},{"line_number":312,"context_line":"        else:"},{"line_number":313,"context_line":"            raise Exception("},{"line_number":314,"context_line":"                \u0027execution_server is supported only either proxy or object\u0027)"},{"line_number":315,"context_line":"        self.gateway_module \u003d storlet_conf[\u0027gateway_module\u0027]"},{"line_number":316,"context_line":"        self.proxy_only_storlet_execution \u003d \\"},{"line_number":317,"context_line":"            storlet_conf[\u0027storlet_execute_on_proxy_only\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_70190679","line":314,"range":{"start_line":307,"start_character":27,"end_line":314,"end_character":76},"updated":"2016-02-04 01:10:43.000000000","message":"This is a very good refactoring!\nWe can refactor this by creating a generator factrion. which makes testing easy.","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4ae809e498de317fe54e4b22ce8db635bc56cb08","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        self.stimeout \u003d int(storlet_conf.get(\u0027storlet_timeout\u0027))"},{"line_number":305,"context_line":"        self.storlet_containers \u003d [storlet_conf.get(\u0027storlet_container\u0027),"},{"line_number":306,"context_line":"                                   storlet_conf.get(\u0027storlet_dependency\u0027)]"},{"line_number":307,"context_line":"        self.exec_server \u003d storlet_conf.get(\u0027execution_server\u0027)"},{"line_number":308,"context_line":"        if self.exec_server \u003d\u003d \u0027proxy\u0027:"},{"line_number":309,"context_line":"            self.handler_class \u003d StorletProxyHandler"},{"line_number":310,"context_line":"        elif self.exec_server \u003d\u003d \u0027object\u0027:"},{"line_number":311,"context_line":"            self.handler_class \u003d StorletObjectHandler"},{"line_number":312,"context_line":"        else:"},{"line_number":313,"context_line":"            raise Exception("},{"line_number":314,"context_line":"                \u0027execution_server is supported only either proxy or object\u0027)"},{"line_number":315,"context_line":"        self.gateway_module \u003d storlet_conf[\u0027gateway_module\u0027]"},{"line_number":316,"context_line":"        self.proxy_only_storlet_execution \u003d \\"},{"line_number":317,"context_line":"            storlet_conf[\u0027storlet_execute_on_proxy_only\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_93cb6c53","line":314,"range":{"start_line":307,"start_character":27,"end_line":314,"end_character":76},"in_reply_to":"5a5ae5dd_70190679","updated":"2016-02-04 01:30:22.000000000","message":"Done","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"44bffa9fdbcbfe65d30781110454dd0aa3f25509","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        try:"},{"line_number":323,"context_line":"            request_handler \u003d self.handler_class("},{"line_number":324,"context_line":"                req, self.gateway_conf, self.app, self.logger)"},{"line_number":325,"context_line":"            _, account, container, obj \u003d request_handler.get_vaco()"},{"line_number":326,"context_line":"            self.logger.debug(\u0027storlet_handler call in %s: with %s/%s/%s\u0027 %"},{"line_number":327,"context_line":"                              (self.exec_server, account, container, obj))"},{"line_number":328,"context_line":"        except HTTPException:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_ed3e7dd9","line":325,"range":{"start_line":325,"start_character":11,"end_line":325,"end_character":67},"updated":"2016-02-04 01:10:43.000000000","message":"get_vaco is called may time. We can improve this.","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"82bc5368ee1546f23a0da3e39a988138003a3480","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        try:"},{"line_number":323,"context_line":"            request_handler \u003d self.handler_class("},{"line_number":324,"context_line":"                req, self.gateway_conf, self.app, self.logger)"},{"line_number":325,"context_line":"            _, account, container, obj \u003d request_handler.get_vaco()"},{"line_number":326,"context_line":"            self.logger.debug(\u0027storlet_handler call in %s: with %s/%s/%s\u0027 %"},{"line_number":327,"context_line":"                              (self.exec_server, account, container, obj))"},{"line_number":328,"context_line":"        except HTTPException:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_76301ee9","line":325,"range":{"start_line":325,"start_character":11,"end_line":325,"end_character":67},"in_reply_to":"5a5ae5dd_ed3e7dd9","updated":"2016-02-04 02:02:13.000000000","message":"Exactly, that is too annoying for me :/\n\nI think we should also consider the args in gateway module, though.","commit_id":"51a21cffbc79773ab46fb03d3818edce8f9e6f38"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"10ab06651d69a85e6b0f87559735a1282d6c33f5","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                resp \u003d getattr(self, self.request.method)()"},{"line_number":193,"context_line":"                return resp"},{"line_number":194,"context_line":"            else:"},{"line_number":195,"context_line":"                raise HTTPMethodNotAllowed(req\u003dself.request)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def _call_gateway(self, resp):"},{"line_number":198,"context_line":"        _, _, container, obj \u003d self.get_vaco()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_fbd3895d","line":195,"range":{"start_line":195,"start_character":16,"end_line":195,"end_character":60},"updated":"2016-02-04 08:44:26.000000000","message":"s/req\u003d/request\u003d/","commit_id":"7e7fcd36fd5785cff58e75ad00223c523d3cc7da"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"f09161b53691861dec82b23896f47af9cea92346","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                resp \u003d getattr(self, self.request.method)()"},{"line_number":193,"context_line":"                return resp"},{"line_number":194,"context_line":"            else:"},{"line_number":195,"context_line":"                raise HTTPMethodNotAllowed(req\u003dself.request)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def _call_gateway(self, resp):"},{"line_number":198,"context_line":"        _, _, container, obj \u003d self.get_vaco()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a5ae5dd_bbb9917b","line":195,"range":{"start_line":195,"start_character":16,"end_line":195,"end_character":60},"in_reply_to":"5a5ae5dd_fbd3895d","updated":"2016-02-04 08:57:56.000000000","message":"Done","commit_id":"7e7fcd36fd5785cff58e75ad00223c523d3cc7da"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"c022ed4d415676ef1264f9c7de4efae69b826c33","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def handle_request(self):"},{"line_number":185,"context_line":"        if self.is_storlet_object_request:"},{"line_number":186,"context_line":"            if self.request.method \u003d\u003d \u0027PUT\u0027:"},{"line_number":187,"context_line":"                self.gateway.validateStorletUpload(self.request)"},{"line_number":188,"context_line":"            return self.request.get_response(self.app)"},{"line_number":189,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_f54a8825","line":186,"updated":"2016-02-05 02:02:25.000000000","message":"Looks like we can define \"is_storlet_object_request\" like as:\n\n  @property\n  def is_storlet_object_request(self):\n      _, _, container, obj \u003d self.get_vaco()\n      return container in self.storlet_containers and obj and self.method \u003d\u003d \u0027PUT\u0027\n\n\n?\n\n\nAnd now, I am realizing is_storlet_object_request is used only in ProxyHandler so let\u0027s move it into ProxyHandler and then no matter the if condition to fit actual usage.","commit_id":"65a704bea00a42429d8c771714111ca3e46f9fa8"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"c8cfb84aeb72a79d9cffdf867b14a198f6b34152","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def handle_request(self):"},{"line_number":185,"context_line":"        if self.is_storlet_object_request:"},{"line_number":186,"context_line":"            if self.request.method \u003d\u003d \u0027PUT\u0027:"},{"line_number":187,"context_line":"                self.gateway.validateStorletUpload(self.request)"},{"line_number":188,"context_line":"            return self.request.get_response(self.app)"},{"line_number":189,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_dbc69b99","line":186,"in_reply_to":"5a5ae5dd_f54a8825","updated":"2016-02-05 02:16:28.000000000","message":"I agree with your idea, Kota.\n\nI also thing we had better rename that func to is_storlet_object_upload to make it clear it deals only with PUT.","commit_id":"65a704bea00a42429d8c771714111ca3e46f9fa8"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def get_vaco(self):"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        Parse method of path from self.request which depends on chiled class"},{"line_number":61,"context_line":"        (Proxy or Object)"},{"line_number":62,"context_line":"        :return tuple: a string tuple of (version, account, container, object)"},{"line_number":63,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_7798986a","line":60,"range":{"start_line":60,"start_character":64,"end_line":60,"end_character":70},"updated":"2016-02-07 10:19:26.000000000","message":"child","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def get_vaco(self):"},{"line_number":59,"context_line":"        \"\"\""},{"line_number":60,"context_line":"        Parse method of path from self.request which depends on chiled class"},{"line_number":61,"context_line":"        (Proxy or Object)"},{"line_number":62,"context_line":"        :return tuple: a string tuple of (version, account, container, object)"},{"line_number":63,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_fae308d7","line":60,"range":{"start_line":60,"start_character":64,"end_line":60,"end_character":70},"in_reply_to":"5a5ae5dd_7798986a","updated":"2016-02-08 02:08:27.000000000","message":"Done","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def is_slo_response(self, resp):"},{"line_number":84,"context_line":"        _, account, container, obj \u003d self.get_vaco()"},{"line_number":85,"context_line":"        self.logger.info("},{"line_number":86,"context_line":"            \u0027Verify if {0}/{1}/{2} is an SLO assembly object\u0027.format("},{"line_number":87,"context_line":"                account, container, obj))"},{"line_number":88,"context_line":"        is_slo \u003d \u0027X-Static-Large-Object\u0027 in resp.headers"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_fd48efb4","line":85,"updated":"2016-02-07 10:19:26.000000000","message":"If cleaning up, lets get rid of this log and make the others debug","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def is_slo_response(self, resp):"},{"line_number":84,"context_line":"        _, account, container, obj \u003d self.get_vaco()"},{"line_number":85,"context_line":"        self.logger.info("},{"line_number":86,"context_line":"            \u0027Verify if {0}/{1}/{2} is an SLO assembly object\u0027.format("},{"line_number":87,"context_line":"                account, container, obj))"},{"line_number":88,"context_line":"        is_slo \u003d \u0027X-Static-Large-Object\u0027 in resp.headers"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_7ad078f6","line":85,"in_reply_to":"5a5ae5dd_fd48efb4","updated":"2016-02-08 02:08:27.000000000","message":"Yup, replace with debug later :-)","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    def apply_storlet(self, resp):"},{"line_number":120,"context_line":"        outmd, app_iter \u003d self._call_gateway(resp)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # TODO(kota_): make sure why we need new request instance?"},{"line_number":123,"context_line":"        old_env \u003d self.request.environ.copy()"},{"line_number":124,"context_line":"        orig_req \u003d Request.blank(old_env[\u0027PATH_INFO\u0027],"},{"line_number":125,"context_line":"                                 old_env)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_0c2a7790","line":122,"updated":"2016-02-07 10:19:26.000000000","message":"We probably don\u0027t.\nThe following code works well:\n        outmd, app_iter \u003d self._call_gateway(resp)\n\n        # TODO(kota_): make sure why we need new request instance?\n        #old_env \u003d self.request.environ.copy()\n        #orig_req \u003d Request.blank(old_env[\u0027PATH_INFO\u0027],\n        #                         old_env)\n        #resp_headers \u003d resp.headers\n        if \u0027Content-Length\u0027 in resp.headers:\n            resp.headers.pop(\u0027Content-Length\u0027)\n        if \u0027Transfer-Encoding\u0027 in resp.headers:\n            resp.headers.pop(\u0027Transfer-Encoding\u0027)\n        resp.app_iter \u003d app_iter\n        return resp\n        #return Response(app_iter\u003dapp_iter,\n        #                headers\u003dresp_headers,\n        #                request\u003dorig_req,\n        #                conditional_response\u003dTrue)","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    def apply_storlet(self, resp):"},{"line_number":120,"context_line":"        outmd, app_iter \u003d self._call_gateway(resp)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # TODO(kota_): make sure why we need new request instance?"},{"line_number":123,"context_line":"        old_env \u003d self.request.environ.copy()"},{"line_number":124,"context_line":"        orig_req \u003d Request.blank(old_env[\u0027PATH_INFO\u0027],"},{"line_number":125,"context_line":"                                 old_env)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_7af7188b","line":122,"in_reply_to":"5a5ae5dd_0c2a7790","updated":"2016-02-08 02:08:27.000000000","message":"Alright, let\u0027s do so.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        return self.request.split_path(4, 4, rest_with_last\u003dTrue)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def is_proxy_runnable(self, resp):"},{"line_number":164,"context_line":"        if resp.is_success:"},{"line_number":165,"context_line":"            # SLO / proxy only case:"},{"line_number":166,"context_line":"            # storlet to be invoked now at proxy side:"},{"line_number":167,"context_line":"            runnable \u003d any("}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_7725f859","line":164,"updated":"2016-02-07 10:19:26.000000000","message":"How about checking resp.is_success in the calling function (GET,  ~line 223), and upon failure log \u0026 return the response from there.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        return self.request.split_path(4, 4, rest_with_last\u003dTrue)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def is_proxy_runnable(self, resp):"},{"line_number":164,"context_line":"        if resp.is_success:"},{"line_number":165,"context_line":"            # SLO / proxy only case:"},{"line_number":166,"context_line":"            # storlet to be invoked now at proxy side:"},{"line_number":167,"context_line":"            runnable \u003d any("}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_faf4685b","line":164,"in_reply_to":"5a5ae5dd_7725f859","updated":"2016-02-08 02:08:27.000000000","message":"I\u0027m realizing we don\u0027t need the failure log for *SLO specific* failure because it might be just object-server failure in general. I will change the code around here but I\u0027m not sure it would be better for you so please feel free to look at again.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            self.gateway.validateStorletUpload(self.request)"},{"line_number":188,"context_line":"            return self.request.get_response(self.app)"},{"line_number":189,"context_line":"        else:"},{"line_number":190,"context_line":"            # This should be self.is_storlet_execution"},{"line_number":191,"context_line":"            if hasattr(self, self.request.method):"},{"line_number":192,"context_line":"                resp \u003d getattr(self, self.request.method)()"},{"line_number":193,"context_line":"                return resp"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_577b1c28","line":190,"updated":"2016-02-07 10:19:26.000000000","message":"I think we can get rid of this comment: If we are here, we already passed __init__ and so this must be a storlet execution.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            self.gateway.validateStorletUpload(self.request)"},{"line_number":188,"context_line":"            return self.request.get_response(self.app)"},{"line_number":189,"context_line":"        else:"},{"line_number":190,"context_line":"            # This should be self.is_storlet_execution"},{"line_number":191,"context_line":"            if hasattr(self, self.request.method):"},{"line_number":192,"context_line":"                resp \u003d getattr(self, self.request.method)()"},{"line_number":193,"context_line":"                return resp"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_9ae774ab","line":190,"in_reply_to":"5a5ae5dd_577b1c28","updated":"2016-02-08 02:08:27.000000000","message":"Done","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        if self.is_proxy_runnable(original_resp):"},{"line_number":225,"context_line":"            return self.apply_storlet(original_resp)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        elif original_resp.is_success:"},{"line_number":228,"context_line":"            # Non proxy GET case: Storlet was already invoked at"},{"line_number":229,"context_line":"            # object side"},{"line_number":230,"context_line":"            if \u0027Transfer-Encoding\u0027 in original_resp.headers:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_b7a4d0b9","line":227,"updated":"2016-02-07 10:19:26.000000000","message":"Here too, we can use the original response:\ne.g.:\n        elif original_resp.is_success:\n            # Non proxy GET case: Storlet was already invoked at\n            # object side\n            if \u0027Transfer-Encoding\u0027 in original_resp.headers:\n                original_resp.headers.pop(\u0027Transfer-Encoding\u0027)\n            original_resp.headers[\u0027Content-Length\u0027] \u003d None\n            return original_resp","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":224,"context_line":"        if self.is_proxy_runnable(original_resp):"},{"line_number":225,"context_line":"            return self.apply_storlet(original_resp)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        elif original_resp.is_success:"},{"line_number":228,"context_line":"            # Non proxy GET case: Storlet was already invoked at"},{"line_number":229,"context_line":"            # object side"},{"line_number":230,"context_line":"            if \u0027Transfer-Encoding\u0027 in original_resp.headers:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_1afce43c","line":227,"in_reply_to":"5a5ae5dd_b7a4d0b9","updated":"2016-02-08 02:08:27.000000000","message":"Done","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"class StorletObjectHandler(BaseStorletHandler):"},{"line_number":264,"context_line":"    def __init__(self, request, conf, app, logger):"},{"line_number":265,"context_line":"        super(StorletObjectHandler, self).__init__("},{"line_number":266,"context_line":"            request, conf, app, logger)"},{"line_number":267,"context_line":"        # object need the gateway module only execution"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_1db4eb7d","line":264,"updated":"2016-02-07 10:19:26.000000000","message":"Would it make sense to request.split_path here into some self. vars and change get_vaco accordingly?\n\nSame remark for StorletProxyHandler","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"class StorletObjectHandler(BaseStorletHandler):"},{"line_number":264,"context_line":"    def __init__(self, request, conf, app, logger):"},{"line_number":265,"context_line":"        super(StorletObjectHandler, self).__init__("},{"line_number":266,"context_line":"            request, conf, app, logger)"},{"line_number":267,"context_line":"        # object need the gateway module only execution"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_3a8e80d0","line":264,"in_reply_to":"5a5ae5dd_1db4eb7d","updated":"2016-02-08 02:08:27.000000000","message":"That\u0027s what I wanna do in future work. Honesty I don\u0027t like to call self.get_vaco everywhere in Handlers.\n\nHowever, it will need more refactor also StorletGateway. That is why I currently keep this like as is. But good feeling with you :-)","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    def get_vaco(self):"},{"line_number":274,"context_line":"        _, _, acc, cont, obj \u003d self.request.split_path("},{"line_number":275,"context_line":"            5, 5, rest_with_last\u003dTrue)"},{"line_number":276,"context_line":"        # TODO(kota_): make sure why object server api version is 0?"},{"line_number":277,"context_line":"        return (\u00270\u0027, acc, cont, obj)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_9dbf7b60","line":276,"updated":"2016-02-07 10:19:26.000000000","message":"This is probably due to some very ancient poor error handling that we might have used. We should probably parse and return.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":273,"context_line":"    def get_vaco(self):"},{"line_number":274,"context_line":"        _, _, acc, cont, obj \u003d self.request.split_path("},{"line_number":275,"context_line":"            5, 5, rest_with_last\u003dTrue)"},{"line_number":276,"context_line":"        # TODO(kota_): make sure why object server api version is 0?"},{"line_number":277,"context_line":"        return (\u00270\u0027, acc, cont, obj)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_9ab5347f","line":276,"in_reply_to":"5a5ae5dd_9dbf7b60","updated":"2016-02-08 02:08:27.000000000","message":"+1, will do in future work.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            self.request, container, obj, resp)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def GET(self):"},{"line_number":300,"context_line":"        self.logger.info(\u0027GET. Run storlet\u0027)"},{"line_number":301,"context_line":"        orig_resp \u003d self.request.get_response(self.app)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        if not is_success(orig_resp.status_int):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_770e58e6","line":300,"updated":"2016-02-07 10:19:26.000000000","message":"I think we can get rid of the log","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            self.request, container, obj, resp)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def GET(self):"},{"line_number":300,"context_line":"        self.logger.info(\u0027GET. Run storlet\u0027)"},{"line_number":301,"context_line":"        orig_resp \u003d self.request.get_response(self.app)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        if not is_success(orig_resp.status_int):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_5ab49c7e","line":300,"in_reply_to":"5a5ae5dd_770e58e6","updated":"2016-02-08 02:08:27.000000000","message":"Done","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        _, account, container, obj \u003d self.get_vaco()"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        # TODO(takashi): not sure manifest file should not be run with storlet"},{"line_number":309,"context_line":"        not_runnable \u003d any("},{"line_number":310,"context_line":"            [self.is_range_request, self.is_slo_get_request,"},{"line_number":311,"context_line":"             self.conf[\u0027storlet_execute_on_proxy_only\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_0ca59745","line":308,"updated":"2016-02-07 10:19:26.000000000","message":"I agree with Takashi, the below should not check for is_slo_get_request. At least I think that this was the semantics of the previous code (even thought we do not have a test for that): The previous is_SLO_get_request would return true only if it was both a static-large-object response and it was not a multipart-manifest get request.\nSurprisingly as it sounds might be that we do not need the current is_slo_get_request. If we do need it I suggest to rename it to is_multipart_manifest_request","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        _, account, container, obj \u003d self.get_vaco()"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"        # TODO(takashi): not sure manifest file should not be run with storlet"},{"line_number":309,"context_line":"        not_runnable \u003d any("},{"line_number":310,"context_line":"            [self.is_range_request, self.is_slo_get_request,"},{"line_number":311,"context_line":"             self.conf[\u0027storlet_execute_on_proxy_only\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_3a2a0091","line":308,"in_reply_to":"5a5ae5dd_0ca59745","updated":"2016-02-08 02:08:27.000000000","message":"Looks like we need some discussion with Takashi and Eran, what are expected for is_slo_get_request. (or is_multipart_manifest_request? actually) \n\nMy idea is that \"will do after this patch landed\" :-)","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            self.logger.info(\u0027storlet_handler: invocation \u0027"},{"line_number":320,"context_line":"                             \u0027over %s/%s/%s %s\u0027 %"},{"line_number":321,"context_line":"                             (account, container, obj,"},{"line_number":322,"context_line":"                              \u0027to be executed on proxy\u0027))"},{"line_number":323,"context_line":"            return orig_resp"},{"line_number":324,"context_line":"        else:"},{"line_number":325,"context_line":"            # We apply here the Storlet:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_5771dc74","line":322,"updated":"2016-02-07 10:19:26.000000000","message":"I would change the log to debug, and also rephrase the comment as follows:\n# No need to invoke Storlet in the object \n# server. This is either an SLO or we are \n# in proxy only mode","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":319,"context_line":"            self.logger.info(\u0027storlet_handler: invocation \u0027"},{"line_number":320,"context_line":"                             \u0027over %s/%s/%s %s\u0027 %"},{"line_number":321,"context_line":"                             (account, container, obj,"},{"line_number":322,"context_line":"                              \u0027to be executed on proxy\u0027))"},{"line_number":323,"context_line":"            return orig_resp"},{"line_number":324,"context_line":"        else:"},{"line_number":325,"context_line":"            # We apply here the Storlet:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_ba14b04c","line":322,"in_reply_to":"5a5ae5dd_5771dc74","updated":"2016-02-08 02:08:27.000000000","message":"Done","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            self.logger.info(\u0027storlet_handler: invocation \u0027"},{"line_number":327,"context_line":"                             \u0027over %s/%s/%s %s\u0027 %"},{"line_number":328,"context_line":"                             (account, container, obj,"},{"line_number":329,"context_line":"                              \u0027to be executed locally\u0027))"},{"line_number":330,"context_line":"            return self.apply_storlet(orig_resp)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_1767e4b7","line":329,"updated":"2016-02-07 10:19:26.000000000","message":"Let\u0027s change the log to debug","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":326,"context_line":"            self.logger.info(\u0027storlet_handler: invocation \u0027"},{"line_number":327,"context_line":"                             \u0027over %s/%s/%s %s\u0027 %"},{"line_number":328,"context_line":"                             (account, container, obj,"},{"line_number":329,"context_line":"                              \u0027to be executed locally\u0027))"},{"line_number":330,"context_line":"            return self.apply_storlet(orig_resp)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_3a01a006","line":329,"in_reply_to":"5a5ae5dd_1767e4b7","updated":"2016-02-08 02:08:27.000000000","message":"Done","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            return StorletObjectHandler"},{"line_number":353,"context_line":"        else:"},{"line_number":354,"context_line":"            raise ValueError("},{"line_number":355,"context_line":"                \u0027execution_server is supported only either proxy or object\u0027)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    @wsgify"},{"line_number":358,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_7d371f4d","line":355,"updated":"2016-02-07 10:19:26.000000000","message":"How about something along the lines:\n\u0027configuration error: execution server must be either proxy or object but is %s\u0027 %exec_server","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            return StorletObjectHandler"},{"line_number":353,"context_line":"        else:"},{"line_number":354,"context_line":"            raise ValueError("},{"line_number":355,"context_line":"                \u0027execution_server is supported only either proxy or object\u0027)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    @wsgify"},{"line_number":358,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_d5029f09","line":355,"in_reply_to":"5a5ae5dd_7d371f4d","updated":"2016-02-08 02:08:27.000000000","message":"Good idea!","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"d1dbbbe66a9f7ec8f510dfcb13dda76f15da94ea","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self.version, self.acc, self.cont, self.obj \u003d \\"},{"line_number":52,"context_line":"            self.get_vaco(self.request)"},{"line_number":53,"context_line":"        self.exec_server \u003d conf.get(\u0027execution_server\u0027)"},{"line_number":54,"context_line":"        self.logger.debug(\u0027storlet_handler call in %s: with %s/%s/%s\u0027 %"},{"line_number":55,"context_line":"                          (self.exec_server, self.acc, self.cont, self.obj))"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _setup_gateway(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_ba5cb07d","line":54,"range":{"start_line":54,"start_character":27,"end_line":54,"end_character":48},"updated":"2016-02-08 01:18:46.000000000","message":"This isn\u0027t in storlet_handler.__call__, so I should change the message or move this back to original place.","commit_id":"be9f06a8cda5f4300bb8d12fd5e2f1afa151f5f2"}],"tests/unit/swift/storlet_middleware/test_storlet_handler.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"c022ed4d415676ef1264f9c7de4efae69b826c33","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                if req.path \u003d\u003d \u0027/v1/AUTH_a/storlets/Storlet-1.0.jar\u0027:"},{"line_number":95,"context_line":"                    if \u0027X-Run-Storlet\u0027 in req.headers:"},{"line_number":96,"context_line":"                        raise Exception(\u0027X-Run-Storlet should be removed \u0027"},{"line_number":97,"context_line":"                                        \u0027from subrequest to storlet file\u0027)"},{"line_number":98,"context_line":"                    return Response(request\u003dreq)("},{"line_number":99,"context_line":"                        env, start_response)"},{"line_number":100,"context_line":"                elif req.path \u003d\u003d \u0027/v1/AUTH_a/c/o\u0027:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_b85085d5","line":97,"updated":"2016-02-05 02:02:25.000000000","message":"I don\u0027t like to add such an exception which far from actual Swift response.\n\nTo assert the sanity, why not keeping the called request in itself?\n\nlikely:\n self.called_header_keys \u003d []\n self.called_header_keys.extend(req.headers.keys())\n\nand then:\n\n self.assertNotIn(\u0027X-Run-Storlet\u0027, app.called_header_keys)","commit_id":"65a704bea00a42429d8c771714111ca3e46f9fa8"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"c8cfb84aeb72a79d9cffdf867b14a198f6b34152","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                if req.path \u003d\u003d \u0027/v1/AUTH_a/storlets/Storlet-1.0.jar\u0027:"},{"line_number":95,"context_line":"                    if \u0027X-Run-Storlet\u0027 in req.headers:"},{"line_number":96,"context_line":"                        raise Exception(\u0027X-Run-Storlet should be removed \u0027"},{"line_number":97,"context_line":"                                        \u0027from subrequest to storlet file\u0027)"},{"line_number":98,"context_line":"                    return Response(request\u003dreq)("},{"line_number":99,"context_line":"                        env, start_response)"},{"line_number":100,"context_line":"                elif req.path \u003d\u003d \u0027/v1/AUTH_a/c/o\u0027:"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a5ae5dd_5b2e2b44","line":97,"in_reply_to":"5a5ae5dd_b85085d5","updated":"2016-02-05 02:16:28.000000000","message":"Yes, this should be fixed. There are some other test cases doing this, and they should be fixed in another patch, I think.","commit_id":"65a704bea00a42429d8c771714111ca3e46f9fa8"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            def __call__(self, env, start_response):"},{"line_number":96,"context_line":"                req \u003d Request(env)"},{"line_number":97,"context_line":"                self.called_requests.append(req)"},{"line_number":98,"context_line":"                # TODO(kota-\u003etakashi): This will be needed after refactor"},{"line_number":99,"context_line":"                # because, right now, we can not test the existence HEAD"},{"line_number":100,"context_line":"                # request with stub gateway. In my idea, we could move the"},{"line_number":101,"context_line":"                # validation from gateway into handler in storlet_middleware"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_f7f1e895","line":98,"updated":"2016-02-07 10:19:26.000000000","message":"Right, when writing tests for copy I also realized that with the stub gateway we never get to this call. Note, however, that the reason the validation is in the gateway is because we thought that different gateways may employ different validations.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"b48aeb86f2155cda32d107cdf0c238576f8bd0f9","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            def __call__(self, env, start_response):"},{"line_number":96,"context_line":"                req \u003d Request(env)"},{"line_number":97,"context_line":"                self.called_requests.append(req)"},{"line_number":98,"context_line":"                # TODO(kota-\u003etakashi): This will be needed after refactor"},{"line_number":99,"context_line":"                # because, right now, we can not test the existence HEAD"},{"line_number":100,"context_line":"                # request with stub gateway. In my idea, we could move the"},{"line_number":101,"context_line":"                # validation from gateway into handler in storlet_middleware"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_d5293f8b","line":98,"in_reply_to":"5a5ae5dd_f7f1e895","updated":"2016-02-08 02:08:27.000000000","message":"I see, I thought we could move the validation into around Handler but it seems I need take care the original purpose in the followed refactoring. Thanks.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            resp \u003d app(req.environ, self.start_response)"},{"line_number":117,"context_line":"            self.assertEqual(\u0027200 OK\u0027, self.got_statuses[-1])"},{"line_number":118,"context_line":"            self.assertEqual(resp, [\u0027FAKE RESULT\u0027])"},{"line_number":119,"context_line":"            # The last one is exexution GET call"},{"line_number":120,"context_line":"            self.assertEqual(\u0027/v1/AUTH_a/c/o\u0027,"},{"line_number":121,"context_line":"                             fake_app.called_requests[-1].path)"},{"line_number":122,"context_line":"            self.assertIn(\u0027X-Run-Storlet\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_f74808ce","line":119,"updated":"2016-02-07 10:19:26.000000000","message":"Right! The below give a much better test.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"},{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"4c4b4df8cfe54b5c49d257c695042b86b3d5e16b","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            for target in (\u0027AUTH_a\u0027, \u0027AUTH_a/c\u0027, \u0027AUTH_a/c/o\u0027):"},{"line_number":260,"context_line":"                path \u003d join(\u0027/\u0027, \u0027v1\u0027, target)"},{"line_number":261,"context_line":"                basic_put(path)"},{"line_number":262,"context_line":"            self.assertEqual(0, called[0])"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def test_PUT_with_storlets(self):"},{"line_number":265,"context_line":"        class FakeApp(object):"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a5ae5dd_b715b09c","line":262,"updated":"2016-02-07 10:19:26.000000000","message":"Yep.","commit_id":"6564860e314a196595dd5a865ae7ddc77ff4a892"}]}
