)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":35719,"name":"Alex Hornung","email":"alex.hornung@arm.com","username":"alexh"},"change_message_id":"832c85ceb11c3b6dbfb773260be6e43f24b673d7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0c03a62b_a8c83b50","updated":"2023-01-24 17:11:02.000000000","message":"\u003e Patch Set 1:\n\u003e \n\u003e This looks good, but can you add a test for it?\n\nThanks. Patchset 2 now adds a test for this, which indeed fails for the old code and passes with this change.","commit_id":"ffc03cfcc16965cdc81c3f7b88f650788a8fe5de"}],"zuul/driver/gerrit/gerritconnection.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"4f375968254710544b023e265b8c526e4dc560f7","unresolved":true,"context_lines":[{"line_number":1646,"context_line":"            # Encode the UTF-8 data back to a byte array, as the size of"},{"line_number":1647,"context_line":"            # each record in the pack is in bytes, and so the slicing must"},{"line_number":1648,"context_line":"            # also be done on a byte-basis."},{"line_number":1649,"context_line":"            data \u003d self._uploadPack(project).encode(\"utf-8\")"},{"line_number":1650,"context_line":"        except Exception:"},{"line_number":1651,"context_line":"            self.log.error(\"Cannot get references from %s\" % project)"},{"line_number":1652,"context_line":"            raise  # keeps error information"}],"source_content_type":"text/x-python","patch_set":2,"id":"2d6e266d_a73ef50c","line":1649,"updated":"2023-02-14 18:17:59.000000000","message":"One initial concern I\u0027ve got reading this is that we get this information via ssh or http. It looks like the ssh connection has already assumed utf8 so no real regression there, but http did not. Instead python requests is/was decoding based on http headers. Except curling this URL I don\u0027t think Gerrit is giving us the text encoding type in the headers which would cause requests to fallback to charset_normalizer.\n\nIf that encoding is not utf8 we would break here. I think the chances of that happening are low hence my +2. But wanted to call that out as it may help future debugging should this ever come up.\n\nAlso worth noting if we got back utf16 instead we\u0027d be just as broken as with the utf8 case previously. Long winded way of saying I don\u0027t think this makes anything worse, but only solves it for utf8. As an option we might look into charset-normalizer here too?","commit_id":"ffc03cfcc16965cdc81c3f7b88f650788a8fe5de"}]}
