)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"e0cf0aca74cd56a80a4c0f4725bb81dd5887ef06","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-03-10 01:10:29 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Avoid global CONF instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I6ce117678cfac455c16abb15cf7e7cab199680e6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df7087c5_83007d69","line":8,"updated":"2018-03-09 16:16:14.000000000","message":"I should say something more to describe why we need this.","commit_id":"5a5f5e2d7dfcb6ef7d1f51659f3c0419d7ca7221"}],"swift/common/middleware/s3api/cfg.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"e0cf0aca74cd56a80a4c0f4725bb81dd5887ef06","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            dict.__setitem__(self, key, value)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Global config dictionary.  The default values can be defined here."},{"line_number":57,"context_line":"CONF \u003d Config({"},{"line_number":58,"context_line":"    \u0027allow_no_owner\u0027: False,"},{"line_number":59,"context_line":"    \u0027location\u0027: \u0027US\u0027,"},{"line_number":60,"context_line":"    \u0027dns_compliant_bucket_names\u0027: True,"},{"line_number":61,"context_line":"    \u0027max_bucket_listing\u0027: 1000,"},{"line_number":62,"context_line":"    \u0027max_parts_listing\u0027: 1000,"},{"line_number":63,"context_line":"    \u0027max_multi_delete_objects\u0027: 1000,"},{"line_number":64,"context_line":"    # TODO: consider if we can decide s3_acl is true in default"},{"line_number":65,"context_line":"    \u0027s3_acl\u0027: False,"},{"line_number":66,"context_line":"    \u0027storage_domain\u0027: \u0027\u0027,"},{"line_number":67,"context_line":"    \u0027auth_pipeline_check\u0027: True,"},{"line_number":68,"context_line":"    \u0027max_upload_part_num\u0027: 1000,"},{"line_number":69,"context_line":"    \u0027check_bucket_owner\u0027: False,"},{"line_number":70,"context_line":"    \u0027force_swift_request_proxy_log\u0027: False,"},{"line_number":71,"context_line":"    \u0027allow_multipart_uploads\u0027: True,"},{"line_number":72,"context_line":"    \u0027min_segment_size\u0027: 5242880,"},{"line_number":73,"context_line":"})"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_433fc524","side":"PARENT","line":73,"range":{"start_line":57,"start_character":0,"end_line":73,"end_character":2},"updated":"2018-03-09 16:16:14.000000000","message":"The main purpose of this patch is here.\n\nI\u0027d like to remove this global CONF instance so this patch tries to move the conf into somewhere that should have.\n\nProbably, I need more cleanup later than this patch.","commit_id":"9d43f4e190802cb0cad507a65245e4dd70fda7db"}],"swift/common/middleware/s3api/request.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0731f18c3db282fcb7d2cb138fc62fa7dabb216d","unresolved":false,"context_lines":[{"line_number":406,"context_line":"    def __init__(self, env, conf, app\u003dNone, slo_enabled\u003dTrue):"},{"line_number":407,"context_line":"        # NOTE: app is not used by this class, need for compatibility of S3acl"},{"line_number":408,"context_line":"        swob.Request.__init__(self, env)"},{"line_number":409,"context_line":"        self.conf \u003d conf"},{"line_number":410,"context_line":"        self._timestamp \u003d None"},{"line_number":411,"context_line":"        self.access_key, self.signature \u003d self._parse_auth_info()"},{"line_number":412,"context_line":"        self.bucket_in_host \u003d self._parse_host()"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_8f0e5c8b","line":409,"updated":"2018-03-12 16:02:51.000000000","message":"I have a lot of the same reservations I had about the logger in https://review.openstack.org/#/c/529268/\n\nGranted, at least this is lighter weight than creating a new logger on every request, but by hanging conf off of Request, it seems like the request is *responsible* for conf -- which would make some future change along the lines of\n\n if account_from_request(req) in strict_s3_accounts:\n     req.conf.s3_acl \u003d True\n\nnot be as obviously *wrong and a bad idea* as\n\n if account_from_request(req) in strict_s3_accounts:\n     req.app.conf.s3_acl \u003d True\n\n...but then, I suppose req.app is the rest of the pipeline, and not really anything to do with s3api.\n\n\u003crant\u003e\nI feel like we ought to have better separation between the things specific to this request and all of the routing and delegation and app calls that need to happen to service it. The more I think about things like req.controller and req.set_acl_handler, the more Request starts to feel like the ProxyServer application, but with some extra per-request state :-/\n\u003c/rant\u003e","commit_id":"5a5f5e2d7dfcb6ef7d1f51659f3c0419d7ca7221"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"c78682e7256eddf6dfc88d5f4e5de048440fa52c","unresolved":false,"context_lines":[{"line_number":406,"context_line":"    def __init__(self, env, conf, app\u003dNone, slo_enabled\u003dTrue):"},{"line_number":407,"context_line":"        # NOTE: app is not used by this class, need for compatibility of S3acl"},{"line_number":408,"context_line":"        swob.Request.__init__(self, env)"},{"line_number":409,"context_line":"        self.conf \u003d conf"},{"line_number":410,"context_line":"        self._timestamp \u003d None"},{"line_number":411,"context_line":"        self.access_key, self.signature \u003d self._parse_auth_info()"},{"line_number":412,"context_line":"        self.bucket_in_host \u003d self._parse_host()"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_f632f4f1","line":409,"in_reply_to":"df7087c5_8f0e5c8b","updated":"2018-03-14 11:01:02.000000000","message":"I know! It\u0027s what I\u0027d like to change later (or in) this patch.\n\nthe attempt of this (avoiding CONF) is much complex, you know. I broke a lot of unit and func tests while i was trying this cleanup. Peeling the tangled code step by step feels me to hear any other opinions if i look at the right direction when reached out the current one.\n\nI think we would be able to add some args which are required by Request instance instead of setting the conf directly so we should not pass conf instance to avoid the responsibility for the conf. I\u0027ll try a patch to do it as soon as possible but I\u0027m happy if you don\u0027t feel opposite direction on this patch\u0027s purpose.","commit_id":"5a5f5e2d7dfcb6ef7d1f51659f3c0419d7ca7221"}],"swift/common/middleware/s3api/s3api.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"c78682e7256eddf6dfc88d5f4e5de048440fa52c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        self.conf \u003d Config()"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # Set default values if they are not configured"},{"line_number":62,"context_line":"        self.conf.allow_no_owner \u003d config_true_value("},{"line_number":63,"context_line":"            conf.get(\u0027allow_no_owner\u0027, False))"},{"line_number":64,"context_line":"        self.conf.location \u003d conf.get(\u0027location\u0027, \u0027US\u0027)"},{"line_number":65,"context_line":"        self.conf.dns_compliant_bucket_names \u003d config_true_value("},{"line_number":66,"context_line":"            conf.get(\u0027dns_compliant_bucket_names\u0027, True))"},{"line_number":67,"context_line":"        self.conf.max_bucket_listing \u003d config_positive_int_value("},{"line_number":68,"context_line":"            conf.get(\u0027max_bucket_listing\u0027, 1000))"},{"line_number":69,"context_line":"        self.conf.max_parts_listing \u003d config_positive_int_value("},{"line_number":70,"context_line":"            conf.get(\u0027max_parts_listing\u0027, 1000))"},{"line_number":71,"context_line":"        self.conf.max_multi_delete_objects \u003d config_positive_int_value("},{"line_number":72,"context_line":"            conf.get(\u0027max_multi_delete_objects\u0027, 1000))"},{"line_number":73,"context_line":"        self.conf.s3_acl \u003d config_true_value("},{"line_number":74,"context_line":"            conf.get(\u0027s3_acl\u0027, False))"},{"line_number":75,"context_line":"        self.conf.storage_domain \u003d conf.get(\u0027storage_domain\u0027, \u0027\u0027)"},{"line_number":76,"context_line":"        self.conf.auth_pipeline_check \u003d config_true_value("},{"line_number":77,"context_line":"            conf.get(\u0027auth_pipeline_check\u0027, True))"},{"line_number":78,"context_line":"        self.conf.max_upload_part_num \u003d config_positive_int_value("},{"line_number":79,"context_line":"            conf.get(\u0027max_upload_part_num\u0027, 1000))"},{"line_number":80,"context_line":"        self.conf.check_bucket_owner \u003d config_true_value("},{"line_number":81,"context_line":"            conf.get(\u0027check_bucket_owner\u0027, False))"},{"line_number":82,"context_line":"        self.conf.force_swift_request_proxy_log \u003d config_true_value("},{"line_number":83,"context_line":"            conf.get(\u0027force_swift_request_proxy_log\u0027, False))"},{"line_number":84,"context_line":"        self.conf.allow_multipart_uploads \u003d config_true_value("},{"line_number":85,"context_line":"            conf.get(\u0027allow_multipart_uploads\u0027, True))"},{"line_number":86,"context_line":"        self.conf.min_segment_size \u003d config_positive_int_value("},{"line_number":87,"context_line":"            conf.get(\u0027min_segment_size\u0027, 5242880))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        self.logger \u003d get_logger("},{"line_number":90,"context_line":"            conf, log_route\u003dconf.get(\u0027log_name\u0027, \u0027s3api\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_96a7f80b","line":87,"range":{"start_line":62,"start_character":0,"end_line":87,"end_character":50},"updated":"2018-03-14 11:01:02.000000000","message":"Wrap with helper functions either config_true_value or config_positive_int_value. Probably some failures in the older patch set were caused of the lack of this wrapping.","commit_id":"4d9fbb14cb3f3c31419027fe6b994aef987c8179"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dea7c548abbed64b336829544bb299d26ea77f0a","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        self.conf \u003d Config()"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # Set default values if they are not configured"},{"line_number":62,"context_line":"        self.conf.allow_no_owner \u003d config_true_value("},{"line_number":63,"context_line":"            conf.get(\u0027allow_no_owner\u0027, False))"},{"line_number":64,"context_line":"        self.conf.location \u003d conf.get(\u0027location\u0027, \u0027US\u0027)"},{"line_number":65,"context_line":"        self.conf.dns_compliant_bucket_names \u003d config_true_value("},{"line_number":66,"context_line":"            conf.get(\u0027dns_compliant_bucket_names\u0027, True))"},{"line_number":67,"context_line":"        self.conf.max_bucket_listing \u003d config_positive_int_value("},{"line_number":68,"context_line":"            conf.get(\u0027max_bucket_listing\u0027, 1000))"},{"line_number":69,"context_line":"        self.conf.max_parts_listing \u003d config_positive_int_value("},{"line_number":70,"context_line":"            conf.get(\u0027max_parts_listing\u0027, 1000))"},{"line_number":71,"context_line":"        self.conf.max_multi_delete_objects \u003d config_positive_int_value("},{"line_number":72,"context_line":"            conf.get(\u0027max_multi_delete_objects\u0027, 1000))"},{"line_number":73,"context_line":"        self.conf.s3_acl \u003d config_true_value("},{"line_number":74,"context_line":"            conf.get(\u0027s3_acl\u0027, False))"},{"line_number":75,"context_line":"        self.conf.storage_domain \u003d conf.get(\u0027storage_domain\u0027, \u0027\u0027)"},{"line_number":76,"context_line":"        self.conf.auth_pipeline_check \u003d config_true_value("},{"line_number":77,"context_line":"            conf.get(\u0027auth_pipeline_check\u0027, True))"},{"line_number":78,"context_line":"        self.conf.max_upload_part_num \u003d config_positive_int_value("},{"line_number":79,"context_line":"            conf.get(\u0027max_upload_part_num\u0027, 1000))"},{"line_number":80,"context_line":"        self.conf.check_bucket_owner \u003d config_true_value("},{"line_number":81,"context_line":"            conf.get(\u0027check_bucket_owner\u0027, False))"},{"line_number":82,"context_line":"        self.conf.force_swift_request_proxy_log \u003d config_true_value("},{"line_number":83,"context_line":"            conf.get(\u0027force_swift_request_proxy_log\u0027, False))"},{"line_number":84,"context_line":"        self.conf.allow_multipart_uploads \u003d config_true_value("},{"line_number":85,"context_line":"            conf.get(\u0027allow_multipart_uploads\u0027, True))"},{"line_number":86,"context_line":"        self.conf.min_segment_size \u003d config_positive_int_value("},{"line_number":87,"context_line":"            conf.get(\u0027min_segment_size\u0027, 5242880))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        self.logger \u003d get_logger("},{"line_number":90,"context_line":"            conf, log_route\u003dconf.get(\u0027log_name\u0027, \u0027s3api\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_ae08e12c","line":87,"range":{"start_line":62,"start_character":0,"end_line":87,"end_character":50},"in_reply_to":"df7087c5_96a7f80b","updated":"2018-03-22 00:14:50.000000000","message":"At some point, we\u0027ll probably want to have Config\u0027s __init__ accept conf and do all of this itself.","commit_id":"4d9fbb14cb3f3c31419027fe6b994aef987c8179"}],"test/unit/common/middleware/s3api/__init__.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dea7c548abbed64b336829544bb299d26ea77f0a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        unittest.TestCase.__init__(self, name)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        # CONF.log_level \u003d \u0027debug\u0027"},{"line_number":59,"context_line":"        # CONF.storage_domain \u003d \u0027localhost\u0027"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def setUp(self):"},{"line_number":62,"context_line":"        # setup default config"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_d1561a07","line":59,"updated":"2018-03-22 00:14:50.000000000","message":"Why did we have these before?","commit_id":"4d9fbb14cb3f3c31419027fe6b994aef987c8179"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dea7c548abbed64b336829544bb299d26ea77f0a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        })"},{"line_number":79,"context_line":"        # those 2 settings has existed the original test setup"},{"line_number":80,"context_line":"        self.conf.log_level \u003d \u0027debug\u0027"},{"line_number":81,"context_line":"        self.conf.storage_domain \u003d \u0027localhost\u0027"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        self.app \u003d FakeApp()"},{"line_number":84,"context_line":"        self.swift \u003d self.app.swift"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_916982bf","line":81,"updated":"2018-03-22 00:14:50.000000000","message":"Should we just set this in line 71 instead?","commit_id":"4d9fbb14cb3f3c31419027fe6b994aef987c8179"}],"test/unit/common/middleware/s3api/test_request.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dea7c548abbed64b336829544bb299d26ea77f0a","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def tearDown(self):"},{"line_number":96,"context_line":"        self.swift3.conf.s3_acl \u003d False"},{"line_number":97,"context_line":"        self.swift.s3_acl \u003d False"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @patch(\u0027swift.common.middleware.s3api.acl_handlers.ACL_MAP\u0027, Fake_ACL_MAP)"},{"line_number":100,"context_line":"    @patch(\u0027swift.common.middleware.s3api.request.S3AclRequest.authenticate\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"df7087c5_f180fe48","line":97,"updated":"2018-03-22 00:14:50.000000000","message":"Probably no longer necessary -- super().setUp() creates a new conf every time, yeah?","commit_id":"4d9fbb14cb3f3c31419027fe6b994aef987c8179"}]}
