)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"01f589ad3d8b0f7b2495c1f4217c80eb803c1568","unresolved":false,"context_lines":[{"line_number":10,"context_line":"chunked transfer encoding bodies. [1] When glance is run under the"},{"line_number":11,"context_line":"eventlet wsgi server this was fine, because eventlet will dechunk the"},{"line_number":12,"context_line":"input on read() (or readline()) calls, so from the webob perspective"},{"line_number":13,"context_line":"it\u0027s just a file object. However, the effort to remove the dependence"},{"line_number":14,"context_line":"on using eventlet as the web server and deploy glance as a traditional"},{"line_number":15,"context_line":"wsgi script we lose this mechanism. The wsgi spec doesn\u0027t provide a"},{"line_number":16,"context_line":"consistent mechanism"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_749eb9b9","line":13,"updated":"2017-08-15 17:31:53.000000000","message":"with the effort","commit_id":"686a085da74677648431358209635359f65b7546"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1fa781109de23da20da8c48194883245f8527063","unresolved":false,"context_lines":[{"line_number":16,"context_line":"consistent mechanism"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"When we run glance under uwsgi the uwsgi server provides an api to read"},{"line_number":19,"context_line":"chunked data. [2] However, we need to explicitly call that api when to"},{"line_number":20,"context_line":"dechunk the data and pass it to glance code which expects a file object."},{"line_number":21,"context_line":"This commit solves this issue by creating a fake file class that will"},{"line_number":22,"context_line":"call the chunked_read() api from uwsgi on read() calls. This object is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9f436f4f_349ef106","line":19,"range":{"start_line":19,"start_character":49,"end_line":19,"end_character":53},"updated":"2017-08-15 18:05:04.000000000","message":"tell?","commit_id":"686a085da74677648431358209635359f65b7546"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"5ca596d2b1c74c6d538be004783dd06dab909f96","unresolved":false,"context_lines":[{"line_number":24,"context_line":"chunked transfer-encoding."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"In conjuction with devstack change"},{"line_number":27,"context_line":"Idf6b4b891ba31cccbeb53d373b40fce5380cea64 this closes glance bug 1703856"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"[1] https://docs.pylonsproject.org/projects/webob/en/stable/whatsnew-1.7.html#backwards-incompatibility"},{"line_number":30,"context_line":"[2] http://uwsgi-docs.readthedocs.io/en/latest/Chunked.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f4b6375_55d00bca","line":27,"updated":"2017-10-18 14:37:08.000000000","message":"wrong change ID... I think you mean Iab2e2848877fa1497008d18c05b0154892941589","commit_id":"d346c28552f76dc8331570b466a16fbbe05e2baf"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"77b2b87d6d2c5716368c2159399dffedbcea0f52","unresolved":false,"context_lines":[{"line_number":24,"context_line":"chunked transfer-encoding."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"In conjuction with devstack change"},{"line_number":27,"context_line":"Idf6b4b891ba31cccbeb53d373b40fce5380cea64 this closes glance bug 1703856"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"[1] https://docs.pylonsproject.org/projects/webob/en/stable/whatsnew-1.7.html#backwards-incompatibility"},{"line_number":30,"context_line":"[2] http://uwsgi-docs.readthedocs.io/en/latest/Chunked.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3f4b6375_d62ac28e","line":27,"in_reply_to":"3f4b6375_55d00bca","updated":"2017-10-18 15:48:53.000000000","message":"heh, oops yeah that\u0027s the change id for this commit","commit_id":"d346c28552f76dc8331570b466a16fbbe05e2baf"}],"glance/common/wsgi.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1fa781109de23da20da8c48194883245f8527063","unresolved":false,"context_lines":[{"line_number":950,"context_line":"            # Return the data if we\u0027ve reached the length"},{"line_number":951,"context_line":"            if length is not None:"},{"line_number":952,"context_line":"                position +\u003d len(data)"},{"line_number":953,"context_line":"                if position \u003e\u003d length:"},{"line_number":954,"context_line":"                    break"},{"line_number":955,"context_line":"            # Return everything if we reached the end of the file"},{"line_number":956,"context_line":"            if not data:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_346cb106","line":953,"range":{"start_line":953,"start_character":28,"end_line":953,"end_character":30},"updated":"2017-08-15 18:05:04.000000000","message":"Does it matter that this can return a chunk larger than the length parameter?","commit_id":"686a085da74677648431358209635359f65b7546"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"4ba44e532148f6e1274e9b637a079dac0e6cc856","unresolved":false,"context_lines":[{"line_number":950,"context_line":"            # Return the data if we\u0027ve reached the length"},{"line_number":951,"context_line":"            if length is not None:"},{"line_number":952,"context_line":"                position +\u003d len(data)"},{"line_number":953,"context_line":"                if position \u003e\u003d length:"},{"line_number":954,"context_line":"                    break"},{"line_number":955,"context_line":"            # Return everything if we reached the end of the file"},{"line_number":956,"context_line":"            if not data:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_ef765470","line":953,"range":{"start_line":953,"start_character":28,"end_line":953,"end_character":30},"in_reply_to":"9f436f4f_346cb106","updated":"2017-08-15 18:17:04.000000000","message":"In this context it shouldn\u0027t really matter since the code reading this \"file\" just loops over the file and handles the data back from read() dynamically. For example in the filesystem store: https://github.com/openstack/glance_store/blob/master/glance_store/_drivers/filesystem.py#L681-L687 the other stores I checked looked like they had the same loop.\n\nIf we were going for a strict file object implementation then yeah I think we\u0027d have to save the excess and return the exact size. But for this we\u0027re probably good enough.","commit_id":"686a085da74677648431358209635359f65b7546"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"7cf7cba2c6a02f0dd13675be1b49c6d3d9792f35","unresolved":false,"context_lines":[{"line_number":950,"context_line":"            # Return the data if we\u0027ve reached the length"},{"line_number":951,"context_line":"            if length is not None:"},{"line_number":952,"context_line":"                position +\u003d len(data)"},{"line_number":953,"context_line":"                if position \u003e\u003d length:"},{"line_number":954,"context_line":"                    break"},{"line_number":955,"context_line":"            # Return everything if we reached the end of the file"},{"line_number":956,"context_line":"            if not data:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_ef79b4c7","line":953,"range":{"start_line":953,"start_character":28,"end_line":953,"end_character":30},"in_reply_to":"9f436f4f_ef765470","updated":"2017-08-15 18:41:42.000000000","message":"That makes sense.  I can\u0027t imagine a consumer doing a hard check for len(buf) \u003e self.WRITE_CHUNKSIZE.  Though a C consumer could memory fault if not careful ;-)\n\nCause this code has C consumers, right?","commit_id":"686a085da74677648431358209635359f65b7546"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fba22e62ba92eccb973361cd37fcee0eb2c72caf","unresolved":false,"context_lines":[{"line_number":973,"context_line":"        if uwsgi:"},{"line_number":974,"context_line":"            if self.headers.get(\u0027transfer-encoding\u0027, \u0027\u0027).lower() \u003d\u003d \u0027chunked\u0027:"},{"line_number":975,"context_line":"                return _UWSGIChunkFile()"},{"line_number":976,"context_line":"        return super(Request, self).body_file"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"    @property"},{"line_number":979,"context_line":"    def params(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f436f4f_5cb4e57f","line":976,"updated":"2017-08-16 13:54:14.000000000","message":"I inspected the test failures and at least for some of them, the problem is that if we have a property in a class that also has a setter, we need to have the setting in this class too, otherwise it will not be found when used.\n\nPython doesn\u0027t go looking for it on the super...\n\nI\u0027ll go ahead and push up the fix.","commit_id":"686a085da74677648431358209635359f65b7546"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0a0004be98f9969efc29cf84eab8d1f7d1b5cc39","unresolved":false,"context_lines":[{"line_number":979,"context_line":"    def body_file(self, value):"},{"line_number":980,"context_line":"        # NOTE(cdent): If you have a property setter in a superclass, it will"},{"line_number":981,"context_line":"        # not be inherited. This duplicates the original from WebOb.request."},{"line_number":982,"context_line":"        # Using super here does not appear to work, but there may be ways"},{"line_number":983,"context_line":"        # around it."},{"line_number":984,"context_line":"        if isinstance(value, bytes):"},{"line_number":985,"context_line":"            raise ValueError(\u0027Excepted fileobj but received bytes.\u0027)"},{"line_number":986,"context_line":"        self.content_length \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f436f4f_67a5d6a1","line":983,"range":{"start_line":982,"start_character":62,"end_line":983,"end_character":20},"updated":"2017-08-16 14:11:56.000000000","message":"Yah, as follows:\n\n webob.Request.body_file.fset(self, value)\n\nIt\u0027s not pretty, but better than copying the method body.","commit_id":"9e2d19e179eaf40613002c5fd4cddadc897f2049"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"f1475688936ee01e9cbbc243a1a7117130a53d51","unresolved":false,"context_lines":[{"line_number":979,"context_line":"    def body_file(self, value):"},{"line_number":980,"context_line":"        # NOTE(cdent): If you have a property setter in a superclass, it will"},{"line_number":981,"context_line":"        # not be inherited. This duplicates the original from WebOb.request."},{"line_number":982,"context_line":"        # Using super here does not appear to work, but there may be ways"},{"line_number":983,"context_line":"        # around it."},{"line_number":984,"context_line":"        if isinstance(value, bytes):"},{"line_number":985,"context_line":"            raise ValueError(\u0027Excepted fileobj but received bytes.\u0027)"},{"line_number":986,"context_line":"        self.content_length \u003d None"}],"source_content_type":"text/x-python","patch_set":6,"id":"9f436f4f_02983872","line":983,"range":{"start_line":982,"start_character":62,"end_line":983,"end_character":20},"in_reply_to":"9f436f4f_67a5d6a1","updated":"2017-08-16 14:37:43.000000000","message":"Done","commit_id":"9e2d19e179eaf40613002c5fd4cddadc897f2049"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"0ff70448ffd2277871b65cccdd2f31c8b5931af9","unresolved":false,"context_lines":[{"line_number":322,"context_line":""},{"line_number":323,"context_line":"# Detect if we\u0027re running under the uwsgi server"},{"line_number":324,"context_line":"try:"},{"line_number":325,"context_line":"    import uwsgi"},{"line_number":326,"context_line":"    LOG.debug(\u0027Detected running under uwsgi\u0027)"},{"line_number":327,"context_line":"except ImportError:"},{"line_number":328,"context_line":"    LOG.debug(\u0027Detected not running under uwsgi\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f4e5783_911d2868","line":325,"updated":"2017-10-12 14:08:22.000000000","message":"Is it safe to assume that the presence of these libraries will properly reflect the runtime? Seems like you could install the uwsgi module but still not run under uwsgi.","commit_id":"cc253b3f41c6d70c65ebf684df839662b7233d1b"}],"glance/tests/unit/common/test_wsgi.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"74cd59f7acb109b5dc64d1f45f8fedfd88c7181a","unresolved":false,"context_lines":[{"line_number":749,"context_line":"    def test_read_no_data(self):"},{"line_number":750,"context_line":"        reader \u003d wsgi._UWSGIChunkFile()"},{"line_number":751,"context_line":"        wsgi.uwsgi \u003d mock.MagicMock()"},{"line_number":752,"context_line":"        self.addCleanup(_cleanup_uwsgi)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"        def fake_read():"},{"line_number":755,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_797d241b","line":752,"range":{"start_line":752,"start_character":8,"end_line":752,"end_character":39},"updated":"2017-10-19 14:08:09.000000000","message":"instead of adding it in each test we can add it in a setUp method as well.","commit_id":"bf7887a102ca33dd46ef24b67b07eb77154ce133"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"87820942e9cf5e7f6e28b9b150137914689c0d96","unresolved":false,"context_lines":[{"line_number":749,"context_line":"    def test_read_no_data(self):"},{"line_number":750,"context_line":"        reader \u003d wsgi._UWSGIChunkFile()"},{"line_number":751,"context_line":"        wsgi.uwsgi \u003d mock.MagicMock()"},{"line_number":752,"context_line":"        self.addCleanup(_cleanup_uwsgi)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"        def fake_read():"},{"line_number":755,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_9904607d","line":752,"range":{"start_line":752,"start_character":8,"end_line":752,"end_character":39},"in_reply_to":"3f4b6375_797d241b","updated":"2017-10-19 14:11:34.000000000","message":"It\u0027s not used in every test. It\u0027s the same reason I don\u0027t mock out the import in a setUp()","commit_id":"bf7887a102ca33dd46ef24b67b07eb77154ce133"}]}
