)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f5f69ae2c9f2a49924737b364484515d89d1cc1f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5bc41e57_ec758f33","updated":"2024-09-05 11:10:13.000000000","message":"-1 seems too harsh because I\u0027m not sure the fault lies in this eminently sensible patch, or if split_path ought to be checking for empty path elements, or the parent patch ought to have required account to be in the path??","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"13ba423865d33468eeb9360bc20d14839f2f2294","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"97cd8c3a_ffb68736","updated":"2024-09-10 03:56:10.000000000","message":"recheck\n\nSome test hang?\n```\n2024-09-10 02:10:18.435152 | centos-9-stream | test/probe/test_object_handoff.py::TestObjectHandoff::test_missing_primaries PASSED [ 39%]\n2024-09-10 02:10:24.486376 | centos-9-stream | test/probe/test_object_handoff.py::TestObjectHandoff::test_stale_reads PASSED [ 39%]\n2024-09-10 02:10:34.884489 | centos-9-stream | test/probe/test_object_handoff.py::TestECObjectHandoff::test_ec_handoff_duplicate_available PASSED [ 40%]\n2024-09-10 02:10:41.569354 | centos-9-stream | test/probe/test_object_handoff.py::TestECObjectHandoff::test_ec_handoff_overwrite PASSED [ 40%]\n2024-09-10 02:10:46.979821 | centos-9-stream | test/probe/test_object_handoff.py::TestECObjectHandoff::test_ec_primary_timeout PASSED [ 41%]\n2024-09-10 02:11:05.677175 | centos-9-stream | test/probe/test_object_metadata_replication.py::Test::test_object_after_replication_with_subsequent_post PASSED [ 42%]\n2024-09-10 03:54:13.075217 | RUN END RESULT_TIMED_OUT: [untrusted : opendev.org/openstack/swift/tools/playbooks/probetests/run.yaml@master]\n2024-09-10 03:54:13.080326 | POST-RUN START: [untrusted : opendev.org/openstack/swift/tools/playbooks/probetests/post.yaml@master]\n```","commit_id":"d405465b32a58376764dd4b0e3d7d32f2540b44e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"edd7e4d5ba76dc3da4d5a760cb8a1d64266482c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"94846711_c3a51301","updated":"2024-09-10 15:27:09.000000000","message":"recheck\n\n`openstacksdk-functional-devstack` failed in `openstack.tests.functional.compute.v2.test_volume_attachment.TestServerVolumeAttachment.test_volume_attachment` and `openstack.tests.functional.examples.test_compute.TestCompute.test_compute` -- nothing to do with us.\n\n`swift-probetests-centos-9-stream` failed in `test/probe/test_container_merge_policy_index.py::TestReservedNamespaceMergePolicyIndex::test_reconciler_move_object_twice`; see https://bugs.launchpad.net/swift/+bug/2028175","commit_id":"d405465b32a58376764dd4b0e3d7d32f2540b44e"},{"author":{"_account_id":22042,"name":"Chris Smart","email":"distroguy@gmail.com","username":"csmart"},"change_message_id":"5b149f8f4bbb6dd47a9fa863a0fbe3409d720ace","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"87cd696c_43445d6b","updated":"2024-09-10 06:54:55.000000000","message":"recheck\n\nlooks like timeout with devstack attaching a disk?..\n\n```\nWaiting 2.0 seconds\n{0} openstack.tests.functional.compute.v2.test_volume_attachment.TestServerVolumeAttachment.test_volume_attachment [2.402700s] ... FAILED\n```","commit_id":"d405465b32a58376764dd4b0e3d7d32f2540b44e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"350aa6351f2a8c7a92e2f8f44bf6924860ee6350","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b236462f_be38f01f","updated":"2024-09-10 09:29:41.000000000","message":"recheck\n\ntest/probe/test_container_merge_policy_index.py::TestContainerMergePolicyIndex::test_reconciler_move_object_twice FAILED\n\nhttps://bugs.launchpad.net/swift/+bug/2028175","commit_id":"d405465b32a58376764dd4b0e3d7d32f2540b44e"}],"swift/common/middleware/proxy_logging.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f5f69ae2c9f2a49924737b364484515d89d1cc1f","unresolved":true,"context_lines":[{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    def get_aco_from_path(self, swift_path):"},{"line_number":351,"context_line":"        try:"},{"line_number":352,"context_line":"            version, acc, cont, obj \u003d split_path(swift_path, 1, 4, True)"},{"line_number":353,"context_line":"            if not valid_api_version(version):"},{"line_number":354,"context_line":"                raise ValueError"},{"line_number":355,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":1,"id":"b60c20ea_71cd7066","line":352,"range":{"start_line":352,"start_character":61,"end_line":352,"end_character":62},"updated":"2024-09-05 11:10:13.000000000","message":"shouldn\u0027t this be 2?","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17caa7196912bc6a2a49dbc243e82e6f1268402d","unresolved":true,"context_lines":[{"line_number":353,"context_line":"            if not valid_api_version(version):"},{"line_number":354,"context_line":"                raise ValueError"},{"line_number":355,"context_line":"        except ValueError:"},{"line_number":356,"context_line":"            version, acc, cont, obj \u003d None, None, None, None"},{"line_number":357,"context_line":"        return acc, cont, obj"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def get_metric_name_type(self, req):"}],"source_content_type":"text/x-python","patch_set":1,"id":"83055426_2dda487c","line":356,"updated":"2024-09-05 11:15:29.000000000","message":"nit: maybe an opportunity to address this comment from parent https://review.opendev.org/c/openstack/swift/+/927143/comment/c1d41629_892f453e/","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eb1e9300d27d3381d82cf6b43a4258c382e03f5e","unresolved":false,"context_lines":[{"line_number":353,"context_line":"            if not valid_api_version(version):"},{"line_number":354,"context_line":"                raise ValueError"},{"line_number":355,"context_line":"        except ValueError:"},{"line_number":356,"context_line":"            version, acc, cont, obj \u003d None, None, None, None"},{"line_number":357,"context_line":"        return acc, cont, obj"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def get_metric_name_type(self, req):"}],"source_content_type":"text/x-python","patch_set":1,"id":"b3a04761_d8539fe3","line":356,"in_reply_to":"83055426_2dda487c","updated":"2024-09-05 21:12:06.000000000","message":"Done","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f5f69ae2c9f2a49924737b364484515d89d1cc1f","unresolved":true,"context_lines":[{"line_number":365,"context_line":"            return \u0027container\u0027"},{"line_number":366,"context_line":"        if acc:"},{"line_number":367,"context_line":"            return \u0027account\u0027"},{"line_number":368,"context_line":"        return req.environ.get(\u0027swift.source\u0027) or \u0027UNKNOWN\u0027"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def statsd_metric_name(self, req, status_int, method):"},{"line_number":371,"context_line":"        stat_type \u003d self.get_metric_name_type(req)"}],"source_content_type":"text/x-python","patch_set":1,"id":"11eb983d_a7d7712c","line":368,"updated":"2024-09-05 11:10:13.000000000","message":"yeah this makes sense, but there\u0027s a niche regression: consider a path ``/v1//c`` - there\u0027s no account but it\u0027s still considered to be a container metric, whereas before it\u0027d be UNKNOWN.\n\nI think the root cause is not requiring minsegs\u003d2 in the split_path at line 352 (see https://review.opendev.org/c/openstack/swift/+/917711/comment/0eb2673e_b240c07e/)\n\nOK, so something else is probably going to blow up if we have ``//`` in paths, but this middleware still ought to be robust in itself.\n\nIf I try a crazy url like:\n```\n$ curl -i http://saio3.1:8080/v1///junk -I -H \"X-Auth-Token: AUTH_tk0d2f995e9fae4456a3f08932dd9bc54e\"\n```\n\nStatsd before:\n```\nnvratelimit.allowed.other.head:1|c\nproxy-server.errors:1|c\nproxy-server.UNKNOWN.HEAD.412.timing:5.9781|ms\nproxy-server.UNKNOWN.HEAD.412.xfer:0|c\n```\n\nWith this patch:\n```\nstatsd:\nnvratelimit.allowed.other.head:1|c\nproxy-server.errors:1|c\nproxy-server.object.HEAD.412.timing:2.1117|ms\nproxy-server.object.HEAD.412.xfer:0|c\n```\n\n\nalso, yikes!...\n```\ncurl -i http://saio3.1:8080/v1/AUTH_test//junk -I -H \"X-Auth-Token: AUTH_...\"\nHTTP/1.1 500 Internal Error\n\nSep  5 06:51:01 vagrant proxy-server: Error: An error occurred: #012Traceback (most recent call last):#012  File \"/vagrant/swift/swift/common/middleware/catch_errors.py\", line 75, in handle_request#012    resp \u003d self._app_call(env)#012  File \"/vagrant/swift/swift/common/wsgi.py\", line 1142, in _app_call#012    resp \u003d self.app(env, self._start_response)#012  File \"/vagrant/swift/swift/common/middleware/gatekeeper.py\", line 129, in __call__#012    return self.app(env, gatekeeper_response)#012  File \"/vagrant/swift/swift/common/middleware/healthcheck.py\", line 52, in __call__#012    return self.app(env, start_response)#012  File \"/vagrant/swift/swift/common/middleware/proxy_logging.py\", line 471, in __call__#012    iterable \u003d self.app(env, my_start_response)#012  File \"/vagrant/swift/swift/common/middleware/domain_remap.py\", line 199, in __call__#012    return self.app(env, start_response)#012  File \"/vagrant/swift/swift/common/middleware/memcache.py\", line 32, in __call__#012    return self.app(env, start_response)#012  File \"/vagrant/swift/swift/common/middleware/listing_formats.py\", line 157, in __call__#012    return self.app(env, start_response)#012  File \"/vagrant/swift/swift/common/middleware/etag_quoter.py\", line 88, in __call__#012    container_info \u003d get_container_info(env, self.app, \u0027EQ\u0027)#012  File \"/vagrant/swift/swift/proxy/controllers/base.py\", line 451, in get_container_info#012    split_path(env[\u0027PATH_INFO\u0027], 3, 4, True)#012  File \"/vagrant/swift/swift/common/utils/base.py\", line 124, in split_path#012    raise ValueError(\u0027Invalid path: %s\u0027 % quote(path))#012ValueError: Invalid path: /v1/AUTH_test//junk (txn: tx1891f1464d0540d9a39c7-0066d98d15)\nSep  5 06:51:01 vagrant proxy-server: STDERR: 127.0.0.1 - - [05/Sep/2024 10:51:01] \"HEAD /v1/AUTH_test//junk HTTP/1.1\" 500 222 0.006879 (txn: tx1891f1464d0540d9a39c7-0066d98d15)\n```","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"17caa7196912bc6a2a49dbc243e82e6f1268402d","unresolved":true,"context_lines":[{"line_number":365,"context_line":"            return \u0027container\u0027"},{"line_number":366,"context_line":"        if acc:"},{"line_number":367,"context_line":"            return \u0027account\u0027"},{"line_number":368,"context_line":"        return req.environ.get(\u0027swift.source\u0027) or \u0027UNKNOWN\u0027"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def statsd_metric_name(self, req, status_int, method):"},{"line_number":371,"context_line":"        stat_type \u003d self.get_metric_name_type(req)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c6903906_51c0416c","line":368,"in_reply_to":"11eb983d_a7d7712c","updated":"2024-09-05 11:15:29.000000000","message":"Also, note, this crazy url\n```\ncurl -i http://saio3.1:8080/v1/AUTH_test/// -I -H \"X-Auth-Token: AUTH_tk0d2f995e9fae4456a3f08932dd9bc54e\"\n```\n\ngets same metrics before an after:\n```\nproxy-server.object.HEAD.500.timing:0.0851|ms\nproxy-server.object.HEAD.500.xfer:0|c\n```","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"c4d0a3658147693964c90ff6b91b68a722125ab7","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            return \u0027container\u0027"},{"line_number":366,"context_line":"        if acc:"},{"line_number":367,"context_line":"            return \u0027account\u0027"},{"line_number":368,"context_line":"        return req.environ.get(\u0027swift.source\u0027) or \u0027UNKNOWN\u0027"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def statsd_metric_name(self, req, status_int, method):"},{"line_number":371,"context_line":"        stat_type \u003d self.get_metric_name_type(req)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7c7dabbc_aa4a1f7c","line":368,"in_reply_to":"b5046c6b_63b948ec","updated":"2024-09-09 11:29:34.000000000","message":"Done","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eb1e9300d27d3381d82cf6b43a4258c382e03f5e","unresolved":true,"context_lines":[{"line_number":365,"context_line":"            return \u0027container\u0027"},{"line_number":366,"context_line":"        if acc:"},{"line_number":367,"context_line":"            return \u0027account\u0027"},{"line_number":368,"context_line":"        return req.environ.get(\u0027swift.source\u0027) or \u0027UNKNOWN\u0027"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def statsd_metric_name(self, req, status_int, method):"},{"line_number":371,"context_line":"        stat_type \u003d self.get_metric_name_type(req)"}],"source_content_type":"text/x-python","patch_set":1,"id":"b5046c6b_63b948ec","line":368,"in_reply_to":"c6903906_51c0416c","updated":"2024-09-05 21:12:06.000000000","message":"\u003e I think the root cause is not requiring minsegs\u003d2 in the split_path\n\nIDK -- I think the fault lies more in `split_path` allowing empty path components -- I don\u0027t think it\u0027s expected, necessary, or useful, as the 500s you found demonstrate.\n\nhttps://review.opendev.org/c/openstack/swift/+/928292","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"eb1e9300d27d3381d82cf6b43a4258c382e03f5e","unresolved":true,"context_lines":[{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def statsd_metric_name(self, req, status_int, method):"},{"line_number":371,"context_line":"        stat_type \u003d self.get_metric_name_type(req)"},{"line_number":372,"context_line":"        if stat_type is None:"},{"line_number":373,"context_line":"            return None"},{"line_number":374,"context_line":"        stat_method \u003d method if method in self.valid_methods \\"},{"line_number":375,"context_line":"            else \u0027BAD_METHOD\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3233dcf0_edf559c2","line":372,"range":{"start_line":372,"start_character":11,"end_line":372,"end_character":28},"updated":"2024-09-05 21:12:06.000000000","message":"Hmmm... this never trips now ...","commit_id":"4ee4b89c98ebe0c76dc52fc879bc1461c5a6ef4f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"c4d0a3658147693964c90ff6b91b68a722125ab7","unresolved":true,"context_lines":[{"line_number":372,"context_line":"    def statsd_metric_name(self, req, status_int, method):"},{"line_number":373,"context_line":"        stat_type \u003d self.get_metric_name_type(req)"},{"line_number":374,"context_line":"        if stat_type is None:"},{"line_number":375,"context_line":"            return None"},{"line_number":376,"context_line":"        stat_method \u003d method if method in self.valid_methods \\"},{"line_number":377,"context_line":"            else \u0027BAD_METHOD\u0027"},{"line_number":378,"context_line":"        return \u0027.\u0027.join((stat_type, stat_method, str(status_int)))"}],"source_content_type":"text/x-python","patch_set":3,"id":"873aeb9d_52a2bb96","side":"PARENT","line":375,"updated":"2024-09-09 11:29:34.000000000","message":"yes, it\u0027s now obvious that stat_type cannot be None","commit_id":"015cbaac868494c076a4470bb4dcfa907922d870"}]}
