)]}'
{"swift/common/internal_client.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"c4e4f00fb42333e824ac9adb8a8dd8dd69acab84","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    account_ring \u003d pipeline_property(\u0027account_ring\u0027)"},{"line_number":147,"context_line":"    auto_create_account_prefix \u003d pipeline_property("},{"line_number":148,"context_line":"        \u0027auto_create_account_prefix\u0027, default\u003d\u0027.\u0027)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def make_request("},{"line_number":151,"context_line":"            self, method, path, headers, acceptable_statuses, body_file\u003dNone):"},{"line_number":152,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_1f6ebe96","line":149,"updated":"2014-06-02 02:18:36.000000000","message":"Just placing this code inside the class after the constructor looks, weird. It works. But looks a little weird to me. Are the values suppose to be static, accessed from a non created InternalClient object? \n\nIf not, maybe it would look cleaner to define them in the constructor.\n   self.get_object_ring \u003d pipline_property(\u0027get_object_ring\u0027).\n\nFurther if these are properties defined in swift.comm.wsgi, I wonder if it would be better to use a constant to call at least for common properties (As I assume container_right, account_ring, etc. would be): \n    pipeline_property(GET_OBJECT_RING) \nor something. \n\nNothing really wrong here just my 2 cents.","commit_id":"c957a5879de260fcce864ea6ca57323a20e9e26c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af01776ff378c19d65498fc270ff6cb15f5de6be","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        headers \u003d headers or {}"},{"line_number":222,"context_line":"        resp \u003d self.make_request(\u0027HEAD\u0027, path, headers, acceptable_statuses)"},{"line_number":223,"context_line":"        if resp.status_int not in acceptable_statuses and \\"},{"line_number":224,"context_line":"                resp.status_int // 100 not in acceptable_statuses:"},{"line_number":225,"context_line":"            return {}"},{"line_number":226,"context_line":"        metadata_prefix \u003d metadata_prefix.lower()"},{"line_number":227,"context_line":"        metadata \u003d {}"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_11e58adb","line":224,"updated":"2014-06-11 16:12:56.000000000","message":"this can never be true can it? looking at line 182-184, would never get a resp unless aceeptable status. the test that exercises this line - test_get_metadata_invalid_status() - only achieves coverage by overriding make_request","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0d6104ce6ed90e178dd63fdce8a54432841e545","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        headers \u003d headers or {}"},{"line_number":222,"context_line":"        resp \u003d self.make_request(\u0027HEAD\u0027, path, headers, acceptable_statuses)"},{"line_number":223,"context_line":"        if resp.status_int not in acceptable_statuses and \\"},{"line_number":224,"context_line":"                resp.status_int // 100 not in acceptable_statuses:"},{"line_number":225,"context_line":"            return {}"},{"line_number":226,"context_line":"        metadata_prefix \u003d metadata_prefix.lower()"},{"line_number":227,"context_line":"        metadata \u003d {}"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_e0d493ea","line":224,"in_reply_to":"1ae5cdf2_11e58adb","updated":"2014-06-13 06:49:30.000000000","message":"hrm.... yeah looks broken.  I guess the code wants to trap UnexpectedResponse and translate to empty dict - seems like a decision better left up to the caller.\n\nDone.","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af01776ff378c19d65498fc270ff6cb15f5de6be","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        :param container: The object\u0027s container."},{"line_number":563,"context_line":"        :param obj: The object."},{"line_number":564,"context_line":"        :param acceptable_statuses: List of status for valid responses,"},{"line_number":565,"context_line":"                                    defaults to (2, HTTP_NOT_FOUND)."},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":568,"context_line":"                                    to get a response with an acceptable status"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_b78a0662","line":565,"updated":"2014-06-11 16:12:56.000000000","message":"nit: add\n  :param headers: extra headers to send with request","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0d6104ce6ed90e178dd63fdce8a54432841e545","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        :param container: The object\u0027s container."},{"line_number":563,"context_line":"        :param obj: The object."},{"line_number":564,"context_line":"        :param acceptable_statuses: List of status for valid responses,"},{"line_number":565,"context_line":"                                    defaults to (2, HTTP_NOT_FOUND)."},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"        :raises UnexpectedResponse: Exception raised when requests fail"},{"line_number":568,"context_line":"                                    to get a response with an acceptable status"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_bb539ae0","line":565,"in_reply_to":"1ae5cdf2_b78a0662","updated":"2014-06-13 06:49:30.000000000","message":"Done","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"}],"swift/common/wsgi.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af01776ff378c19d65498fc270ff6cb15f5de6be","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            self.waitall()"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"def pipeline_property(name, **kwargs):"},{"line_number":205,"context_line":"    \"\"\""},{"line_number":206,"context_line":"    Create a property accessor for the given name.  The property will"},{"line_number":207,"context_line":"    dig through the bound instance on which it was accessed for an"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_f253bc14","line":204,"updated":"2014-06-11 16:12:56.000000000","message":"I can see this being useful in other scenarios e.g. if a piece of middleware wants to get access to the app\u0027s conf. But is this brittle? - there is a convention, but no requirement, for middlewares to name the next filter \u0027app\u0027. And would it break if a new piece of middleware happened to have an attr name conflict?","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4b57e84280a68b10c17d9c09221c90863a49d063","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            self.waitall()"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"def pipeline_property(name, **kwargs):"},{"line_number":205,"context_line":"    \"\"\""},{"line_number":206,"context_line":"    Create a property accessor for the given name.  The property will"},{"line_number":207,"context_line":"    dig through the bound instance on which it was accessed for an"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_a82f7b87","line":204,"in_reply_to":"1ae5cdf2_7615a93e","updated":"2014-06-16 16:37:58.000000000","message":"I guess the less brittle way would need to have the context loader pass references to the end of pipeline app to middleware filters during loading. Or pass the app config to other filters. That\u0027ll mean overriding some more loadwsgi stuff. Sounds like a follow on patch.\n\nproxy.controllers.base.py gets the parameter direct from the proxy server - its just internal client that uses this i think.","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0d6104ce6ed90e178dd63fdce8a54432841e545","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            self.waitall()"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"def pipeline_property(name, **kwargs):"},{"line_number":205,"context_line":"    \"\"\""},{"line_number":206,"context_line":"    Create a property accessor for the given name.  The property will"},{"line_number":207,"context_line":"    dig through the bound instance on which it was accessed for an"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_7615a93e","line":204,"in_reply_to":"1ae5cdf2_f253bc14","updated":"2014-06-13 06:49:30.000000000","message":"Yes, I agree, brittle.  I want it in internal client so I can get at the rings.  I rely on it in proxy.controllers.base to get the configured auto_create_account_prefix (which presumably no-one ever changes).\n\nSuggestions?","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af01776ff378c19d65498fc270ff6cb15f5de6be","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        if func and allow_modify_pipeline:"},{"line_number":355,"context_line":"            func(PipelineWrapper(ctx))"},{"line_number":356,"context_line":"    app \u003d ctx.create()"},{"line_number":357,"context_line":"    _add_pipeline_properties(app, \u0027auto_create_account_prefix\u0027)"},{"line_number":358,"context_line":"    return app"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_92c5185e","line":357,"updated":"2014-06-11 16:12:56.000000000","message":"sorry if i am missing the point - this adds an auto_create_account_prefix property to the app which for a pipeline is the leftmost filter? not sure i can see why? internal_client does this itself during its __init__","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0d6104ce6ed90e178dd63fdce8a54432841e545","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        if func and allow_modify_pipeline:"},{"line_number":355,"context_line":"            func(PipelineWrapper(ctx))"},{"line_number":356,"context_line":"    app \u003d ctx.create()"},{"line_number":357,"context_line":"    _add_pipeline_properties(app, \u0027auto_create_account_prefix\u0027)"},{"line_number":358,"context_line":"    return app"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_56226da3","line":357,"in_reply_to":"1ae5cdf2_92c5185e","updated":"2014-06-13 06:49:30.000000000","message":"oh hrmm... yeah I may not need it!\n\nDone.","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"}],"swift/proxy/controllers/obj.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af01776ff378c19d65498fc270ff6cb15f5de6be","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                                  body\u003d\u0027If-None-Match only supports *\u0027)"},{"line_number":461,"context_line":"        container_info \u003d self.container_info("},{"line_number":462,"context_line":"            self.account_name, self.container_name, req)"},{"line_number":463,"context_line":"        policy_index \u003d req.headers.get(POLICY_INDEX,"},{"line_number":464,"context_line":"                                       container_info[\u0027storage_policy\u0027])"},{"line_number":465,"context_line":"        obj_ring \u003d self.app.get_object_ring(policy_index)"},{"line_number":466,"context_line":"        # pass the policy index to storage nodes via req header"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_f2c2dce7","line":463,"updated":"2014-06-11 16:12:56.000000000","message":"curiosity: is this never needed for POST?","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0d6104ce6ed90e178dd63fdce8a54432841e545","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                                  body\u003d\u0027If-None-Match only supports *\u0027)"},{"line_number":461,"context_line":"        container_info \u003d self.container_info("},{"line_number":462,"context_line":"            self.account_name, self.container_name, req)"},{"line_number":463,"context_line":"        policy_index \u003d req.headers.get(POLICY_INDEX,"},{"line_number":464,"context_line":"                                       container_info[\u0027storage_policy\u0027])"},{"line_number":465,"context_line":"        obj_ring \u003d self.app.get_object_ring(policy_index)"},{"line_number":466,"context_line":"        # pass the policy index to storage nodes via req header"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_d6c11d4f","line":463,"in_reply_to":"1ae5cdf2_f2c2dce7","updated":"2014-06-13 06:49:30.000000000","message":"oh the override thing... no, it\u0027s not needed, but it should probably work there, and only does because of post-as-copy I\u0027d guess.\n\nLet me see if I can fix that or test it or something.\n\nDone.","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"}],"test/unit/common/test_wsgi.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af01776ff378c19d65498fc270ff6cb15f5de6be","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"            with open(conf_path, \u0027w\u0027) as f:"},{"line_number":1058,"context_line":"                f.write(dedent(conf_body))"},{"line_number":1059,"context_line":"            app \u003d wsgi.loadapp(conf_path)"},{"line_number":1060,"context_line":"            self.assertEquals(app.auto_create_account_prefix, \u0027-\u0027)"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"    def test_pipeline_property(self):"},{"line_number":1063,"context_line":"        depth \u003d 3"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_a6701973","line":1060,"updated":"2014-06-11 16:12:56.000000000","message":"i\u0027m sure i am missing the point, but... this test passes even if i remove wsgi.py line 357:\n\n  _add_pipeline_properties(app, \u0027auto_create_account_prefix\u0027)\n\nor are we just testing that _add_pipeline_properties doesn\u0027t change the property the app already has?","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0d6104ce6ed90e178dd63fdce8a54432841e545","unresolved":false,"context_lines":[{"line_number":1057,"context_line":"            with open(conf_path, \u0027w\u0027) as f:"},{"line_number":1058,"context_line":"                f.write(dedent(conf_body))"},{"line_number":1059,"context_line":"            app \u003d wsgi.loadapp(conf_path)"},{"line_number":1060,"context_line":"            self.assertEquals(app.auto_create_account_prefix, \u0027-\u0027)"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"    def test_pipeline_property(self):"},{"line_number":1063,"context_line":"        depth \u003d 3"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_58a8d71f","line":1060,"in_reply_to":"1ae5cdf2_a6701973","updated":"2014-06-13 06:49:30.000000000","message":"something like that, i changed these tests and removed the pipeline property modifier thing from the regular loadapp.  I mostly only care about it on the internal client.","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"}],"test/unit/proxy/controllers/test_base.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af01776ff378c19d65498fc270ff6cb15f5de6be","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        self.assertEqual(resp[\u0027status\u0027], 0)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def test_get_container_info_no_auto_account(self):"},{"line_number":281,"context_line":"        global FakeResponse_status_int"},{"line_number":282,"context_line":"        req \u003d Request.blank(\"/v1/.system_account/cont\","},{"line_number":283,"context_line":"                            environ\u003d{\u0027swift.cache\u0027: FakeCache({})})"},{"line_number":284,"context_line":"        with patch(\u0027swift.proxy.controllers.base.\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_86dcfde5","line":281,"updated":"2014-06-11 16:12:56.000000000","message":"nit: not used","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c0d6104ce6ed90e178dd63fdce8a54432841e545","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        self.assertEqual(resp[\u0027status\u0027], 0)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def test_get_container_info_no_auto_account(self):"},{"line_number":281,"context_line":"        global FakeResponse_status_int"},{"line_number":282,"context_line":"        req \u003d Request.blank(\"/v1/.system_account/cont\","},{"line_number":283,"context_line":"                            environ\u003d{\u0027swift.cache\u0027: FakeCache({})})"},{"line_number":284,"context_line":"        with patch(\u0027swift.proxy.controllers.base.\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1ae5cdf2_c9e6dbaf","line":281,"in_reply_to":"1ae5cdf2_86dcfde5","updated":"2014-06-13 06:49:30.000000000","message":"gawd, why is FakeRequest_status_int thing so janky anyway; you\u0027d think I would have just gotten rid of it altogether like real man.\n\nDone.","commit_id":"2cd90b740d9d3f188716e20dbeaa1305ebae923d"}]}
