)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"ca58592157aa1a8ba00ff1de496767890d284d7e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Tim Burke \u003ctim.burke@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-28 20:38:02 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Store SLO Etag and swift_bytes in sysmeta"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously, we had to GET the manifest for every HEAD or conditional"},{"line_number":10,"context_line":"request to an SLO. Worse, since SLO PUTs require that we HEAD every"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9ad45d7e_d606731f","line":7,"updated":"2016-08-08 17:21:21.000000000","message":"Would need to update the commit message to suit the current state. I believe swift_bytes changes are not included in this one.","commit_id":"69e7a260326bec5bb8f3129dc16b31c8fa00482c"}],"swift/common/middleware/slo.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ac59c96070796a56fd260017af97ec36731413fe","unresolved":false,"context_lines":[{"line_number":930,"context_line":"            env[\u0027CONTENT_TYPE\u0027] \u003d guessed_type or \u0027application/octet-stream\u0027"},{"line_number":931,"context_line":"        env[\u0027swift.content_type_overridden\u0027] \u003d True"},{"line_number":932,"context_line":"        env[\u0027CONTENT_TYPE\u0027] +\u003d \";swift_bytes\u003d%d\" % total_size"},{"line_number":933,"context_line":"        env[\u0027HTTP_X_STATIC_LARGE_OBJECT\u0027] \u003d \u0027True\u0027"},{"line_number":934,"context_line":"        json_data \u003d json.dumps(data_for_storage)"},{"line_number":935,"context_line":"        if six.PY3:"},{"line_number":936,"context_line":"            json_data \u003d json_data.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_75996b6e","side":"PARENT","line":933,"updated":"2016-07-28 10:22:30.000000000","message":"why did this get moved? just curious","commit_id":"9501d9617c1e6a718a9ae67b234bce291bcc2989"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ac59c96070796a56fd260017af97ec36731413fe","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        req.headers.setdefault(SYSMETA_SLO_SIZE, self.slo_size)"},{"line_number":376,"context_line":"        req.headers.setdefault(get_sys_meta_prefix(\u0027object\u0027) +"},{"line_number":377,"context_line":"                               \u0027Container-Update-Listing-Size\u0027, self.slo_size)"},{"line_number":378,"context_line":"        req.headers[\u0027X-Static-Large-Object\u0027] \u003d \u0027True\u0027"},{"line_number":379,"context_line":"        app_resp \u003d self._app_call(req.environ)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        for i, (header, value) in enumerate(self._response_headers):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_f59f1b5d","line":378,"updated":"2016-07-28 10:22:30.000000000","message":"I\u0027m curious why some, but not all, of the req setup was relocated to this method?","commit_id":"440f471ddd6c340b839d299fea75c3c3a1c6704e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1c56b949215fdda470076850936b7d15644dab4f","unresolved":false,"context_lines":[{"line_number":375,"context_line":"        req.headers.setdefault(SYSMETA_SLO_SIZE, self.slo_size)"},{"line_number":376,"context_line":"        req.headers.setdefault(get_sys_meta_prefix(\u0027object\u0027) +"},{"line_number":377,"context_line":"                               \u0027Container-Update-Listing-Size\u0027, self.slo_size)"},{"line_number":378,"context_line":"        req.headers[\u0027X-Static-Large-Object\u0027] \u003d \u0027True\u0027"},{"line_number":379,"context_line":"        app_resp \u003d self._app_call(req.environ)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        for i, (header, value) in enumerate(self._response_headers):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_f008addb","line":378,"in_reply_to":"bacf61ea_f59f1b5d","updated":"2016-07-28 17:48:47.000000000","message":"I was thinking that it was a better separation of concerns, but maybe that was wrong-headed. Now I\u0027m wondering why we don\u0027t just provide a wrapped_start_response below and nix this whole class...","commit_id":"440f471ddd6c340b839d299fea75c3c3a1c6704e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ac59c96070796a56fd260017af97ec36731413fe","unresolved":false,"context_lines":[{"line_number":975,"context_line":"            raise HTTPBadRequest(resp_body, content_type\u003dout_content_type)"},{"line_number":976,"context_line":"        env \u003d req.environ"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"        # Continue sending this in case object-server got upgraded before proxy"},{"line_number":979,"context_line":"        if not env.get(\u0027CONTENT_TYPE\u0027):"},{"line_number":980,"context_line":"            guessed_type, _junk \u003d mimetypes.guess_type(req.path_info)"},{"line_number":981,"context_line":"            env[\u0027CONTENT_TYPE\u0027] \u003d guessed_type or \u0027application/octet-stream\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_d552d7dc","line":978,"updated":"2016-07-28 10:22:30.000000000","message":"Does \"this\" refer to content-type in general to swift_bytes? Should it be in case proxy got upgraded before object server? Are we ever going to stop sending swift_bytes?","commit_id":"440f471ddd6c340b839d299fea75c3c3a1c6704e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1c56b949215fdda470076850936b7d15644dab4f","unresolved":false,"context_lines":[{"line_number":975,"context_line":"            raise HTTPBadRequest(resp_body, content_type\u003dout_content_type)"},{"line_number":976,"context_line":"        env \u003d req.environ"},{"line_number":977,"context_line":""},{"line_number":978,"context_line":"        # Continue sending this in case object-server got upgraded before proxy"},{"line_number":979,"context_line":"        if not env.get(\u0027CONTENT_TYPE\u0027):"},{"line_number":980,"context_line":"            guessed_type, _junk \u003d mimetypes.guess_type(req.path_info)"},{"line_number":981,"context_line":"            env[\u0027CONTENT_TYPE\u0027] \u003d guessed_type or \u0027application/octet-stream\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_b0ee35b2","line":978,"in_reply_to":"bacf61ea_d552d7dc","updated":"2016-07-28 17:48:47.000000000","message":"Both. If we could ever stop sending swift_bytes, we\u0027d no longer need to duplicate the content-type detection that from proxy/controllers/obj.py, so we\u0027d never need to think about content-type here.\n\nYes, I meant to say \"in case proxy got upgraded before object-server\" -- oops :P","commit_id":"440f471ddd6c340b839d299fea75c3c3a1c6704e"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"92fb0bd312d9f3221b36c06ebfc9a76a260b611f","unresolved":false,"context_lines":[{"line_number":587,"context_line":"        for header, value in self._response_headers:"},{"line_number":588,"context_line":"            if header.lower() \u003d\u003d SYSMETA_SLO_ETAG:"},{"line_number":589,"context_line":"                slo_etag \u003d value"},{"line_number":590,"context_line":"            elif header.lower() \u003d\u003d SYSMETA_SLO_SIZE:"},{"line_number":591,"context_line":"                slo_size \u003d value"},{"line_number":592,"context_line":"        is_conditional \u003d self._response_status.startswith((\u0027304\u0027, \u0027412\u0027)) and ("},{"line_number":593,"context_line":"            req.if_match or req.if_none_match)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_e329af38","line":590,"updated":"2016-09-16 02:28:13.000000000","message":"Not a huge deal, but this converts the header value to lower case for a second time. maybe convert to lower case once and store in variable and then compare the lowercased header to the specific values of interest.","commit_id":"803c5cee14f3efb2bdbaf2e1567495b5c4c96c9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"447b6e0602809d8820def5e1c184e221a0ebd5c0","unresolved":false,"context_lines":[{"line_number":587,"context_line":"        for header, value in self._response_headers:"},{"line_number":588,"context_line":"            if header.lower() \u003d\u003d SYSMETA_SLO_ETAG:"},{"line_number":589,"context_line":"                slo_etag \u003d value"},{"line_number":590,"context_line":"            elif header.lower() \u003d\u003d SYSMETA_SLO_SIZE:"},{"line_number":591,"context_line":"                slo_size \u003d value"},{"line_number":592,"context_line":"        is_conditional \u003d self._response_status.startswith((\u0027304\u0027, \u0027412\u0027)) and ("},{"line_number":593,"context_line":"            req.if_match or req.if_none_match)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_2377e502","line":590,"in_reply_to":"7a8ec9b2_e329af38","updated":"2016-09-16 21:38:15.000000000","message":"Done","commit_id":"803c5cee14f3efb2bdbaf2e1567495b5c4c96c9e"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"92fb0bd312d9f3221b36c06ebfc9a76a260b611f","unresolved":false,"context_lines":[{"line_number":597,"context_line":"            for i, (header, _value) in enumerate(self._response_headers):"},{"line_number":598,"context_line":"                if header.lower() \u003d\u003d \u0027etag\u0027:"},{"line_number":599,"context_line":"                    self._response_headers[i] \u003d (header, \u0027\"%s\"\u0027 % slo_etag)"},{"line_number":600,"context_line":"                elif is_conditional and header.lower() \u003d\u003d \u0027content-length\u0027:"},{"line_number":601,"context_line":"                    self._response_headers[i] \u003d (header, \u00270\u0027)"},{"line_number":602,"context_line":"                elif header.lower() \u003d\u003d \u0027content-length\u0027:"},{"line_number":603,"context_line":"                    self._response_headers[i] \u003d (header, slo_size)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_a3a8878e","line":600,"updated":"2016-09-16 02:28:13.000000000","message":"Same situation here for making multiple calls to lower for same header.","commit_id":"803c5cee14f3efb2bdbaf2e1567495b5c4c96c9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"447b6e0602809d8820def5e1c184e221a0ebd5c0","unresolved":false,"context_lines":[{"line_number":597,"context_line":"            for i, (header, _value) in enumerate(self._response_headers):"},{"line_number":598,"context_line":"                if header.lower() \u003d\u003d \u0027etag\u0027:"},{"line_number":599,"context_line":"                    self._response_headers[i] \u003d (header, \u0027\"%s\"\u0027 % slo_etag)"},{"line_number":600,"context_line":"                elif is_conditional and header.lower() \u003d\u003d \u0027content-length\u0027:"},{"line_number":601,"context_line":"                    self._response_headers[i] \u003d (header, \u00270\u0027)"},{"line_number":602,"context_line":"                elif header.lower() \u003d\u003d \u0027content-length\u0027:"},{"line_number":603,"context_line":"                    self._response_headers[i] \u003d (header, slo_size)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_c3d3a1d3","line":600,"in_reply_to":"7a8ec9b2_a3a8878e","updated":"2016-09-16 21:38:15.000000000","message":"Done","commit_id":"803c5cee14f3efb2bdbaf2e1567495b5c4c96c9e"},{"author":{"_account_id":18838,"name":"Paul Dardeau","email":"paul.dardeau@intel.com","username":"pdardeau"},"change_message_id":"92fb0bd312d9f3221b36c06ebfc9a76a260b611f","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        for h, v in resp_headers:"},{"line_number":678,"context_line":"            if h.lower() \u003d\u003d SYSMETA_SLO_ETAG:"},{"line_number":679,"context_line":"                slo_etag \u003d v"},{"line_number":680,"context_line":"            elif h.lower() \u003d\u003d SYSMETA_SLO_SIZE:"},{"line_number":681,"context_line":"                content_length \u003d v"},{"line_number":682,"context_line":"            elif h.lower() not in (\u0027etag\u0027, \u0027content-length\u0027):"},{"line_number":683,"context_line":"                response_headers.append((h, v))"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_a396c73c","line":680,"updated":"2016-09-16 02:28:13.000000000","message":"Same thing here for duplicate calls to lower","commit_id":"803c5cee14f3efb2bdbaf2e1567495b5c4c96c9e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"447b6e0602809d8820def5e1c184e221a0ebd5c0","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        for h, v in resp_headers:"},{"line_number":678,"context_line":"            if h.lower() \u003d\u003d SYSMETA_SLO_ETAG:"},{"line_number":679,"context_line":"                slo_etag \u003d v"},{"line_number":680,"context_line":"            elif h.lower() \u003d\u003d SYSMETA_SLO_SIZE:"},{"line_number":681,"context_line":"                content_length \u003d v"},{"line_number":682,"context_line":"            elif h.lower() not in (\u0027etag\u0027, \u0027content-length\u0027):"},{"line_number":683,"context_line":"                response_headers.append((h, v))"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_86052712","line":680,"in_reply_to":"7a8ec9b2_a396c73c","updated":"2016-09-16 21:38:15.000000000","message":"Done","commit_id":"803c5cee14f3efb2bdbaf2e1567495b5c4c96c9e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3fe8ec74f8a1788da70181ee39ccbfa7c9b96c3d","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        if req.method \u003d\u003d \u0027HEAD\u0027:"},{"line_number":523,"context_line":"            # We\u0027ve already looked for SYSMETA_SLO_ETAG/SIZE in the response"},{"line_number":524,"context_line":"            # and didn\u0027t find them. We have to fetch the whole manifest and"},{"line_number":525,"context_line":"            # recompute."},{"line_number":526,"context_line":"            return True"},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        response_status \u003d int(self._response_status[:3])"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_0ac0fddf","line":525,"updated":"2016-11-04 17:42:08.000000000","message":"right. this patch saves refetch and gather segments for HEADs.","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3fe8ec74f8a1788da70181ee39ccbfa7c9b96c3d","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                    what may be a static large object manifest (or may not)."},{"line_number":566,"context_line":"        :param start_response: WSGI start_response callable"},{"line_number":567,"context_line":"        \"\"\""},{"line_number":568,"context_line":"        update_etag_is_at_header(req, SYSMETA_SLO_ETAG)"},{"line_number":569,"context_line":"        resp_iter \u003d self._app_call(req.environ)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        # make sure this response is for a static large object manifest"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_102f4af7","line":568,"updated":"2016-11-04 17:42:08.000000000","message":"With this applied to every get or head, we change the behaviour of conditional requests with query string \"multipart-manifest\u003dget\". Previously these would match against the actual manifest body Etag, now they match against the slo etag.\n\nSLO Etags are of course a little weird, but a client that did and unconditional GET with multipart-manifest\u003dget, stashed the Etag and then used the etag in a subsequent If-Match header would see changed behaviour.\n\nSo should we add a condition:\n\n  if not req.params.get(\u0027multipart-manifest\u0027) \u003d\u003d \u0027get\u0027\n\nAlso we appear to have no unit or functional tests that cover this case.\n\nHere\u0027s a quick stab at a unit test:\n\nhttps://gist.github.com/alistairncoles/756d954e74dfd5e58e7ec763ce2b2c30\n\nnit: may be worth a comment to hint at the consequences of update_etag_is_at_header, for the benefit of those who did not live through the encryption feature branch, since it wields so much power ;)","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b28c32c30b21329fdea7cdb453e528aed1baca9d","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                    what may be a static large object manifest (or may not)."},{"line_number":566,"context_line":"        :param start_response: WSGI start_response callable"},{"line_number":567,"context_line":"        \"\"\""},{"line_number":568,"context_line":"        update_etag_is_at_header(req, SYSMETA_SLO_ETAG)"},{"line_number":569,"context_line":"        resp_iter \u003d self._app_call(req.environ)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        # make sure this response is for a static large object manifest"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_40aac986","line":568,"in_reply_to":"ba5da102_102f4af7","updated":"2016-11-04 19:10:42.000000000","message":"Done","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3fe8ec74f8a1788da70181ee39ccbfa7c9b96c3d","unresolved":false,"context_lines":[{"line_number":614,"context_line":"            req.if_match or req.if_none_match)"},{"line_number":615,"context_line":"        if slo_etag and slo_size and ("},{"line_number":616,"context_line":"                req.method \u003d\u003d \u0027HEAD\u0027 or is_conditional):"},{"line_number":617,"context_line":"            # Since we have length and etag, we can respond immediately"},{"line_number":618,"context_line":"            for i, (header, _value) in enumerate(self._response_headers):"},{"line_number":619,"context_line":"                lheader \u003d header.lower()"},{"line_number":620,"context_line":"                if lheader \u003d\u003d \u0027etag\u0027:"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_6a53396d","line":617,"updated":"2016-11-04 17:42:08.000000000","message":"ok.\n\nIf HEAD, then we just need to fix up the response headers from slo sysmeta.\n\nIf conditional then we know slo sysmeta existed and that update_etag_is_at_header() caused the conditional request to be correctly evaluated at object server, so we can trust the response 304/412 status.","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3fe8ec74f8a1788da70181ee39ccbfa7c9b96c3d","unresolved":false,"context_lines":[{"line_number":618,"context_line":"            for i, (header, _value) in enumerate(self._response_headers):"},{"line_number":619,"context_line":"                lheader \u003d header.lower()"},{"line_number":620,"context_line":"                if lheader \u003d\u003d \u0027etag\u0027:"},{"line_number":621,"context_line":"                    self._response_headers[i] \u003d (header, \u0027\"%s\"\u0027 % slo_etag)"},{"line_number":622,"context_line":"                elif lheader \u003d\u003d \u0027content-length\u0027 and not is_conditional:"},{"line_number":623,"context_line":"                    self._response_headers[i] \u003d (header, slo_size)"},{"line_number":624,"context_line":"            start_response(self._response_status,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_9902a5b3","line":621,"updated":"2016-11-04 17:42:08.000000000","message":"If I break this such that:\n\n  self._response_headers[i] \u003d (header, \u0027\"%s\"\u0027 % _value)\n\nthen no test in test_slo fails. The reason is that the change to FakeSwift in helpers.py is setting Etag\u003dslo_etag, so here all that is required is quoting for the tests to pass. In real swift, the response from object server has Etag !\u003d slo_etag.\n\nSee suggested change to helpers.py FakeSwift","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b28c32c30b21329fdea7cdb453e528aed1baca9d","unresolved":false,"context_lines":[{"line_number":618,"context_line":"            for i, (header, _value) in enumerate(self._response_headers):"},{"line_number":619,"context_line":"                lheader \u003d header.lower()"},{"line_number":620,"context_line":"                if lheader \u003d\u003d \u0027etag\u0027:"},{"line_number":621,"context_line":"                    self._response_headers[i] \u003d (header, \u0027\"%s\"\u0027 % slo_etag)"},{"line_number":622,"context_line":"                elif lheader \u003d\u003d \u0027content-length\u0027 and not is_conditional:"},{"line_number":623,"context_line":"                    self._response_headers[i] \u003d (header, slo_size)"},{"line_number":624,"context_line":"            start_response(self._response_status,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_c09ed962","line":621,"in_reply_to":"ba5da102_9902a5b3","updated":"2016-11-04 19:10:42.000000000","message":"Done","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3fe8ec74f8a1788da70181ee39ccbfa7c9b96c3d","unresolved":false,"context_lines":[{"line_number":986,"context_line":"                if header.lower() \u003d\u003d \u0027etag\u0027:"},{"line_number":987,"context_line":"                    headers[i] \u003d (\u0027Etag\u0027, \u0027\"%s\"\u0027 % slo_etag)"},{"line_number":988,"context_line":"                    break"},{"line_number":989,"context_line":"            return start_response(status, headers, exc_info)"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"        return self.app(env, start_response_wrapper)"},{"line_number":992,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_0ad71d24","line":989,"updated":"2016-11-04 17:42:08.000000000","message":"this is nice cleanup, the Put context class did seem unnecessary","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"f960c740638186051e68e4cf462d4fc79c710c37","unresolved":false,"context_lines":[{"line_number":571,"context_line":"            # X-Backend-Etag-Is-At header so that, if the SLO etag *was*"},{"line_number":572,"context_line":"            #  saved, we can trust the object-server to respond appropriately"},{"line_number":573,"context_line":"            # to If-Match/If-None-Match requests."},{"line_number":574,"context_line":"            update_etag_is_at_header(req, SYSMETA_SLO_ETAG)"},{"line_number":575,"context_line":"        resp_iter \u003d self._app_call(req.environ)"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"        # make sure this response is for a static large object manifest"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_515b9454","line":574,"updated":"2016-11-07 11:57:35.000000000","message":"+1","commit_id":"f9eb899cce81d45aabc27fd75cfb2deaaceffa76"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"51108b36f40a70bb0faa7ad6b32cab5e6004446d","unresolved":false,"context_lines":[{"line_number":608,"context_line":""},{"line_number":609,"context_line":"        slo_etag \u003d None"},{"line_number":610,"context_line":"        slo_size \u003d None"},{"line_number":611,"context_line":"        for header, value in self._response_headers:"},{"line_number":612,"context_line":"            header \u003d header.lower()"},{"line_number":613,"context_line":"            if header \u003d\u003d SYSMETA_SLO_ETAG:"},{"line_number":614,"context_line":"                slo_etag \u003d value"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_af5b852d","line":611,"updated":"2016-11-21 22:03:39.000000000","message":"nit (or my OCD kicking in): it\u0027s only a small enhancement, but couldn\u0027t we combine this for loop with the for loop in lines 579,582? \n\nIt seems wasteful to loop twice and just reading this method seems like a bunch of if statements with a for loop in each of them...\n\nof course this could be done later","commit_id":"04a11f49aeba912671eca5f9f6b66c0725da3ad9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"599ee880a359bc10d62bdb0be1d17600d9534baa","unresolved":false,"context_lines":[{"line_number":608,"context_line":""},{"line_number":609,"context_line":"        slo_etag \u003d None"},{"line_number":610,"context_line":"        slo_size \u003d None"},{"line_number":611,"context_line":"        for header, value in self._response_headers:"},{"line_number":612,"context_line":"            header \u003d header.lower()"},{"line_number":613,"context_line":"            if header \u003d\u003d SYSMETA_SLO_ETAG:"},{"line_number":614,"context_line":"                slo_etag \u003d value"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a77a97e_417d65e6","line":611,"in_reply_to":"7a77a97e_af5b852d","updated":"2016-11-21 22:41:08.000000000","message":"Done","commit_id":"04a11f49aeba912671eca5f9f6b66c0725da3ad9"}],"swift/obj/server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ac59c96070796a56fd260017af97ec36731413fe","unresolved":false,"context_lines":[{"line_number":578,"context_line":"            return HTTPInsufficientStorage(drive\u003ddevice, request\u003drequest)"},{"line_number":579,"context_line":""},{"line_number":580,"context_line":"        swift_bytes \u003d metadata.get("},{"line_number":581,"context_line":"            \u0027X-Object-Sysmeta-Container-Update-Listing-Size\u0027)"},{"line_number":582,"context_line":"        if not swift_bytes and (content_type_headers[\u0027Content-Type-Timestamp\u0027]"},{"line_number":583,"context_line":"                                !\u003d disk_file.data_timestamp):"},{"line_number":584,"context_line":"            # Current content-type is not from the datafile, but the datafile"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_90c18d83","line":581,"updated":"2016-07-28 10:22:30.000000000","message":"I think I understand what you\u0027re doing here with the new header and, given a fresh start, it would be a better design than swift_bytes. But given the legacy we have, I\u0027m not sure of the value of it. I\u0027m not sure how we SLO can stop sending swift_bytes without creating an upgrade problem, in which case we\u0027ll always have the required info in swift_bytes, and this just adds unnecessary complexity.\n\nIf the goal is to put in place some facility for other middlewares to override the listing size then I\u0027d prefer that to happen separately to addressing the SLO issue.","commit_id":"440f471ddd6c340b839d299fea75c3c3a1c6704e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ac59c96070796a56fd260017af97ec36731413fe","unresolved":false,"context_lines":[{"line_number":838,"context_line":""},{"line_number":839,"context_line":"        metadata[\u0027Content-Type\u0027], swift_bytes \u003d extract_swift_bytes("},{"line_number":840,"context_line":"            metadata[\u0027Content-Type\u0027])"},{"line_number":841,"context_line":"        swift_bytes \u003d metadata.get("},{"line_number":842,"context_line":"            \u0027X-Object-Sysmeta-Container-Update-Listing-Size\u0027, swift_bytes)"},{"line_number":843,"context_line":"        if swift_bytes:"},{"line_number":844,"context_line":"            metadata[\u0027Content-Type\u0027] +\u003d \u0027;swift_bytes\u003d%s\u0027 % swift_bytes"}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_d9f33109","line":841,"updated":"2016-07-28 10:22:30.000000000","message":"same comment as in the POST method: if swift_bytes is always going to be in content-type then let\u0027s just stick with using it and not introduce a duplicate mechanism.","commit_id":"440f471ddd6c340b839d299fea75c3c3a1c6704e"}],"test/unit/common/middleware/helpers.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3fe8ec74f8a1788da70181ee39ccbfa7c9b96c3d","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        backend_etag_header \u003d req.headers.get(\u0027X-Backend-Etag-Is-At\u0027)"},{"line_number":158,"context_line":"        if backend_etag_header and backend_etag_header in headers:"},{"line_number":159,"context_line":"            # Apply conditional etag overrides"},{"line_number":160,"context_line":"            headers[\u0027Etag\u0027] \u003d headers[backend_etag_header]"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        # range requests ought to work, hence conditional_response\u003dTrue"},{"line_number":163,"context_line":"        if isinstance(body, list):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_99762505","line":160,"updated":"2016-11-04 17:42:08.000000000","message":"this isn\u0027t what real swift does, and I\u0027d be concerned that setting the correct Etag value here could mask regressions in SLO (and possibly become confusing elsewhere).\n\nHow about:\n\n          backend_etag_header \u003d req.headers.get(\u0027X-Backend-Etag-Is-At\u0027)\n        conditional_etag \u003d None\n        if backend_etag_header:\n            conditional_etag \u003d headers.get(backend_etag_header)\n\n        # range requests ought to work, hence conditional_response\u003dTrue\n        if isinstance(body, list):\n            resp \u003d resp_class(\n                req\u003dreq, headers\u003dheaders, app_iter\u003dbody,\n                conditional_response\u003dreq.method in (\u0027GET\u0027, \u0027HEAD\u0027),\n                conditional_etag\u003dconditional_etag)\n        else:\n            resp \u003d resp_class(\n                req\u003dreq, headers\u003dheaders, body\u003dbody,\n                conditional_response\u003dreq.method in (\u0027GET\u0027, \u0027HEAD\u0027),\n                conditional_etag\u003dconditional_etag)\n\nwhich is similar to the object server behaviour. That way, slo *must* replace Etag with slo sysmeta etag for tests to pass.","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b28c32c30b21329fdea7cdb453e528aed1baca9d","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        backend_etag_header \u003d req.headers.get(\u0027X-Backend-Etag-Is-At\u0027)"},{"line_number":158,"context_line":"        if backend_etag_header and backend_etag_header in headers:"},{"line_number":159,"context_line":"            # Apply conditional etag overrides"},{"line_number":160,"context_line":"            headers[\u0027Etag\u0027] \u003d headers[backend_etag_header]"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        # range requests ought to work, hence conditional_response\u003dTrue"},{"line_number":163,"context_line":"        if isinstance(body, list):"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_4081e9fa","line":160,"in_reply_to":"ba5da102_99762505","updated":"2016-11-04 19:10:42.000000000","message":"Done. Thanks for the suggestion!","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"}],"test/unit/common/middleware/test_slo.py":[{"author":{"_account_id":22059,"name":"zheng yin","email":"yin__zheng@163.com","username":"zy751713126"},"change_message_id":"d2f7fa11c2dad80f050bd80386facfa5857d0c22","unresolved":false,"context_lines":[{"line_number":1113,"context_line":""},{"line_number":1114,"context_line":"class TestSloHeadManifest(TestSloHeadOldManifest):"},{"line_number":1115,"context_line":"    expect_GET \u003d False"},{"line_number":1116,"context_line":"    def _register_manifest(self):"},{"line_number":1117,"context_line":"        self.app.register("},{"line_number":1118,"context_line":"            \u0027GET\u0027, \u0027/v1/AUTH_test/headtest/man\u0027,"},{"line_number":1119,"context_line":"            swob.HTTPOk, {\u0027Content-Length\u0027: str(len(self.manifest_json)),"}],"source_content_type":"text/x-python","patch_set":1,"id":"dada55a8_11ad159b","line":1116,"range":{"start_line":1116,"start_character":4,"end_line":1116,"end_character":33},"updated":"2016-07-27 01:56:59.000000000","message":"It should have 1 blank line.","commit_id":"9be938d1f9ea0a92bb64c46ea68963fce329f21c"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"cf2870118cf17975121ff6264f05f1a2587db8eb","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"        self.assertEqual(self.app.calls, expected_app_calls)"},{"line_number":1127,"context_line":""},{"line_number":1128,"context_line":""},{"line_number":1129,"context_line":"class TestSloHeadManifest(TestSloHeadOldManifest):"},{"line_number":1130,"context_line":"    def setUp(self):"},{"line_number":1131,"context_line":"        self.expect_GET \u003d False"},{"line_number":1132,"context_line":"        self.extra_manifest_headers \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_8834c4de","line":1129,"updated":"2016-09-11 17:08:01.000000000","message":"There are no tests asserting the changes that now happen on a PUT request.","commit_id":"06d393622ff478d534f4383d0b4136e8be02602c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"26d9e319ae37dc21089174fb32b2075de06603b7","unresolved":false,"context_lines":[{"line_number":2908,"context_line":"            (\u0027GET\u0027, \u0027/v1/AUTH_test/gettest/b_10?multipart-manifest\u003dget\u0027),"},{"line_number":2909,"context_line":"            (\u0027GET\u0027, \u0027/v1/AUTH_test/gettest/c_15?multipart-manifest\u003dget\u0027),"},{"line_number":2910,"context_line":"            (\u0027GET\u0027, \u0027/v1/AUTH_test/gettest/d_20?multipart-manifest\u003dget\u0027),"},{"line_number":2911,"context_line":"        ])"},{"line_number":2912,"context_line":"        self.assertEqual(self.app.calls, expected_app_calls)"},{"line_number":2913,"context_line":"        self.assertEqual(self.app.headers[0].get(\u0027X-Backend-Etag-Is-At\u0027),"},{"line_number":2914,"context_line":"                         \u0027x-object-sysmeta-slo-etag\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_3c2de0a7","line":2911,"updated":"2016-10-28 11:14:32.000000000","message":"oh this is *so* awesome!","commit_id":"6980a8b8fc8ffd75313b01d6044091ae990fee8f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"26d9e319ae37dc21089174fb32b2075de06603b7","unresolved":false,"context_lines":[{"line_number":2973,"context_line":"            \u0027X-Object-Sysmeta-Slo-Etag\u0027: self.slo_etag,"},{"line_number":2974,"context_line":"            \u0027X-Object-Sysmeta-Slo-Size\u0027: \u002750\u0027,"},{"line_number":2975,"context_line":"        }"},{"line_number":2976,"context_line":"        super(TestSloConditionalGetNewManifest, self).setUp()"},{"line_number":2977,"context_line":""},{"line_number":2978,"context_line":""},{"line_number":2979,"context_line":"class TestSloBulkLogger(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_5c18d484","line":2976,"updated":"2016-10-28 11:14:32.000000000","message":"I didn\u0027t really even understand this was happening in the original patch!  so baller!","commit_id":"6980a8b8fc8ffd75313b01d6044091ae990fee8f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3fe8ec74f8a1788da70181ee39ccbfa7c9b96c3d","unresolved":false,"context_lines":[{"line_number":1103,"context_line":"            \u0027Content-Type\u0027: \u0027test/data\u0027,"},{"line_number":1104,"context_line":"            \u0027X-Static-Large-Object\u0027: \u0027true\u0027,"},{"line_number":1105,"context_line":"            \u0027Etag\u0027: md5hex(manifest_json)}"},{"line_number":1106,"context_line":"        manifest_headers.update(getattr(self, \u0027extra_manifest_headers\u0027, {}))"},{"line_number":1107,"context_line":"        self.app.register("},{"line_number":1108,"context_line":"            \u0027GET\u0027, \u0027/v1/AUTH_test/headtest/man\u0027,"},{"line_number":1109,"context_line":"            swob.HTTPOk, manifest_headers, manifest_json)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_445ca4ed","line":1106,"updated":"2016-11-04 17:42:08.000000000","message":"was this just here but never used on master? I can only see this patch using extra_manifest_headers","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b28c32c30b21329fdea7cdb453e528aed1baca9d","unresolved":false,"context_lines":[{"line_number":1103,"context_line":"            \u0027Content-Type\u0027: \u0027test/data\u0027,"},{"line_number":1104,"context_line":"            \u0027X-Static-Large-Object\u0027: \u0027true\u0027,"},{"line_number":1105,"context_line":"            \u0027Etag\u0027: md5hex(manifest_json)}"},{"line_number":1106,"context_line":"        manifest_headers.update(getattr(self, \u0027extra_manifest_headers\u0027, {}))"},{"line_number":1107,"context_line":"        self.app.register("},{"line_number":1108,"context_line":"            \u0027GET\u0027, \u0027/v1/AUTH_test/headtest/man\u0027,"},{"line_number":1109,"context_line":"            swob.HTTPOk, manifest_headers, manifest_json)"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_2a1cd676","line":1106,"in_reply_to":"ba5da102_445ca4ed","updated":"2016-11-04 19:10:42.000000000","message":"The patch that added it (https://review.openstack.org/#/c/391422/) was split off from this one. I suppose I could\u0027ve made that split a little cleaner...","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3fe8ec74f8a1788da70181ee39ccbfa7c9b96c3d","unresolved":false,"context_lines":[{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"class TestSloHeadManifest(TestSloHeadOldManifest):"},{"line_number":1162,"context_line":"    def setUp(self):"},{"line_number":1163,"context_line":"        self.expect_GET \u003d False"},{"line_number":1164,"context_line":"        self.extra_manifest_headers \u003d {"},{"line_number":1165,"context_line":"            \u0027X-Object-Sysmeta-Slo-Etag\u0027: self.slo_etag,"},{"line_number":1166,"context_line":"            \u0027X-Object-Sysmeta-Slo-Size\u0027: \u0027300\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_bfee69b2","line":1163,"updated":"2016-11-04 17:42:08.000000000","message":"nit: for consistency with other GET tests this could be named self.manifest_has_sysmeta. That\u0027s also more indicative of what the flag does.","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b28c32c30b21329fdea7cdb453e528aed1baca9d","unresolved":false,"context_lines":[{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"class TestSloHeadManifest(TestSloHeadOldManifest):"},{"line_number":1162,"context_line":"    def setUp(self):"},{"line_number":1163,"context_line":"        self.expect_GET \u003d False"},{"line_number":1164,"context_line":"        self.extra_manifest_headers \u003d {"},{"line_number":1165,"context_line":"            \u0027X-Object-Sysmeta-Slo-Etag\u0027: self.slo_etag,"},{"line_number":1166,"context_line":"            \u0027X-Object-Sysmeta-Slo-Size\u0027: \u0027300\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba5da102_65451f16","line":1163,"in_reply_to":"ba5da102_bfee69b2","updated":"2016-11-04 19:10:42.000000000","message":"Done","commit_id":"2d5cca1abf4d5425cc0a6b6eef1a951774a3e2b0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"57cf6aedb2e02036ce7614be81c45c1a2ca8d75c","unresolved":false,"context_lines":[{"line_number":1104,"context_line":"            \u0027Etag\u0027: md5hex(manifest_json)}"},{"line_number":1105,"context_line":"        manifest_headers.update(getattr(self, \u0027extra_manifest_headers\u0027, {}))"},{"line_number":1106,"context_line":"        self.manifest_has_sysmeta \u003d all(h in manifest_headers for h in ("},{"line_number":1107,"context_line":"            \u0027X-Object-Sysmeta-Slo-Etag\u0027, \u0027X-Object-Sysmeta-Slo-Size\u0027))"},{"line_number":1108,"context_line":"        self.app.register("},{"line_number":1109,"context_line":"            \u0027GET\u0027, \u0027/v1/AUTH_test/headtest/man\u0027,"},{"line_number":1110,"context_line":"            swob.HTTPOk, manifest_headers, manifest_json)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a629dbe_2641883a","line":1107,"updated":"2016-11-07 10:42:50.000000000","message":"nice","commit_id":"f9eb899cce81d45aabc27fd75cfb2deaaceffa76"}]}
