)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"707f279879c1374499d50c90c368a4ecbcb1554a","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Passing probe with bad behavior"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"I\u0027m don\u0027t think ssl.SSLContext ends up properly green\u0027d, but this works"},{"line_number":10,"context_line":"and it\u0027s just a vsaio"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I789b257635c031ac0cb6e4b5980f741e0cb5244d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"e897259e_596135a0","line":9,"updated":"2023-04-04 17:38:14.000000000","message":"this reads like a typo","commit_id":"bd29b500e78e4c6b4b58674b5b227ca67e604703"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95ebe5ca705abb8e636358759902083b6a07b7b6","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Passing probe with bad behavior"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"I\u0027m don\u0027t think ssl.SSLContext ends up properly green\u0027d, but this works"},{"line_number":10,"context_line":"and it\u0027s just a vsaio"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I789b257635c031ac0cb6e4b5980f741e0cb5244d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"cebf8185_fc394001","line":9,"in_reply_to":"e897259e_596135a0","updated":"2023-05-02 20:25:20.000000000","message":"Done","commit_id":"bd29b500e78e4c6b4b58674b5b227ca67e604703"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1e7842e90b060b54f2629df4f03cbdb2f668f993","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"bae1820c_c63aa86f","updated":"2022-12-03 01:25:21.000000000","message":"need to figure out the eventlet monkey patch thing - i\u0027m open to suggestions/help","commit_id":"9d370c9057961e44122ba0d45b06b77abc20bd4e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"34d207053de5fcdec49d2854e0516206c0c75ea0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"1d868eca_10f340cf","updated":"2023-03-22 17:18:11.000000000","message":"i also need some feedback on how i\u0027m working around the RecursionError","commit_id":"c3cb399c089943ee3fc9a31cbf27b1e36378edb9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"bfa8c91d1b491e09d3cf076629568735fbadc4ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c2044854_f8a6fa3a","updated":"2023-03-22 17:14:40.000000000","message":"so i need to pick the license and figure out which yaml file will install boto3\n\nE   ImportError: No module named boto3\n","commit_id":"c3cb399c089943ee3fc9a31cbf27b1e36378edb9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"803fe1b4161c14121b80b965e7afdaee9fa5f3f1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f620765c_d48d7beb","updated":"2023-03-31 18:01:18.000000000","message":"alternatively, it seems like installing an older version of requests-mock *also* prevents the RecursionError?\n\nvagrant@saio:~/swift$ pip freeze | grep requests\nrequests\u003d\u003d2.28.2\nrequests-mock\u003d\u003d1.2.0\nrequestsexceptions\u003d\u003d1.4.0\n","commit_id":"29f869ee12462ef41342796d4c53e56890d362b7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dd2c476488d90279d219846893eec55328d25a4b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"249e558e_95aa6e35","updated":"2023-04-03 23:28:43.000000000","message":"As long as we know *why* we\u0027re doing it and we\u0027re doing it *early*, I think I might be OK with this `reload()` business... though maybe past-me would have had a different opinion! https://bugs.launchpad.net/swift/+bug/1718803","commit_id":"bd29b500e78e4c6b4b58674b5b227ca67e604703"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"707f279879c1374499d50c90c368a4ecbcb1554a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b9cb9638_8f1d52e9","updated":"2023-04-04 17:38:14.000000000","message":"respin, look more closely at maybe pinning requests-mock","commit_id":"bd29b500e78e4c6b4b58674b5b227ca67e604703"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c6a17f36389270090e99cdd03857485864c39818","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"a8704a54_9602f592","updated":"2023-05-02 20:22:37.000000000","message":"i can\u0027t find a version of requests-mock that doesn\u0027t blow up\n\nI found this eventlet issue: https://github.com/eventlet/eventlet/issues/371\n\n... but it seemed to suggest that it was fixed already, and i\u0027m not sure why requests-mock breaks things, but the reload tick seems to work","commit_id":"628a1ee86d1b5b732e7d17d1a930facef901eefc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95ebe5ca705abb8e636358759902083b6a07b7b6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"db4929a0_d7a95601","updated":"2023-05-02 20:25:20.000000000","message":"i\u0027m not sure if Tim wanted me to refactor the imports more, or had an idea to avoid the reload","commit_id":"ba5b898f5ab73ed24a1f113a947f88e9b917a26c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"89aabdcfc918bcb6b67a0a3988ec8af927fe4c75","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"76ac2f90_f89074f7","updated":"2023-10-06 00:58:35.000000000","message":"i imagine i could make a case that it\u0027s reasonable for FakeSwift object responses to include this header; but maybe there\u0027s some middleware tests that will find it problematic or makes the diff too messy.","commit_id":"4d66d81fa307906be22f35bf11781c551feb21dd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"28ddfe9cc1ea27b8c9fc3df71c646975a5e82f43","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"8c0b0db5_283b228a","updated":"2023-10-09 14:44:29.000000000","message":"I think this breaks the proxy logging: response headers don\u0027t generally have x-backend-storage-policy-index\n\nHere\u0027s what I see in proxy logs for an object HEAD, on master:\n\n```\n$ git log --oneline -n 1\nd31a54a65 (HEAD -\u003e master, origin/master, origin/HEAD, gerrit/master) object: Block POSTs and chunked PUTs when already past reserve\n\n$ aws s3api get-object --bucket bucket-64ebf3e8-e4ad-4c11-a533-127f110714da --key mpu-b4742e63-979b-4b71-a791-1ad7f080d88a tmp\n```\n\n```\nOct  9 10:39:56 vagrant proxy-server: 127.0.0.1 127.0.0.1 09/Oct/2023/14/39/56 GET /bucket-64ebf3e8-e4ad-4c11-a533-127f110714da/mpu-b4742e63-979b-4b71-a791-1ad7f080d88a HTTP/1.0 200 - aws-cli/1.27.65%20Python/3.8.10%20Linux/5.4.0-90-generic%20botocore/1.29.65 - - 15728640 - txa2952e03da414cc1aba88-00652410bc - 0.1974 - - 1696862396.549717903 1696862396.747148514 0 0.049599647521972656 AUTH_test bucket-64ebf3e8-e4ad-4c11-a533-127f110714da mpu-b4742e63-979b-4b71-a791-1ad7f080d88a 200\n```\n\n and with this patch\n \n ```\n vagrant@vagrant:~/swift$ git log --oneline -n 1\n99b8daf67 (HEAD -\u003e review/clay_gerrard/mix-policy-mpu) Fix MPU cross-policy-segments\nvagrant@vagrant:~/swift$ swift-init restart proxy\nSignal proxy-server  pid: 52145  signal: Signals.SIGTERM\nSignal proxy-server  pid: 52146  signal: Signals.SIGTERM\nproxy-server (52145) appears to have stopped\nproxy-server (52146) appears to have stopped\nWARNING: Unable to modify max process limit.  Running as non-root?\nStarting proxy-server...(/etc/swift/proxy-server/proxy-noauth.conf.d)\nStarting proxy-server...(/etc/swift/proxy-server/proxy-server.conf.d)\nvagrant@vagrant:~/swift$ aws s3api get-object --bucket bucket-64ebf3e8-e4ad-4c11-a533-127f110714da --key mpu-b4742e63-979b-4b71-a791-1ad7f080d88a tmp\n{\n    \"LastModified\": \"Mon, 09 Oct 2023 13:52:17 GMT\",\n    \"ContentLength\": 15728640,\n    \"ETag\": \"\\\"fd453aaf14ea07844745550b30b084d7-3\\\"\",\n    \"ContentType\": \"application/octet-stream\",\n    \"Metadata\": {}\n}\n```\n\n```\n Oct  9 10:40:40 vagrant proxy-server: 127.0.0.1 127.0.0.1 09/Oct/2023/14/40/40 GET /bucket-64ebf3e8-e4ad-4c11-a533-127f110714da/mpu-b4742e63-979b-4b71-a791-1ad7f080d88a HTTP/1.0 200 - aws-cli/1.27.65%20Python/3.8.10%20Linux/5.4.0-90-generic%20botocore/1.29.65 - - 15728640 - tx8e3b159fb5c54aaf8b322-00652410e8 - 0.2028 - - 1696862440.510453701 1696862440.713208675 - 0.0371091365814209 AUTH_test bucket-64ebf3e8-e4ad-4c11-a533-127f110714da mpu-b4742e63-979b-4b71-a791-1ad7f080d88a 200\n ```\n \n note: policy index missing at index [-6] in message parts","commit_id":"99b8daf674a3a1bbd87c756c008c2f76b2c4e8e6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"5c08d1e2c22ada85ea6e74cd21f442b1f1a42841","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"258876af_9d452e24","updated":"2023-10-09 14:59:01.000000000","message":"This probably works better (which is from your other patch https://review.opendev.org/c/openstack/swift/+/866509/2/swift/common/middleware/s3api/s3request.py):\n\n```\ndiff --git a/swift/common/middleware/s3api/s3request.py b/swift/common/middleware/s3api/s3request.py\nindex 376de65af..5059a3fc6 100644\n--- a/swift/common/middleware/s3api/s3request.py\n+++ b/swift/common/middleware/s3api/s3request.py\n@@ -1365,6 +1365,13 @@ class S3Request(swob.Request):\n             self.environ[\u0027s3api.backend_path\u0027] \u003d sw_resp.environ[\u0027PATH_INFO\u0027]\n\n         resp \u003d S3Response.from_swift_resp(sw_resp)\n+        # The sw_req was updated with X-Backend-Storage-Policy-Index which is\n+        # useful to proxy_logging, so copy it across to the s3 *response*.\n+        # Note: do NOT copy X-Backend-Storage-Policy-Index to the s3 *request*\n+        # because that may be used to make other sub-requests.\n+        spi_header \u003d \u0027X-Backend-Storage-Policy-Index\u0027\n+        if spi_header in sw_req.headers:\n+            resp.headers[spi_header] \u003d sw_req.headers[spi_header]\n         status \u003d resp.status_int  # pylint: disable-msg\u003dE1101\n\n         if not self.user_id:\n```","commit_id":"99b8daf674a3a1bbd87c756c008c2f76b2c4e8e6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a31b95a658598cdbef354c4d2fe5b5d0b04ad192","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"b4b30dc5_bcfb0ac0","updated":"2023-10-10 17:57:46.000000000","message":"alternative here https://review.opendev.org/c/openstack/swift/+/897864","commit_id":"99b8daf674a3a1bbd87c756c008c2f76b2c4e8e6"}],"swift/common/middleware/s3api/s3request.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"28ddfe9cc1ea27b8c9fc3df71c646975a5e82f43","unresolved":true,"context_lines":[{"line_number":920,"context_line":"                                     swob.str_to_wsgi(src_obj),"},{"line_number":921,"context_line":"                                     headers\u003dheaders, query\u003dquery)"},{"line_number":922,"context_line":"        # we can\u0027t let this HEAD req spoil our COPY"},{"line_number":923,"context_line":"        self.headers.pop(\u0027x-backend-storage-policy-index\u0027)"},{"line_number":924,"context_line":"        if src_resp.status_int \u003d\u003d 304:  # pylint: disable-msg\u003dE1101"},{"line_number":925,"context_line":"            raise PreconditionFailed()"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"b8d84398_82fb63a8","side":"PARENT","line":923,"updated":"2023-10-09 14:44:29.000000000","message":"ok. This was undoing the req headers previously set at line 1369.\n\nIn the case of a COPY we didn\u0027t want the policy index sent back with an earlier HEAD to contaminate the PUT.\n\nA middleware to the left of s3api could set this header (we are acknowledging that middleware to the left can find backend headers \"useful\"). IIUC the proxy respects it for the GET/HEAD and the PUT if not removed here. But the same is true for any PUT/POST - if a middleware sets x-backend-storage-policy-index then it has to take responsibility for the consequences. So I think this is OK.\n\nInteresting to note swift COPY middleware strips x-backend-storage-policy-index from its GET request but not the PUT.","commit_id":"fe30715d973581386a6838cc87311ad09314d1c4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"28ddfe9cc1ea27b8c9fc3df71c646975a5e82f43","unresolved":true,"context_lines":[{"line_number":1365,"context_line":"                                            2, 3, True)"},{"line_number":1366,"context_line":"            # Update s3.backend_path from the response environ"},{"line_number":1367,"context_line":"            self.environ[\u0027s3api.backend_path\u0027] \u003d sw_resp.environ[\u0027PATH_INFO\u0027]"},{"line_number":1368,"context_line":"            # Propogate backend headers back into our req headers for logging"},{"line_number":1369,"context_line":"            for k, v in sw_req.headers.items():"},{"line_number":1370,"context_line":"                if k.lower().startswith(\u0027x-backend-\u0027):"},{"line_number":1371,"context_line":"                    self.headers.setdefault(k, v)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1f31f6b4_7461a37c","side":"PARENT","line":1368,"updated":"2023-10-09 14:44:29.000000000","message":"ok. proxy_logging actually looks in resp headers first anyway","commit_id":"fe30715d973581386a6838cc87311ad09314d1c4"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"28ddfe9cc1ea27b8c9fc3df71c646975a5e82f43","unresolved":true,"context_lines":[{"line_number":1368,"context_line":"            # Propogate backend headers back into our req headers for logging"},{"line_number":1369,"context_line":"            for k, v in sw_req.headers.items():"},{"line_number":1370,"context_line":"                if k.lower().startswith(\u0027x-backend-\u0027):"},{"line_number":1371,"context_line":"                    self.headers.setdefault(k, v)"},{"line_number":1372,"context_line":""},{"line_number":1373,"context_line":"        resp \u003d S3Response.from_swift_resp(sw_resp)"},{"line_number":1374,"context_line":"        status \u003d resp.status_int  # pylint: disable-msg\u003dE1101"}],"source_content_type":"text/x-python","patch_set":11,"id":"6a46ea59_fcd3b0f1","side":"PARENT","line":1371,"updated":"2023-10-09 14:44:29.000000000","message":"this seemed suspect","commit_id":"fe30715d973581386a6838cc87311ad09314d1c4"}],"swift/common/middleware/s3api/s3response.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"28ddfe9cc1ea27b8c9fc3df71c646975a5e82f43","unresolved":true,"context_lines":[{"line_number":97,"context_line":"    elif _key.startswith(\u0027x-backend-\u0027):"},{"line_number":98,"context_line":"        # x-backend resp headers are useful for other middleware like logging"},{"line_number":99,"context_line":"        # and filtered by gatekeeper"},{"line_number":100,"context_line":"        return key, val"},{"line_number":101,"context_line":"    # else, drop the header"},{"line_number":102,"context_line":"    return None"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"2701b75f_cf86d290","line":100,"updated":"2023-10-09 14:44:29.000000000","message":"should we also include sysmeta \u0026 transient-sysmeta i.e. everything that gatekeeper will remove?","commit_id":"99b8daf674a3a1bbd87c756c008c2f76b2c4e8e6"}],"test/probe/__init__.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1e7842e90b060b54f2629df4f03cbdb2f668f993","unresolved":true,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import eventlet"},{"line_number":18,"context_line":"# eventlet.monkey_patch()"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from test import get_config"},{"line_number":21,"context_line":"from swift.common.utils import config_true_value"}],"source_content_type":"text/x-python","patch_set":1,"id":"a820c1e0_40d8ef6f","line":18,"updated":"2022-12-03 01:25:21.000000000","message":"umm... not sure yet what\u0027s going on here\n\ndrop something like:\n\n\timport unittest\n\timport boto3\n\n\n\tclass TestCase(unittest.TestCase):\n\n\t    def setUp(self):\n\t\tself.c \u003d boto3.client(\u0027s3\u0027, endpoint_url\u003d\u0027http://saio:8080\u0027,\n\t\t\t\t      region_name\u003d\u0027us-east-1\u0027,\n\t\t\t\t      aws_access_key_id\u003d\u0027test:tester\u0027,\n\t\t\t\t      aws_secret_access_key\u003d\u0027testing\u0027)\n\n\t    def test(self):\n\t\tresp \u003d self.c.list_buckets()\n\t\tself.assertEqual(resp[\u0027Buckets\u0027], [])\n\ninto `test/probe/test_boto3.py` and `pytest test/probe/test_boto3.py` will fail with something like:\n\n\t/usr/lib/python3.10/ssl.py:620: in options\n\t    super(SSLContext, SSLContext).options.__set__(self, value)\n\t/usr/lib/python3.10/ssl.py:620: in options\n\t    super(SSLContext, SSLContext).options.__set__(self, value)\n\tE   RecursionError: maximum recursion depth exceeded\n\t!!! Recursion detected (same locals \u0026 position)","commit_id":"9d370c9057961e44122ba0d45b06b77abc20bd4e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fecbe3cf30f8df6d781779a35803b3a5365a716","unresolved":true,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import eventlet"},{"line_number":18,"context_line":"# eventlet.monkey_patch()"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from test import get_config"},{"line_number":21,"context_line":"from swift.common.utils import config_true_value"}],"source_content_type":"text/x-python","patch_set":1,"id":"58601746_6d402ed6","line":18,"in_reply_to":"a820c1e0_40d8ef6f","updated":"2023-01-25 18:29:55.000000000","message":"*sigh* Looks like requests-mock (installed for the sake of unit tests) installs a pytest plugin that causes requests to get imported before we have a chance to have eventlet monkey-patch -- when the test uses Boto which in turn uses requests, the delayed monkey-patching causes the recursion error.","commit_id":"9d370c9057961e44122ba0d45b06b77abc20bd4e"}],"test/probe/test_mixed_policy_mpu.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1e7842e90b060b54f2629df4f03cbdb2f668f993","unresolved":true,"context_lines":[{"line_number":83,"context_line":"            if err.http_status !\u003d HTTP_NOT_FOUND:"},{"line_number":84,"context_line":"                raise"},{"line_number":85,"context_line":"        else:"},{"line_number":86,"context_line":"            self.fail(\u0027found manifest in correct policy?\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        # the manifest will get moved by the reconciler"},{"line_number":89,"context_line":"        self.get_to_final_state()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ef149b16_c5c8822f","line":86,"updated":"2022-12-03 01:25:21.000000000","message":"swift versions less \u003c\u003d2.25.0.7 fail here, there\u0027s no cross-policy contamination","commit_id":"9d370c9057961e44122ba0d45b06b77abc20bd4e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"34d207053de5fcdec49d2854e0516206c0c75ea0","unresolved":true,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @unittest.skipIf(len(ENABLED_POLICIES) \u003c 2, \"Need more than one policy\")"},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        reload(ssl)  # fixes RecursionError"},{"line_number":35,"context_line":"        self.s3 \u003d boto3.client(\u0027s3\u0027, endpoint_url\u003dPROXY_BASE_URL,"},{"line_number":36,"context_line":"                               region_name\u003d\u0027us-east-1\u0027,"},{"line_number":37,"context_line":"                               aws_access_key_id\u003d\u0027test:tester\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"782dc270_cfe52b98","line":34,"updated":"2023-03-22 17:18:11.000000000","message":"this is the \"hack\" to make it so I don\u0027t have to comment out eventlet.monkey_patch over in test/probe/__init__.py","commit_id":"c3cb399c089943ee3fc9a31cbf27b1e36378edb9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dd2c476488d90279d219846893eec55328d25a4b","unresolved":true,"context_lines":[{"line_number":23,"context_line":"try:"},{"line_number":24,"context_line":"    from importlib import reload"},{"line_number":25,"context_line":"except ImportError:"},{"line_number":26,"context_line":"    pass"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from swift.common.http import HTTP_NOT_FOUND"},{"line_number":29,"context_line":"from swift.common.manager import Manager"}],"source_content_type":"text/x-python","patch_set":3,"id":"ceb7f086_d1aa86ba","line":26,"updated":"2023-04-03 23:28:43.000000000","message":"Better as `from six.moves import reload_module as reload` -- or at least add a comment about the py2-ness of the `pass`. Main thing is, I want to be able to clean this up and make it explicit when we drop support for py2.","commit_id":"29f869ee12462ef41342796d4c53e56890d362b7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c6a17f36389270090e99cdd03857485864c39818","unresolved":false,"context_lines":[{"line_number":23,"context_line":"try:"},{"line_number":24,"context_line":"    from importlib import reload"},{"line_number":25,"context_line":"except ImportError:"},{"line_number":26,"context_line":"    pass"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from swift.common.http import HTTP_NOT_FOUND"},{"line_number":29,"context_line":"from swift.common.manager import Manager"}],"source_content_type":"text/x-python","patch_set":3,"id":"3e8d4cae_4448b272","line":26,"in_reply_to":"ceb7f086_d1aa86ba","updated":"2023-05-02 20:22:37.000000000","message":"Done","commit_id":"29f869ee12462ef41342796d4c53e56890d362b7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"dd2c476488d90279d219846893eec55328d25a4b","unresolved":true,"context_lines":[{"line_number":49,"context_line":"            raise unittest.SkipTest(\u0027s3api not enabled\u0027)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # lazy import boto only required if cluster supports s3api"},{"line_number":52,"context_line":"        from test.s3api import get_s3_client"},{"line_number":53,"context_line":"        reload(ssl)"},{"line_number":54,"context_line":"        self.s3 \u003d get_s3_client(1)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"b0d347bf_e5fc4f5a","line":52,"updated":"2023-04-03 23:28:43.000000000","message":"Smells like we want the `reload(ssl)` in `test.s3api`. Or maybe even as an import side-effect (!) of `test/__init__.py`?\n\nWe should also consider unifying `test.s3api.get_s3_client` and `test.functional.s3api.s3_test_client.get_boto3_conn`... not as part of this patch, of course, but it seems odd that we do essentially the same thing in two places...","commit_id":"29f869ee12462ef41342796d4c53e56890d362b7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"803fe1b4161c14121b80b965e7afdaee9fa5f3f1","unresolved":true,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        # lazy import boto only required if cluster supports s3api"},{"line_number":52,"context_line":"        from test.s3api import get_s3_client"},{"line_number":53,"context_line":"        reload(ssl)"},{"line_number":54,"context_line":"        self.s3 \u003d get_s3_client(1)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        self.bucket_name \u003d \u0027bucket-%s\u0027 % uuid.uuid4()"}],"source_content_type":"text/x-python","patch_set":3,"id":"573a8472_69161e3e","line":53,"updated":"2023-03-31 18:01:18.000000000","message":"the other thing that seemed to work was \"sudo pip uninstall requests-mock\", but we\u0027ve had that in our test-requirements.txt since 2017\n\nI found this other change that added boto3 to probetests, https://review.opendev.org/c/openstack/swift/+/800701 - but it *also* fails with RecursionError","commit_id":"29f869ee12462ef41342796d4c53e56890d362b7"}],"test/unit/common/middleware/helpers.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"89aabdcfc918bcb6b67a0a3988ec8af927fe4c75","unresolved":true,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        # Update req and backend response headers before capturing the request"},{"line_number":220,"context_line":"        if method in (\u0027GET\u0027, \u0027HEAD\u0027) and obj:"},{"line_number":221,"context_line":"            req.headers[\u0027X-Backend-Storage-Policy-Index\u0027] \u003d headers.setdefault("},{"line_number":222,"context_line":"                \u0027x-backend-storage-policy-index\u0027, \u00272\u0027)"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        # Capture the request before reading the body, in case the iter raises"}],"source_content_type":"text/x-python","patch_set":10,"id":"9b15f1d4_591bb114","line":221,"updated":"2023-10-06 00:58:35.000000000","message":"for some reason I thought this change was in the s3api class - i\u0027ll consider how best to fix up the unrelated failing tests that picked up the fake x-backend-storage poicy header in their object responses.","commit_id":"4d66d81fa307906be22f35bf11781c551feb21dd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"28ddfe9cc1ea27b8c9fc3df71c646975a5e82f43","unresolved":true,"context_lines":[{"line_number":229,"context_line":"            # might also be reasonable"},{"line_number":230,"context_line":"            default \u003d req.headers.get(spi_header, \u00272\u0027)"},{"line_number":231,"context_line":"            # regardless of default, a registered value always takes precedent"},{"line_number":232,"context_line":"            req.headers[spi_header] \u003d headers.setdefault(spi_header, default)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        # Capture the request before reading the body, in case the iter raises"},{"line_number":235,"context_line":"        # an exception."}],"source_content_type":"text/x-python","patch_set":11,"id":"21e9f617_0e6aaf5e","line":232,"updated":"2023-10-09 14:44:29.000000000","message":"I can see that the request always has a default spi set by the proxy controller, but I\u0027m not seeing where responses get the spi header in real swift?\n\n```\ndiff --git a/test/unit/proxy/test_server.py b/test/unit/proxy/test_server.py\nindex d0df1719d..2a86e326a 100644\n--- a/test/unit/proxy/test_server.py\n+++ b/test/unit/proxy/test_server.py\n@@ -5047,6 +5047,7 @@ class TestReplicatedObjectController(\n                                  str(expected))\n                 self.assertEqual(res.headers.get(\u0027last-modified\u0027),\n                                  expected_timestamp)\n+                self.assertIn(\u0027x-backend-storage-policy-index\u0027, res.headers)\n\n             test_status_map((200, 200, 200, 200, 200), 200, (\u00270\u0027, \u00270\u0027, \u00271\u0027,\n                                                              \u00272\u0027, \u00273\u0027), \u00273\u0027)\n```\n\n```\n\ntest_server.py:5052: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \ntest_server.py:5050: in test_status_map\n    self.assertIn(\u0027x-backend-storage-policy-index\u0027, res.headers)\nE   AssertionError: \u0027x-backend-storage-policy-index\u0027 not found in {\u0027Content-Type\u0027: \u0027x-application/test\u0027, \u0027X-Timestamp\u0027: \u00273\u0027, \u0027X-Backend-Timestamp\u0027: \u00273\u0027, \u0027Last-Modified\u0027: \u00273\u0027, \u0027X-Object-Meta-Test\u0027: \u0027testing\u0027, \u0027X-Delete-At\u0027: \u00279876543210\u0027, \u0027Etag\u0027: \u0027d41d8cd98f00b204e9800998ecf8427e\u0027, \u0027X-Works\u0027: \u0027yes\u0027, \u0027X-Account-Container-Count\u0027: \u002712345\u0027, \u0027Accept-Ranges\u0027: \u0027bytes\u0027, \u0027Content-Length\u0027: \u00270\u0027}\n```","commit_id":"99b8daf674a3a1bbd87c756c008c2f76b2c4e8e6"}]}
