)]}'
{"swift/common/middleware/account_quotas.py":[{"author":{"_account_id":5600,"name":"Brian Cline","email":"bcline@softlayer.com","username":"briancline"},"change_message_id":"420e73291d6ca47561f5a8e3f94f282dbaf1ea21","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    swift -A http://127.0.0.1:8080/auth/v1.0 -U account:reseller -K secret \\"},{"line_number":54,"context_line":"post -m quota-count:"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"The same limitations apply for the account quotas as for the container quotas."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"For example, when uploading an object without a content-length header the proxy"},{"line_number":59,"context_line":"server doesn\u0027t know the final size of the currently uploaded object and the"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_a80eda31","line":56,"updated":"2016-05-18 20:09:03.000000000","message":"This line seems like it might need a minor update to reflect that container quotas have identical constraints except for object count quotas.","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"},{"author":{"_account_id":20553,"name":"Brian Ober","email":"bober@us.ibm.com","username":"ober37"},"change_message_id":"7c321a007ff7744eeadab69f937d9bda6b664c09","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    swift -A http://127.0.0.1:8080/auth/v1.0 -U account:reseller -K secret \\"},{"line_number":54,"context_line":"post -m quota-count:"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"The same limitations apply for the account quotas as for the container quotas."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"For example, when uploading an object without a content-length header the proxy"},{"line_number":59,"context_line":"server doesn\u0027t know the final size of the currently uploaded object and the"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_1401fbae","line":56,"in_reply_to":"bab6814e_a80eda31","updated":"2016-05-18 22:03:21.000000000","message":"Nice catch will update.","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"3e8841474b4bbe68327a81c810f2f219428b2395","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            return resp"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if request.method \u003d\u003d \"POST\" or not obj:"},{"line_number":99,"context_line":"            return self.app"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        account_info \u003d get_account_info(request.environ, self.app)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_30f9e8c9","line":99,"updated":"2016-05-18 01:57:27.000000000","message":"Wasn\u0027t the request.method check for POST done previously? Which means this should only really be an obj check:\n\n  if not obj:\n      return self.app","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"},{"author":{"_account_id":20553,"name":"Brian Ober","email":"bober@us.ibm.com","username":"ober37"},"change_message_id":"c255c06bd0f4bfe056e98c2013cdb148b7fa2f32","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            return resp"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        if request.method \u003d\u003d \"POST\" or not obj:"},{"line_number":99,"context_line":"            return self.app"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        account_info \u003d get_account_info(request.environ, self.app)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_2d9ddf65","line":99,"in_reply_to":"bab6814e_30f9e8c9","updated":"2016-05-18 18:48:34.000000000","message":"The previous check was for the inclusion of a PUT or POST.   So the intention here is that to 1) handle the headers on a PUT or POST 2) If the action is not a PUT on an object then return back.\n\nSo I think the check for a POST or not object here is still required because it will only allow a PUT for object to flow through.  \n\nLet me know if you disagree so I can better understand your concern.","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"3e8841474b4bbe68327a81c810f2f219428b2395","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if resp is not None:"},{"line_number":115,"context_line":"            return resp"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        return self.app"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def handle_quota_headers(self, container, request):"},{"line_number":120,"context_line":"        if not container:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_10f664d7","line":117,"updated":"2016-05-18 01:57:27.000000000","message":"It looks like response objects are returned only on errors. HTTP* objects from swob are exceptions and responses, we could clean up/simplify the code by raising the HTTP error responses then wrap in a try/except block:\n\n  try:\n      self.handle_quota_headers(container, request)\n      if not obj:\n          return self.app\n      ...\n      self.handle_byte_quota(request, account_info, account, ...\n      self.handle_object_count_quota(request, account_info)\n  except HTTPException as resp:\n      return resp\n\nCause all you need to do in functions is:\n\n  raise HTTPBadRequest()","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"},{"author":{"_account_id":20553,"name":"Brian Ober","email":"bober@us.ibm.com","username":"ober37"},"change_message_id":"c255c06bd0f4bfe056e98c2013cdb148b7fa2f32","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        if resp is not None:"},{"line_number":115,"context_line":"            return resp"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        return self.app"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def handle_quota_headers(self, container, request):"},{"line_number":120,"context_line":"        if not container:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_ad3a6f34","line":117,"in_reply_to":"bab6814e_10f664d7","updated":"2016-05-18 18:48:34.000000000","message":"Nice comment, I believe you are correct.   I\u0027ll update this and clean it up.","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"},{"author":{"_account_id":5600,"name":"Brian Cline","email":"bcline@softlayer.com","username":"briancline"},"change_message_id":"420e73291d6ca47561f5a8e3f94f282dbaf1ea21","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                \u0027X-Remove-Account-Meta-Quota-Bytes\u0027)"},{"line_number":128,"context_line":"            # object count quota"},{"line_number":129,"context_line":"            new_count_quota \u003d request.headers.get("},{"line_number":130,"context_line":"                \u0027X-Account-Meta-Quota-Count\u0027)"},{"line_number":131,"context_line":"            remove_count_quota \u003d request.headers.get("},{"line_number":132,"context_line":"                \u0027X-Remove-Account-Meta-Quota-Count\u0027)"},{"line_number":133,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_45c5973a","line":130,"updated":"2016-05-18 20:09:03.000000000","message":"I\u0027m thinking this might be too ambiguous a header name, since it\u0027s not apparent from the header what thing is being counted. What do you think about X-Account-Meta-Quota-Objects? I think a more specific name is especially ideal if there is work done down the road for a quota on containers counts.","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"},{"author":{"_account_id":20553,"name":"Brian Ober","email":"bober@us.ibm.com","username":"ober37"},"change_message_id":"7c321a007ff7744eeadab69f937d9bda6b664c09","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                \u0027X-Remove-Account-Meta-Quota-Bytes\u0027)"},{"line_number":128,"context_line":"            # object count quota"},{"line_number":129,"context_line":"            new_count_quota \u003d request.headers.get("},{"line_number":130,"context_line":"                \u0027X-Account-Meta-Quota-Count\u0027)"},{"line_number":131,"context_line":"            remove_count_quota \u003d request.headers.get("},{"line_number":132,"context_line":"                \u0027X-Remove-Account-Meta-Quota-Count\u0027)"},{"line_number":133,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_34f23fd3","line":130,"in_reply_to":"bab6814e_45c5973a","updated":"2016-05-18 22:03:21.000000000","message":"That\u0027s an interesting comment.   My initial intention was to make this match the object count format on a container.   But I 100% agree that it\u0027s ambiguous and I even further agree that extending to container counts will make it even more confusing.  \n\nI like the suggested name and I actually think eventually I\u0027ll extend this to include container counts, so I am OK with this change unless someone else has a disagreement.","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"e893a3a514ae61162356362beae0106298605de7","unresolved":false,"context_lines":[{"line_number":156,"context_line":""},{"line_number":157,"context_line":"    def handle_byte_quota(self, request, account_info, account,"},{"line_number":158,"context_line":"                          container, obj, ver):"},{"line_number":159,"context_line":"        if not account_info[\u0027bytes\u0027]:"},{"line_number":160,"context_line":"            return None"},{"line_number":161,"context_line":"        try:"},{"line_number":162,"context_line":"            quota \u003d int(account_info[\u0027meta\u0027].get(\u0027quota-bytes\u0027, -1))"}],"source_content_type":"text/x-python","patch_set":6,"id":"bab6814e_66944f44","line":159,"updated":"2016-05-24 02:15:14.000000000","message":"I am getting an error when I run TestAccount.test_account_quota_bytes because this case is reached, the account_info \u0027bytes\u0027 here is 0, so this returns None, although the new request is for the over-quota byte object.  Thus, the 11 byte object PUT succeeds when the test asserts that it does not.","commit_id":"bec24de90bb027690a824bd511424dc7d9c3caf3"}],"test/functional/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e7696ff16d98f11c2447f781a3b4cf3bf122f326","unresolved":false,"context_lines":[{"line_number":683,"context_line":"                swift_test_key[5] \u003d config[\u0027password6\u0027]"},{"line_number":684,"context_line":"                swift_test_tenant[5] \u003d config[\u0027account6\u0027]"},{"line_number":685,"context_line":"            except KeyError:"},{"line_number":686,"context_line":"                pass  # no service token tests can be run"},{"line_number":687,"context_line":"            for _ in range(3):"},{"line_number":688,"context_line":"                swift_test_perm[_] \u003d swift_test_user[_]"},{"line_number":689,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_07b97479","line":686,"updated":"2016-08-17 14:17:53.000000000","message":"the comment re service token tests does not apply here","commit_id":"e061e4c1d4638dce292b3daf0952640c1d126c9d"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"c0f8f0b43b9e1d5a79498a241d5f51a63abf26ba","unresolved":false,"context_lines":[{"line_number":770,"context_line":"    skip_if_no_reseller_admin \u003d in_process or not all([not skip,"},{"line_number":771,"context_line":"                                                      swift_test_user[5],"},{"line_number":772,"context_line":"                                                      swift_test_key[5],"},{"line_number":773,"context_line":"                                                      swift_test_tenant[5]])"},{"line_number":774,"context_line":"    if not skip and skip_if_no_reseller_admin:"},{"line_number":775,"context_line":"        print("},{"line_number":776,"context_line":"            \u0027SKIPPING FUNCTIONAL TESTS DUE TO NO CONFIG FOR RESELLER ADMIN\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9ad45d7e_f81c39c3","line":773,"updated":"2016-08-12 19:45:47.000000000","message":"Does this mean we would stop running these cases for in_process tests, whereas we could run them before?","commit_id":"e061e4c1d4638dce292b3daf0952640c1d126c9d"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e7696ff16d98f11c2447f781a3b4cf3bf122f326","unresolved":false,"context_lines":[{"line_number":770,"context_line":"    skip_if_no_reseller_admin \u003d in_process or not all([not skip,"},{"line_number":771,"context_line":"                                                      swift_test_user[5],"},{"line_number":772,"context_line":"                                                      swift_test_key[5],"},{"line_number":773,"context_line":"                                                      swift_test_tenant[5]])"},{"line_number":774,"context_line":"    if not skip and skip_if_no_reseller_admin:"},{"line_number":775,"context_line":"        print("},{"line_number":776,"context_line":"            \u0027SKIPPING FUNCTIONAL TESTS DUE TO NO CONFIG FOR RESELLER ADMIN\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_b2bc1c07","line":773,"in_reply_to":"9ad45d7e_f81c39c3","updated":"2016-08-17 14:17:53.000000000","message":"Why is this change needed?","commit_id":"e061e4c1d4638dce292b3daf0952640c1d126c9d"}]}
