)]}'
{"swift/common/middleware/s3api/acl_handlers.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            self.container \u003d container or org_cont"},{"line_number":88,"context_line":"            self.obj \u003d obj or org_obj"},{"line_number":89,"context_line":"            self.headers \u003d headers or org_headers"},{"line_number":90,"context_line":"            yield"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_cb45c2b5","line":89,"range":{"start_line":89,"start_character":27,"end_line":89,"end_character":37},"updated":"2018-01-09 18:49:40.000000000","message":"I wonder if the is-None checks were very much intentional before. As it\u0027s now written, I\u0027m not sure we can make a request that clears all headers, for example...","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    \"\"\""},{"line_number":321,"context_line":"    def __init__(self, req, logger):"},{"line_number":322,"context_line":"        super(MultiUploadAclHandler, self).__init__(req, logger)"},{"line_number":323,"context_line":"        self.acl_checked \u003d False"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def handle_acl(self, app, method, container\u003dNone, obj\u003dNone, headers\u003dNone):"},{"line_number":326,"context_line":"        method \u003d method or self.method"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_ab7f1ede","line":323,"updated":"2018-01-09 18:49:40.000000000","message":"?? How does this get used? I guess, down in UploadsAclHandler? Why aren\u0027t we just overriding __init__ down there?","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    \"\"\""},{"line_number":321,"context_line":"    def __init__(self, req, logger):"},{"line_number":322,"context_line":"        super(MultiUploadAclHandler, self).__init__(req, logger)"},{"line_number":323,"context_line":"        self.acl_checked \u003d False"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def handle_acl(self, app, method, container\u003dNone, obj\u003dNone, headers\u003dNone):"},{"line_number":326,"context_line":"        method \u003d method or self.method"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_0457a804","line":323,"in_reply_to":"9f91af0f_ab7f1ede","updated":"2018-01-12 09:23:16.000000000","message":"Ah, ok. Let\u0027s move this into UploadsAclHandler. See my comments there in detail.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        self._handle_acl(app, \u0027GET\u0027, self.container, \u0027\u0027)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def PUT(self, app):"},{"line_number":366,"context_line":"        if not self.acl_checked:"},{"line_number":367,"context_line":"            # Initiate Multipart Uploads"},{"line_number":368,"context_line":"            resp \u003d self._handle_acl(app, \u0027HEAD\u0027, obj\u003d\u0027\u0027)"},{"line_number":369,"context_line":"            req_acl \u003d ACL.from_headers(self.req.headers,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_84b8982a","line":366,"updated":"2018-01-12 09:23:16.000000000","message":"So the acl_checked gets used here (only here). Uploads handler requires the acl check to the container once. In the old days, we handle the first time with the existence of self.obj. It worked because all requests incoming to Acl Handler is initialized as the swift request.\n\nNow, the context for acl handler initialization was changed with this patch. Then, I re-thought on the statement what we need here, that seems like, just simply checking the acl once as expected.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def HEAD(self, app):"},{"line_number":383,"context_line":"        # FIXME: GET HEAD case conflicts with GET service"},{"line_number":384,"context_line":"        method \u003d \u0027GET\u0027 if self.method \u003d\u003d \u0027GET\u0027 else \u0027HEAD\u0027"},{"line_number":385,"context_line":"        self._handle_acl(app, method, self.container, \u0027\u0027)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def PUT(self, app):"},{"line_number":388,"context_line":"        container \u003d self.req.container_name + MULTIUPLOAD_SUFFIX"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_2b022e3e","line":385,"range":{"start_line":385,"start_character":54,"end_line":385,"end_character":56},"updated":"2018-01-09 18:49:40.000000000","message":"Won\u0027t we still be checking the object-level ACL here, where previously we were just checking container?","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":382,"context_line":"    def HEAD(self, app):"},{"line_number":383,"context_line":"        # FIXME: GET HEAD case conflicts with GET service"},{"line_number":384,"context_line":"        method \u003d \u0027GET\u0027 if self.method \u003d\u003d \u0027GET\u0027 else \u0027HEAD\u0027"},{"line_number":385,"context_line":"        self._handle_acl(app, method, self.container, \u0027\u0027)"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    def PUT(self, app):"},{"line_number":388,"context_line":"        container \u003d self.req.container_name + MULTIUPLOAD_SUFFIX"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_64330cad","line":385,"range":{"start_line":385,"start_character":54,"end_line":385,"end_character":56},"in_reply_to":"9f91af0f_2b022e3e","updated":"2018-01-12 09:23:16.000000000","message":"IIRC, UploadAclHanlder is for UploadController that supports the requests:\n\n- List Parts\n- Abort Multipart Upload\n- Complete Multipart Upload\n\nDo these require any object ACL? I thought they\u0027re not for an actual object so that the container acl check should be enough.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"}],"swift/common/middleware/s3api/controllers/base.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                if err_resp:"},{"line_number":35,"context_line":"                    raise err_resp(msg\u003derr_msg)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"                self.logger.debug(\u0027A key is specified for bucket API.\u0027)"},{"line_number":38,"context_line":"                req.object_name \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"            return func(self, req)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_0b75ea63","line":37,"updated":"2018-01-09 18:49:40.000000000","message":"We\u0027re sure that every function we wrap is a method of a class that has a logger attr, yeah?","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                if err_resp:"},{"line_number":35,"context_line":"                    raise err_resp(msg\u003derr_msg)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"                self.logger.debug(\u0027A key is specified for bucket API.\u0027)"},{"line_number":38,"context_line":"                req.object_name \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"            return func(self, req)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_24bbc4e2","line":37,"in_reply_to":"9f91af0f_0b75ea63","updated":"2018-01-12 09:23:16.000000000","message":"Yes. bucket_oeration should be used only for swift.common.middleware.s3api.controllers.base.Controller class so that it should have a self.logger instance.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    def __init__(self, app, conf, logger, **kwargs):"},{"line_number":82,"context_line":"        self.app \u003d app"},{"line_number":83,"context_line":"        self.conf \u003d conf"},{"line_number":84,"context_line":"        self.logger \u003d logger"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @classmethod"},{"line_number":87,"context_line":"    def resource_type(cls):"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_cb18621f","line":84,"updated":"2018-01-09 18:49:40.000000000","message":"+100, I like this a *lot* more.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    def __init__(self, app, conf, logger, **kwargs):"},{"line_number":82,"context_line":"        self.app \u003d app"},{"line_number":83,"context_line":"        self.conf \u003d conf"},{"line_number":84,"context_line":"        self.logger \u003d logger"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @classmethod"},{"line_number":87,"context_line":"    def resource_type(cls):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_a4c6f466","line":84,"in_reply_to":"9f91af0f_cb18621f","updated":"2018-01-12 09:23:16.000000000","message":":)","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"}],"swift/common/middleware/s3api/etree.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def fromstring(text, root_tag\u003dNone, logger\u003dNone):"},{"line_number":61,"context_line":"    logger \u003d logger or get_logger({}, log_route\u003d\u0027s3api\u0027)"},{"line_number":62,"context_line":"    try:"},{"line_number":63,"context_line":"        elem \u003d lxml.etree.fromstring(text, parser)"},{"line_number":64,"context_line":"    except lxml.etree.XMLSyntaxError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_8b9c9ac0","line":61,"range":{"start_line":61,"start_character":23,"end_line":61,"end_character":33},"updated":"2018-01-09 18:49:40.000000000","message":"Is this mainly for unit tests and the like, or does this happen in the request path?\n\nGiven that the default log level will be INFO, I wonder if we should hold off on actually calling get_logger() until we hit an IOError, like\n\n try:\n     elem \u003d lxml.etree.fromstring(text, parser)\n except lxml.etree.XMLSyntaxError as e:\n     if logger:\n         logger.debug(e)\n     raise XMLSyntaxError(e)\n ...\n try:\n     path \u003d \u0027schema/%s.rng\u0027 % camel_to_snake(root_tag)\n     with resource_stream(__name__, path) as rng:\n         lxml.etree.RelaxNG(file\u003drng).assertValid(elem)\n except IOError as e:\n     # Probably, the schema file doesn\u0027t exist.\n     exc_type, exc_value, exc_traceback \u003d sys.exc_info()\n     logger \u003d logger or get_logger({}, log_route\u003d\u0027s3api\u0027)\n     logger.error(e)\n     raise exc_type, exc_value, exc_traceback\n except lxml.etree.DocumentInvalid as e:\n     if logger:\n         logger.debug(e)\n     raise DocumentInvalid(e)\n\nOr, ensure all callers include a logger.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"def fromstring(text, root_tag\u003dNone, logger\u003dNone):"},{"line_number":61,"context_line":"    logger \u003d logger or get_logger({}, log_route\u003d\u0027s3api\u0027)"},{"line_number":62,"context_line":"    try:"},{"line_number":63,"context_line":"        elem \u003d lxml.etree.fromstring(text, parser)"},{"line_number":64,"context_line":"    except lxml.etree.XMLSyntaxError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_649a2c15","line":61,"range":{"start_line":61,"start_character":23,"end_line":61,"end_character":33},"in_reply_to":"9f91af0f_8b9c9ac0","updated":"2018-01-12 09:23:16.000000000","message":"Done","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"}],"swift/common/middleware/s3api/request.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cbfd5341195dfdbc7d78eacf70fe466b3c351a17","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    def __init__(self, env, app\u003dNone, slo_enabled\u003dTrue, logger\u003dNone):"},{"line_number":409,"context_line":"        # NOTE: app is not used by this class, need for compatibility of S3acl"},{"line_number":410,"context_line":"        swob.Request.__init__(self, env)"},{"line_number":411,"context_line":"        self.logger \u003d logger or get_logger({}, log_route\u003d\u0027s3api\u0027)"},{"line_number":412,"context_line":"        self._timestamp \u003d None"},{"line_number":413,"context_line":"        self.access_key, self.signature \u003d self._parse_auth_info()"},{"line_number":414,"context_line":"        self.bucket_in_host \u003d self._parse_host()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_0b14a59f","line":411,"updated":"2017-12-21 19:08:46.000000000","message":"So wait, does every request set up a new logger?\n\nI\u0027m not entirely sure I like having Request.logger ... it seems like a mismatch of scope. I know we want to have a shared logger available in the various controllers, but it seems like the controllers ought to be able to get a reference to S3ApiMiddleware.logger directly, kinda like how we\u0027ve got calls to self.app.logger... in proxy/controllers/base.py","commit_id":"14341d16a0bfcbe186349be1f3aa84af0afd32a3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a7a616bb9bb4914abc1ce1e5c2b4c8d19dda032f","unresolved":false,"context_lines":[{"line_number":408,"context_line":"    def __init__(self, env, app\u003dNone, slo_enabled\u003dTrue, logger\u003dNone):"},{"line_number":409,"context_line":"        # NOTE: app is not used by this class, need for compatibility of S3acl"},{"line_number":410,"context_line":"        swob.Request.__init__(self, env)"},{"line_number":411,"context_line":"        self.logger \u003d logger or get_logger({}, log_route\u003d\u0027s3api\u0027)"},{"line_number":412,"context_line":"        self._timestamp \u003d None"},{"line_number":413,"context_line":"        self.access_key, self.signature \u003d self._parse_auth_info()"},{"line_number":414,"context_line":"        self.bucket_in_host \u003d self._parse_host()"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_08d7c04d","line":411,"in_reply_to":"bf8cb3f7_0b14a59f","updated":"2017-12-22 06:12:09.000000000","message":"Yeah, me too, I don\u0027t like to add the logger to the Request. The only reason why I did it is because we need the logger in acl_handler. I don\u0027t think we could call self.app.logger because in the pipeline filter, the app will be the next app. Because the swift proxy controllers is the terminator of wsgi pipeline, it can be used.\n\nLet me take a time more to consider how to avoid this. Probably that will requires more places to touch...","commit_id":"14341d16a0bfcbe186349be1f3aa84af0afd32a3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":867,"context_line":""},{"line_number":868,"context_line":"        if not self.slo_enabled:"},{"line_number":869,"context_line":"            multi_part \u003d [\u0027partNumber\u0027, \u0027uploadId\u0027, \u0027uploads\u0027]"},{"line_number":870,"context_line":"            if len([p for p in multi_part if p in self.params]):"},{"line_number":871,"context_line":"                raise S3NotImplemented(\"Multi-part feature isn\u0027t support\")"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        if \u0027acl\u0027 in self.params:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_2b96ae94","line":870,"updated":"2018-01-09 18:49:40.000000000","message":"Off-topic: better as\n\n if any(p for p in multi_part if p in self.params):","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":867,"context_line":""},{"line_number":868,"context_line":"        if not self.slo_enabled:"},{"line_number":869,"context_line":"            multi_part \u003d [\u0027partNumber\u0027, \u0027uploadId\u0027, \u0027uploads\u0027]"},{"line_number":870,"context_line":"            if len([p for p in multi_part if p in self.params]):"},{"line_number":871,"context_line":"                raise S3NotImplemented(\"Multi-part feature isn\u0027t support\")"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        if \u0027acl\u0027 in self.params:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_04b80874","line":870,"in_reply_to":"9f91af0f_2b96ae94","updated":"2018-01-12 09:23:16.000000000","message":"+1. Let\u0027s do it later.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"}],"swift/common/middleware/s3api/s3api.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cbfd5341195dfdbc7d78eacf70fe466b3c351a17","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def __call__(self, env, start_response):"},{"line_number":63,"context_line":"        try:"},{"line_number":64,"context_line":"            req_class \u003d get_request_class(env)"},{"line_number":65,"context_line":"            req \u003d req_class(env, self.app, self.slo_enabled)"},{"line_number":66,"context_line":"            resp \u003d self.handle_request(req)"},{"line_number":67,"context_line":"        except NotS3Request:"},{"line_number":68,"context_line":"            resp \u003d self.app"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_eb8701d7","line":65,"updated":"2017-12-21 19:08:46.000000000","message":"If we\u0027re going to continue hanging a logger off of Request, we should at least pass in self.logger here.","commit_id":"14341d16a0bfcbe186349be1f3aa84af0afd32a3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"a7a616bb9bb4914abc1ce1e5c2b4c8d19dda032f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def __call__(self, env, start_response):"},{"line_number":63,"context_line":"        try:"},{"line_number":64,"context_line":"            req_class \u003d get_request_class(env)"},{"line_number":65,"context_line":"            req \u003d req_class(env, self.app, self.slo_enabled)"},{"line_number":66,"context_line":"            resp \u003d self.handle_request(req)"},{"line_number":67,"context_line":"        except NotS3Request:"},{"line_number":68,"context_line":"            resp \u003d self.app"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_88c2f084","line":65,"in_reply_to":"bf8cb3f7_eb8701d7","updated":"2017-12-22 06:12:09.000000000","message":"good catch. thanks.","commit_id":"14341d16a0bfcbe186349be1f3aa84af0afd32a3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            self.logger.debug(e.cause)"},{"line_number":73,"context_line":"        except ErrorResponse as err_resp:"},{"line_number":74,"context_line":"            if isinstance(err_resp, InternalError):"},{"line_number":75,"context_line":"                self.logger.exception(err_resp)"},{"line_number":76,"context_line":"            resp \u003d err_resp"},{"line_number":77,"context_line":"        except Exception as e:"},{"line_number":78,"context_line":"            self.logger.exception(e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_5fa6ddc3","line":75,"updated":"2018-01-12 09:23:16.000000000","message":"Perhaps, we\u0027d like to log the exception always here including Not Implemented Error case?","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d6a8c82ea8a5d2e2b817f259271e5ec658bb5fb1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            self.logger.debug(e.cause)"},{"line_number":73,"context_line":"        except ErrorResponse as err_resp:"},{"line_number":74,"context_line":"            if isinstance(err_resp, InternalError):"},{"line_number":75,"context_line":"                self.logger.exception(err_resp)"},{"line_number":76,"context_line":"            resp \u003d err_resp"},{"line_number":77,"context_line":"        except Exception as e:"},{"line_number":78,"context_line":"            self.logger.exception(e)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_09063f21","line":75,"in_reply_to":"7f96bb07_5fa6ddc3","updated":"2018-01-18 06:27:59.000000000","message":"Nah -- I\u0027d expect for a 501 it will be fairly obvious where it came from based on the request path. And just generally, us replying with \"I don\u0027t support that (yet)\" isn\u0027t actually exceptional.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def handle_request(self, req):"},{"line_number":88,"context_line":"        self.logger.debug(\u0027Calling S3Api Middleware\u0027)"},{"line_number":89,"context_line":"        self.logger.debug(req.__dict__)"},{"line_number":90,"context_line":"        try:"},{"line_number":91,"context_line":"            controller \u003d req.controller(self.app, self.conf, self.logger)"},{"line_number":92,"context_line":"        except S3NotImplemented:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_70a10346","line":89,"updated":"2018-01-09 18:49:40.000000000","message":"Off-topic: I know this is useful during development/debugging, but since it includes the whole wsgi environment, it means that we can\u0027t safely turn on debug logging in a production environment :-(","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def handle_request(self, req):"},{"line_number":88,"context_line":"        self.logger.debug(\u0027Calling S3Api Middleware\u0027)"},{"line_number":89,"context_line":"        self.logger.debug(req.__dict__)"},{"line_number":90,"context_line":"        try:"},{"line_number":91,"context_line":"            controller \u003d req.controller(self.app, self.conf, self.logger)"},{"line_number":92,"context_line":"        except S3NotImplemented:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_8480988d","line":89,"in_reply_to":"9f91af0f_70a10346","updated":"2018-01-12 09:23:16.000000000","message":"Good point, it seems dangerous on the production, it shows everything in the log yeah?","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        try:"},{"line_number":91,"context_line":"            controller \u003d req.controller(self.app, self.conf, self.logger)"},{"line_number":92,"context_line":"        except S3NotImplemented:"},{"line_number":93,"context_line":"            # TODO: Probably we should distinct the error to log this warning"},{"line_number":94,"context_line":"            self.logger.warning(\u0027multipart: No SLO middleware in pipeline\u0027)"},{"line_number":95,"context_line":"            raise"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_b0c46bf6","line":93,"updated":"2018-01-09 18:49:40.000000000","message":"+1 -- there are a lot of other ways we might get a Not Implemented response, like attempting to do much or anything with versioning. Maybe we could peek at the controller\u0027s class name before logging?\n\nActually -- given our warning down at line 131, I wonder if this is necessary/useful... either the operator enabled multipart uploads (in which case, we\u0027ve already warned them during process start-up) or they didn\u0027t (in which case the fact that we\u0027re returning Not Implmented is completely unexceptional).","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d6a8c82ea8a5d2e2b817f259271e5ec658bb5fb1","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        try:"},{"line_number":91,"context_line":"            controller \u003d req.controller(self.app, self.conf, self.logger)"},{"line_number":92,"context_line":"        except S3NotImplemented:"},{"line_number":93,"context_line":"            # TODO: Probably we should distinct the error to log this warning"},{"line_number":94,"context_line":"            self.logger.warning(\u0027multipart: No SLO middleware in pipeline\u0027)"},{"line_number":95,"context_line":"            raise"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_1b052611","line":93,"in_reply_to":"7f96bb07_9f6a257e","updated":"2018-01-18 06:27:59.000000000","message":"Sure -- let\u0027s take it out.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        try:"},{"line_number":91,"context_line":"            controller \u003d req.controller(self.app, self.conf, self.logger)"},{"line_number":92,"context_line":"        except S3NotImplemented:"},{"line_number":93,"context_line":"            # TODO: Probably we should distinct the error to log this warning"},{"line_number":94,"context_line":"            self.logger.warning(\u0027multipart: No SLO middleware in pipeline\u0027)"},{"line_number":95,"context_line":"            raise"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_9f6a257e","line":93,"in_reply_to":"9f91af0f_b0c46bf6","updated":"2018-01-12 09:23:16.000000000","message":"If you would be ok. I like to remove the warning log. This is here just because I tried to remove the LOGGER instance in the S3Request object so no strong opinion to keep this exists.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        \"\"\""},{"line_number":156,"context_line":"        indexes \u003d []"},{"line_number":157,"context_line":"        missing_filters \u003d []"},{"line_number":158,"context_line":"        for filter in required_filters:"},{"line_number":159,"context_line":"            try:"},{"line_number":160,"context_line":"                indexes.append(pipeline.index(filter))"},{"line_number":161,"context_line":"            except ValueError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_50115f5c","line":158,"range":{"start_line":158,"start_character":12,"end_line":158,"end_character":18},"updated":"2018-01-09 18:49:40.000000000","message":"Off-topic: oh yeah, we should probably stop shadowing the built-in filter()...","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        \"\"\""},{"line_number":156,"context_line":"        indexes \u003d []"},{"line_number":157,"context_line":"        missing_filters \u003d []"},{"line_number":158,"context_line":"        for filter in required_filters:"},{"line_number":159,"context_line":"            try:"},{"line_number":160,"context_line":"                indexes.append(pipeline.index(filter))"},{"line_number":161,"context_line":"            except ValueError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_ff832903","line":158,"range":{"start_line":158,"start_character":12,"end_line":158,"end_character":18},"in_reply_to":"9f91af0f_50115f5c","updated":"2018-01-12 09:23:16.000000000","message":"Absolutely, will do.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"}],"swift/common/middleware/s3api/subresource.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    instance."},{"line_number":84,"context_line":"    \"\"\""},{"line_number":85,"context_line":"    if not logger:"},{"line_number":86,"context_line":"        logger \u003d get_logger({}, log_route\u003d\u0027s3api\u0027)"},{"line_number":87,"context_line":"    value \u003d \u0027\u0027"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    key \u003d sysmeta_header(resource, \u0027acl\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_8bd33a60","line":86,"updated":"2018-01-09 18:49:40.000000000","message":"I think we can drop this now, yeah?","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    instance."},{"line_number":84,"context_line":"    \"\"\""},{"line_number":85,"context_line":"    if not logger:"},{"line_number":86,"context_line":"        logger \u003d get_logger({}, log_route\u003d\u0027s3api\u0027)"},{"line_number":87,"context_line":"    value \u003d \u0027\u0027"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    key \u003d sysmeta_header(resource, \u0027acl\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_7facf98b","line":86,"in_reply_to":"9f91af0f_8bd33a60","updated":"2018-01-12 09:23:16.000000000","message":"Oh yeah. Good catch.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"}],"test-requirements.txt":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":20,"context_line":"boto"},{"line_number":21,"context_line":"requests-mock\u003e\u003d0.7.0 # Apache-2.0"},{"line_number":22,"context_line":"fixtures\u003c2.0,\u003e\u003d1.3.1 # Apache-2.0/BSD"},{"line_number":23,"context_line":"# TODO: keystonemiddleware 4.19.0 causes import errors"},{"line_number":24,"context_line":"#       it is needed to dig what happens there"},{"line_number":25,"context_line":"keystonemiddleware\u003c\u003d4.18.0"},{"line_number":26,"context_line":""}],"source_content_type":"text/plain","patch_set":4,"id":"9f91af0f_abc2be57","line":23,"updated":"2018-01-09 18:49:40.000000000","message":"Of course it does :-/\n\nFWIW, so does the ancient fork of 1.5.0 that I ship... which led to me adding SkipTests to the fork of swift3 I package, so I could still have some faith in my unit test runs -- https://github.com/swiftstack/swift3-stackforge/commit/f0a3a03","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":20,"context_line":"boto"},{"line_number":21,"context_line":"requests-mock\u003e\u003d0.7.0 # Apache-2.0"},{"line_number":22,"context_line":"fixtures\u003c2.0,\u003e\u003d1.3.1 # Apache-2.0/BSD"},{"line_number":23,"context_line":"# TODO: keystonemiddleware 4.19.0 causes import errors"},{"line_number":24,"context_line":"#       it is needed to dig what happens there"},{"line_number":25,"context_line":"keystonemiddleware\u003c\u003d4.18.0"},{"line_number":26,"context_line":""}],"source_content_type":"text/plain","patch_set":4,"id":"7f96bb07_2aaaadd3","line":23,"in_reply_to":"9f91af0f_abc2be57","updated":"2018-01-12 09:23:16.000000000","message":"OIC. And I confirmed that error happens only 4.19.0. the newer is getting to work well so that it\u0027s just a bug. I\u0027ll change the constraint as keystonemiddleware!\u003d4.19.0 here.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"}],"test/unit/common/middleware/s3api/test_s3_acl.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"07aae72b8abc7290cfbd7bc5d4501e41592a1da6","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        instance \u003d args[0]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        if not s3acl_only:"},{"line_number":77,"context_line":"            print(\u0027not s3\u0027)"},{"line_number":78,"context_line":"            call_func()"},{"line_number":79,"context_line":"            instance.swift._calls \u003d []"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9f91af0f_0b7f2a15","line":77,"updated":"2018-01-09 18:49:40.000000000","message":"Unnecessary debugging?","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"8d65836f66d3f20073385f4e1a4402f8d30b8b49","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        instance \u003d args[0]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        if not s3acl_only:"},{"line_number":77,"context_line":"            print(\u0027not s3\u0027)"},{"line_number":78,"context_line":"            call_func()"},{"line_number":79,"context_line":"            instance.swift._calls \u003d []"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_ea94c58d","line":77,"in_reply_to":"9f91af0f_0b7f2a15","updated":"2018-01-12 09:23:16.000000000","message":"oops, it\u0027s my mistake sorry.","commit_id":"9202684e560e3c0e9c00c84556b00cf75049350d"}]}
