)]}'
{"swift/obj/diskfile.py":[{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"a714c20c69fb3fe88c7291edb9f3c3aa8a74175e","unresolved":false,"context_lines":[{"line_number":2563,"context_line":"            raise DiskFileNotOpen()"},{"line_number":2564,"context_line":"        return self._metadata"},{"line_number":2565,"context_line":""},{"line_number":2566,"context_line":"    def read_metadata(self, current_time\u003dNone):"},{"line_number":2567,"context_line":"        \"\"\""},{"line_number":2568,"context_line":"        Return the metadata for an object without requiring the caller to open"},{"line_number":2569,"context_line":"        the object first."}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_3bbae16d","line":2566,"range":{"start_line":2566,"start_character":40,"end_line":2566,"end_character":45},"updated":"2018-02-19 03:14:29.000000000","message":"This default value is needed?\nIn my environment, all unit tests succeeded without this None.","commit_id":"3841d5261a5a710e234ab7c740014c39df19712c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a4cb951311da42f5c06f23c5728bb7b52492a4a2","unresolved":false,"context_lines":[{"line_number":2397,"context_line":"                    self._metadata[\u0027X-Delete-At\u0027]))"},{"line_number":2398,"context_line":"        else:"},{"line_number":2399,"context_line":"            if current_time is None:"},{"line_number":2400,"context_line":"                current_time \u003d time.time()"},{"line_number":2401,"context_line":"            if x_delete_at \u003c\u003d current_time and not self._open_expired:"},{"line_number":2402,"context_line":"                raise DiskFileExpired(metadata\u003dself._metadata)"},{"line_number":2403,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_94a58605","line":2400,"updated":"2018-05-31 22:31:51.000000000","message":"I wonder if this may have been better in open(), where we actually document that we\u0027ll apply a default.\n\nw/e","commit_id":"7a7677868d4ec7693132014779909ac70d4f391d"}],"swift/obj/mem_diskfile.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"924ef21519b1830804c1ada6a59f133fa4253224","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        self._filesystem \u003d fs"},{"line_number":274,"context_line":"        self.fragments \u003d None"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    def open(self, current_time\u003dNone, modernize\u003dFalse):"},{"line_number":277,"context_line":"        \"\"\""},{"line_number":278,"context_line":"        Open the file and read the metadata."},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_0cac9832","line":276,"updated":"2018-01-13 01:59:01.000000000","message":"How committed are we to not breaking alternate diskfile implementations?\n\nI\u0027m sure I asked about this in https://review.openstack.org/#/c/513569/ but I don\u0027t remember whether I got a definitive answer...\n\nEven if we take as granted that any alternate implementation will need to be updated to match the new contract, I\u0027m concerned about us adding the new arg at the *front*. You\u0027ll need to update both swift and some package for the alternate diskfile -- what happens when there\u0027s a failure that causes a restart in between?\n\nIf you upgraded swift first, the alternate diskfile either can\u0027t eat the new arg (if it was called with both), or misinterprets current_time as modernize.\n\nIf you upgrade the alternate diskfile first, it starts getting a bool where it was expecting a Unix time.","commit_id":"88a88fc516243f4a8d1d8d201d5ce682ead4d5ba"},{"author":{"_account_id":14766,"name":"Kazuhiro MIYAHARA","email":"miyahara.kazuhiro@lab.ntt.co.jp","username":"miyahara"},"change_message_id":"a714c20c69fb3fe88c7291edb9f3c3aa8a74175e","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            raise DiskFileNotOpen()"},{"line_number":387,"context_line":"        return self._metadata"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def read_metadata(self, current_time\u003dNone):"},{"line_number":390,"context_line":"        \"\"\""},{"line_number":391,"context_line":"        Return the metadata for an object."},{"line_number":392,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa0c359_dbb09d8e","line":389,"range":{"start_line":389,"start_character":40,"end_line":389,"end_character":45},"updated":"2018-02-19 03:14:29.000000000","message":"Same as my comment in swift/obj/diskfile.py","commit_id":"3841d5261a5a710e234ab7c740014c39df19712c"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a9314c5fcb244dd1fc0f61a063b0f67e50ce5482","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            raise DiskFileNotOpen()"},{"line_number":387,"context_line":"        return self._metadata"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def read_metadata(self, current_time\u003dNone):"},{"line_number":390,"context_line":"        \"\"\""},{"line_number":391,"context_line":"        Return the metadata for an object."},{"line_number":392,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1f9dbf25_45e62247","line":389,"range":{"start_line":389,"start_character":40,"end_line":389,"end_character":45},"in_reply_to":"3fa0c359_dbb09d8e","updated":"2018-02-28 23:41:18.000000000","message":"We want to signal to any alternate diskfile implementations (which, I\u0027ve gathered from https://docs.openstack.org/swift/latest/development_ondisk_backends.html#back-end-api-for-object-server-rest-apis, may well be a thing) that they should use a defaulted arg as well. By updating their code to reflect this new signature, users can\n\n- upgrade the package for the alternate-diskfile package then\n- upgrade swift to a version that uses the new arg\n\nand never have an object-server refuse to start or produce nothing but 500s because of a TypeError. Of course, if you upgraded swift *first*, you\u0027d have code that wanted to send a current time but a packaged that didn\u0027t know how to consume it, producing errors like\n\n TypeError: read_metadata() got an unexpected keyword argument \u0027current_time\u0027\n\nor\n\n TypeError: read_metadata() takes exactly 1 argument (2 given)\n\nIf the alternate diskfile *doesn\u0027t* provide a default, swift-then-diskfile upgrades fail as before, and diskfile-then-swift upgrades cause TypeErrors like\n\n TypeError: read_metadata() takes exactly 2 arguments (1 given)\n\nIdeally, of course, you\u0027d upgrade both packages at once, and only restart services after the upgrades. But there\u0027s always a chance the node crashes after one package upgrades but before the other runs -- if we can have healthy services on restart, we should do it.","commit_id":"3841d5261a5a710e234ab7c740014c39df19712c"}],"swift/obj/server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"30100bbaab064198f48725423f98df8c61bf33fe","unresolved":false,"context_lines":[{"line_number":903,"context_line":"        device, partition, account, container, obj, policy \u003d \\"},{"line_number":904,"context_line":"            get_name_and_placement(request, 5, 5, True)"},{"line_number":905,"context_line":"        request.headers.setdefault(\u0027X-Timestamp\u0027,"},{"line_number":906,"context_line":"                                   normalize_timestamp(time.time()))"},{"line_number":907,"context_line":"        req_timestamp \u003d valid_timestamp(request)"},{"line_number":908,"context_line":"        frag_prefs \u003d safe_json_loads("},{"line_number":909,"context_line":"            request.headers.get(\u0027X-Backend-Fragment-Preferences\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_30e98919","line":906,"updated":"2018-01-23 21:41:14.000000000","message":"this feels just like moving the time.time from there to here... or the requestor depending... It even opens a (weird? useful?) API by which to open expired objects (!?)","commit_id":"825a2ab709344299508a637e5dc87886fd036e44"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a4cb951311da42f5c06f23c5728bb7b52492a4a2","unresolved":false,"context_lines":[{"line_number":955,"context_line":"        device, partition, account, container, obj, policy \u003d \\"},{"line_number":956,"context_line":"            get_name_and_placement(request, 5, 5, True)"},{"line_number":957,"context_line":"        request.headers.setdefault(\u0027X-Timestamp\u0027,"},{"line_number":958,"context_line":"                                   normalize_timestamp(time.time()))"},{"line_number":959,"context_line":"        req_timestamp \u003d valid_timestamp(request)"},{"line_number":960,"context_line":"        frag_prefs \u003d safe_json_loads("},{"line_number":961,"context_line":"            request.headers.get(\u0027X-Backend-Fragment-Preferences\u0027))"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_94f34609","line":958,"range":{"start_line":958,"start_character":35,"end_line":958,"end_character":44},"updated":"2018-05-31 22:31:51.000000000","message":"Just made me wonder: Does X-Timestamp have to be normal, or could a proxy send something with an offset?","commit_id":"7a7677868d4ec7693132014779909ac70d4f391d"}],"test/unit/obj/test_server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"924ef21519b1830804c1ada6a59f133fa4253224","unresolved":false,"context_lines":[{"line_number":4507,"context_line":"        fd.write(\u0027GET /sda1/p/a/c/o HTTP/1.1\\r\\n\u0027"},{"line_number":4508,"context_line":"                 \u0027Host: localhost\\r\\n\u0027"},{"line_number":4509,"context_line":"                 \u0027X-Timestamp: %s\\r\\n\u0027"},{"line_number":4510,"context_line":"                 \u0027Connection: close\\r\\n\\r\\n\u0027 % normalize_timestamp(2.0))"},{"line_number":4511,"context_line":"        fd.flush()"},{"line_number":4512,"context_line":"        headers \u003d readuntil2crlfs(fd)"},{"line_number":4513,"context_line":"        exp \u003d \u0027HTTP/1.1 200\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_8c46687c","line":4510,"updated":"2018-01-13 01:59:01.000000000","message":"Not strictly necessary, yeah?\n\nBut totally worth having, both for the improved formatting and more accurately reflecting what really happens.","commit_id":"88a88fc516243f4a8d1d8d201d5ce682ead4d5ba"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"36a6f79ebb97917be4c99d73fe7bbafbb6b53405","unresolved":false,"context_lines":[{"line_number":4507,"context_line":"        fd.write(\u0027GET /sda1/p/a/c/o HTTP/1.1\\r\\n\u0027"},{"line_number":4508,"context_line":"                 \u0027Host: localhost\\r\\n\u0027"},{"line_number":4509,"context_line":"                 \u0027X-Timestamp: %s\\r\\n\u0027"},{"line_number":4510,"context_line":"                 \u0027Connection: close\\r\\n\\r\\n\u0027 % normalize_timestamp(2.0))"},{"line_number":4511,"context_line":"        fd.flush()"},{"line_number":4512,"context_line":"        headers \u003d readuntil2crlfs(fd)"},{"line_number":4513,"context_line":"        exp \u003d \u0027HTTP/1.1 200\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_a73764ff","line":4510,"in_reply_to":"7f96bb07_8c46687c","updated":"2018-01-23 18:31:01.000000000","message":"Pretty much, yeah.","commit_id":"88a88fc516243f4a8d1d8d201d5ce682ead4d5ba"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"924ef21519b1830804c1ada6a59f133fa4253224","unresolved":false,"context_lines":[{"line_number":6865,"context_line":"                mock.MagicMock(side_effect\u003d[gmtime(10001.0)])), \\"},{"line_number":6866,"context_line":"                mock.patch("},{"line_number":6867,"context_line":"                    \u0027time.time\u0027,"},{"line_number":6868,"context_line":"                    mock.MagicMock("},{"line_number":6869,"context_line":"                        side_effect\u003d[10000.0, 10000.0, 10001.0, 10002.0])), \\"},{"line_number":6870,"context_line":"                mock.patch("},{"line_number":6871,"context_line":"                    \u0027os.getpid\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_ec34ccfd","line":6868,"range":{"start_line":6868,"start_character":20,"end_line":6868,"end_character":35},"updated":"2018-01-13 01:59:01.000000000","message":"Off-topic: I think we can just do\n\n mock.patch(\u0027time.time\u0027,\n            side_effect\u003d[10000.0, 10000.0, 10001.0, 10002.0])\n\nno extra MagicMock necessary.","commit_id":"88a88fc516243f4a8d1d8d201d5ce682ead4d5ba"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"924ef21519b1830804c1ada6a59f133fa4253224","unresolved":false,"context_lines":[{"line_number":6869,"context_line":"                        side_effect\u003d[10000.0, 10000.0, 10001.0, 10002.0])), \\"},{"line_number":6870,"context_line":"                mock.patch("},{"line_number":6871,"context_line":"                    \u0027os.getpid\u0027,"},{"line_number":6872,"context_line":"                    mock.MagicMock(return_value\u003d1234)):"},{"line_number":6873,"context_line":"            req.get_response(self.object_controller)"},{"line_number":6874,"context_line":"        self.assertEqual("},{"line_number":6875,"context_line":"            self.logger.get_lines_for_level(\u0027info\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_8c3bc8e9","line":6872,"range":{"start_line":6872,"start_character":20,"end_line":6872,"end_character":34},"updated":"2018-01-13 01:59:01.000000000","message":"Similarly here...","commit_id":"88a88fc516243f4a8d1d8d201d5ce682ead4d5ba"}]}
