)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"d9ccbb71ed585ed0bdde3267b145cae046bf1327","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"eae0b8be_58528d88","updated":"2024-09-12 13:24:16.000000000","message":"Hi Stephen,","commit_id":"e3691e8dfe8eafc06b68eeec55620e33df393f54"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e34e86b2328dee3871687fd8f160e0b4d981dd29","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"7b670c12_974c0c04","updated":"2024-09-12 10:12:42.000000000","message":"Looks sensible. One question inline then I can bump to +2","commit_id":"e3691e8dfe8eafc06b68eeec55620e33df393f54"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"92725e4189adf734ef0736069d21c73408a6fd6d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0ce43338_8607d1cd","updated":"2024-09-13 08:58:28.000000000","message":"recheck","commit_id":"e3691e8dfe8eafc06b68eeec55620e33df393f54"}],"openstack/key_manager/v1/secret.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e34e86b2328dee3871687fd8f160e0b4d981dd29","unresolved":true,"context_lines":[{"line_number":113,"context_line":"                skip_cache\u003dskip_cache,"},{"line_number":114,"context_line":"            )"},{"line_number":115,"context_line":"            if content_type \u003d\u003d \"text/plain\":"},{"line_number":116,"context_line":"                response[\"payload\"] \u003d payload.content.decode(\"UTF-8\")"},{"line_number":117,"context_line":"            else:"},{"line_number":118,"context_line":"                response[\"payload\"] \u003d payload.content"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"59fd4b3c_0bd17575","line":116,"range":{"start_line":116,"start_character":38,"end_line":116,"end_character":69},"updated":"2024-09-12 10:12:42.000000000","message":"nit: any reason not to keep using `payload.text` here?","commit_id":"e3691e8dfe8eafc06b68eeec55620e33df393f54"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"d9ccbb71ed585ed0bdde3267b145cae046bf1327","unresolved":true,"context_lines":[{"line_number":113,"context_line":"                skip_cache\u003dskip_cache,"},{"line_number":114,"context_line":"            )"},{"line_number":115,"context_line":"            if content_type \u003d\u003d \"text/plain\":"},{"line_number":116,"context_line":"                response[\"payload\"] \u003d payload.content.decode(\"UTF-8\")"},{"line_number":117,"context_line":"            else:"},{"line_number":118,"context_line":"                response[\"payload\"] \u003d payload.content"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fc269de0_3e65b53e","line":116,"range":{"start_line":116,"start_character":38,"end_line":116,"end_character":69},"in_reply_to":"59fd4b3c_0bd17575","updated":"2024-09-12 13:24:16.000000000","message":"a) I was closely following what barbicanclient does:\nhttps://opendev.org/openstack/python-barbicanclient/src/commit/39e46755e312e380b4b7540775ae589ed785796a/barbicanclient/v1/secrets.py#L324-L327\nb) even for text/plain, AFAIU there\u0027s no actual guarantee that what\u0027s inside is UTF-8. As we do not expose a separate attribute for raw \u0027bytes\u0027 content, if we provide \u0027text\u0027, it will again be decoded to whatever \"chardet\" lib detected it was (and it could potentially miss), and there\u0027s no way to get back the original bytes and try to decode again. So this way at least we return text decoded from raw bytes always in the same well-known encoding, so the SDK user still has a chance to encode back to bytes using utf-8 with no ambiguity, and then try to decode in whatever encoding was expected.","commit_id":"e3691e8dfe8eafc06b68eeec55620e33df393f54"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"36d68257da56f54c1f5b71e8f492e884310613c9","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                skip_cache\u003dskip_cache,"},{"line_number":114,"context_line":"            )"},{"line_number":115,"context_line":"            if content_type \u003d\u003d \"text/plain\":"},{"line_number":116,"context_line":"                response[\"payload\"] \u003d payload.content.decode(\"UTF-8\")"},{"line_number":117,"context_line":"            else:"},{"line_number":118,"context_line":"                response[\"payload\"] \u003d payload.content"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"36aae9cb_48c2377b","line":116,"range":{"start_line":116,"start_character":38,"end_line":116,"end_character":69},"in_reply_to":"611813bf_61d5e83c","updated":"2024-09-12 13:40:51.000000000","message":"followup with a code comment https://review.opendev.org/c/openstack/openstacksdk/+/929090","commit_id":"e3691e8dfe8eafc06b68eeec55620e33df393f54"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e0a138dae20929d9f8eebb9a766f014134bf04e0","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                skip_cache\u003dskip_cache,"},{"line_number":114,"context_line":"            )"},{"line_number":115,"context_line":"            if content_type \u003d\u003d \"text/plain\":"},{"line_number":116,"context_line":"                response[\"payload\"] \u003d payload.content.decode(\"UTF-8\")"},{"line_number":117,"context_line":"            else:"},{"line_number":118,"context_line":"                response[\"payload\"] \u003d payload.content"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"611813bf_61d5e83c","line":116,"range":{"start_line":116,"start_character":38,"end_line":116,"end_character":69},"in_reply_to":"fc269de0_3e65b53e","updated":"2024-09-12 13:28:09.000000000","message":"Ack. Thanks for the comprehensive reply. It would be good to add this context by way of a comment but that\u0027s nice-to-have follow-up","commit_id":"e3691e8dfe8eafc06b68eeec55620e33df393f54"}]}
