)]}'
{"test/unit/obj/test_server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a44ae1baab6d67308834fed6b5378cea1560abb3","unresolved":false,"context_lines":[{"line_number":5847,"context_line":"        req \u003d Request.blank("},{"line_number":5848,"context_line":"            \u0027/sda1/p/a/c/o\u0027, environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027PUT\u0027},"},{"line_number":5849,"context_line":"            headers\u003d{\u0027X-Timestamp\u0027: normalize_timestamp(test_time - 1000),"},{"line_number":5850,"context_line":"                     \u0027X-Delete-At\u0027: str(delete_at_timestamp),"},{"line_number":5851,"context_line":"                     \u0027X-Delete-At-Container\u0027: delete_at_container,"},{"line_number":5852,"context_line":"                     \u0027Content-Length\u0027: \u00274\u0027,"},{"line_number":5853,"context_line":"                     \u0027Content-Type\u0027: \u0027application/octet-stream\u0027})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f013ff3_b544f0b8","line":5850,"updated":"2017-05-12 20:26:20.000000000","message":"Is this the problem?\n\n    x-timestamp \u003d now() + 10000 - 1000\n    x-delete-at \u003d now() + some small runtime delta + 1\n\nI know we have few timebased checks in obj_server...\n\n        if new_delete_at and new_delete_at \u003c time.time():\n            return HTTPBadRequest(body\u003d\u0027X-Delete-At in past\u0027, request\u003drequest,\n                                  content_type\u003d\u0027text/plain\u0027)","commit_id":"cdc4f1a771c506752c16e0dd00d3386efbb8cb3f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3ff5212352d3ee8a3aee641f240692fe2121d370","unresolved":false,"context_lines":[{"line_number":5847,"context_line":"        req \u003d Request.blank("},{"line_number":5848,"context_line":"            \u0027/sda1/p/a/c/o\u0027, environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027PUT\u0027},"},{"line_number":5849,"context_line":"            headers\u003d{\u0027X-Timestamp\u0027: normalize_timestamp(test_time - 1000),"},{"line_number":5850,"context_line":"                     \u0027X-Delete-At\u0027: str(delete_at_timestamp),"},{"line_number":5851,"context_line":"                     \u0027X-Delete-At-Container\u0027: delete_at_container,"},{"line_number":5852,"context_line":"                     \u0027Content-Length\u0027: \u00274\u0027,"},{"line_number":5853,"context_line":"                     \u0027Content-Type\u0027: \u0027application/octet-stream\u0027})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f013ff3_0e2db794","line":5850,"in_reply_to":"1f013ff3_b544f0b8","updated":"2017-05-15 16:16:55.000000000","message":"Yeah, the trouble is here -- we do an int() of the current time, which means the x-delete-at can be arbitrarily close to a full second behind time.time(). As a result, some bad luck and any delay can cause the object-server check to 400 as you\u0027ve pointed out.\n\nI guess I could just bump up the offsets used? Stopping time entirely seemed to be more consistent with the current spirit of the test, though.","commit_id":"cdc4f1a771c506752c16e0dd00d3386efbb8cb3f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3ff5212352d3ee8a3aee641f240692fe2121d370","unresolved":false,"context_lines":[{"line_number":5853,"context_line":"                     \u0027Content-Type\u0027: \u0027application/octet-stream\u0027})"},{"line_number":5854,"context_line":"        req.body \u003d \u0027TEST\u0027"},{"line_number":5855,"context_line":"        resp \u003d req.get_response(self.object_controller)"},{"line_number":5856,"context_line":"        self.assertEqual(resp.status_int, 201)"},{"line_number":5857,"context_line":""},{"line_number":5858,"context_line":"        orig_time \u003d object_server.time.time"},{"line_number":5859,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f013ff3_0e525714","line":5856,"updated":"2017-05-15 16:16:55.000000000","message":"Every time I\u0027ve seen a problem, it\u0027s failed at this assertion: 400 !\u003d 201.","commit_id":"cdc4f1a771c506752c16e0dd00d3386efbb8cb3f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b1dd48ee6b90dedd43f83515f43dec01793bca36","unresolved":false,"context_lines":[{"line_number":5858,"context_line":"        orig_time \u003d object_server.time.time"},{"line_number":5859,"context_line":"        try:"},{"line_number":5860,"context_line":"            t \u003d time() + 2"},{"line_number":5861,"context_line":"            object_server.time.time \u003d lambda: t"},{"line_number":5862,"context_line":"            req \u003d Request.blank("},{"line_number":5863,"context_line":"                \u0027/sda1/p/a/c/o\u0027,"},{"line_number":5864,"context_line":"                environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027POST\u0027},"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f044301_141f086d","line":5861,"updated":"2017-05-04 17:49:32.000000000","message":"hehe so we now monkey patch our mocked time!","commit_id":"cdc4f1a771c506752c16e0dd00d3386efbb8cb3f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a44ae1baab6d67308834fed6b5378cea1560abb3","unresolved":false,"context_lines":[{"line_number":5862,"context_line":"            req \u003d Request.blank("},{"line_number":5863,"context_line":"                \u0027/sda1/p/a/c/o\u0027,"},{"line_number":5864,"context_line":"                environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027POST\u0027},"},{"line_number":5865,"context_line":"                headers\u003d{\u0027X-Timestamp\u0027: normalize_timestamp(time())})"},{"line_number":5866,"context_line":"            resp \u003d req.get_response(self.object_controller)"},{"line_number":5867,"context_line":"            self.assertEqual(resp.status_int, 404)"},{"line_number":5868,"context_line":"        finally:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f013ff3_f5515864","line":5865,"updated":"2017-05-12 20:26:20.000000000","message":"oh maybe it\u0027s here?  this is orig_time?","commit_id":"cdc4f1a771c506752c16e0dd00d3386efbb8cb3f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"3b68c46562ea164b102db70f2b7f13504fb82461","unresolved":false,"context_lines":[{"line_number":5874,"context_line":"        resp \u003d req.get_response(self.object_controller)"},{"line_number":5875,"context_line":"        self.assertEqual(resp.status_int, 202)"},{"line_number":5876,"context_line":""},{"line_number":5877,"context_line":"        delete_at_timestamp \u003d int(time() + 2)"},{"line_number":5878,"context_line":"        delete_at_container \u003d str("},{"line_number":5879,"context_line":"            delete_at_timestamp /"},{"line_number":5880,"context_line":"            self.object_controller.expiring_objects_container_divisor *"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf3e73b7_493bd437","line":5877,"updated":"2017-08-07 07:08:23.000000000","message":"it looks like safe, increasing the time for delate_at will help to pass the assertion causing 400 BadRequest but it doesn\u0027t sound that it ensures the time not passed yet. i.e. it could hit the same problem yet.\n\nHowever, Sam already runs a lot of time and I don\u0027t think a few lines code takes 2 more seconds here. \n\nIf we could have another chance to clean up here, I would like to use mocks for swift.obj.server.time.time to be less than delete_at timestamp always.","commit_id":"fa83dd1ab44e963ce17b7c3842714bb9135d9400"}]}
