)]}'
{"ironic_python_agent/efi_utils.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d45eeb01762dcb6e08dcac1cab245b7414c27be5","unresolved":false,"context_lines":[{"line_number":275,"context_line":""},{"line_number":276,"context_line":"    :return: an iterator yielding pairs (boot number, boot record)."},{"line_number":277,"context_line":"    \"\"\""},{"line_number":278,"context_line":"    # Invokes binary\u003dTrue so we get a python3 bytestream back."},{"line_number":279,"context_line":"    efi_output \u003d utils.execute(\u0027efibootmgr\u0027, \u0027-v\u0027, binary\u003dTrue)"},{"line_number":280,"context_line":"    if hasattr(efi_output[0], \u0027decode\u0027):"},{"line_number":281,"context_line":"        # Bytes must be decoded before regex can be run and"}],"source_content_type":"text/x-python","patch_set":4,"id":"26e4eda9_3855f30f","line":278,"updated":"2023-04-12 10:43:13.000000000","message":"nit: s/python3//","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d45eeb01762dcb6e08dcac1cab245b7414c27be5","unresolved":false,"context_lines":[{"line_number":277,"context_line":"    \"\"\""},{"line_number":278,"context_line":"    # Invokes binary\u003dTrue so we get a python3 bytestream back."},{"line_number":279,"context_line":"    efi_output \u003d utils.execute(\u0027efibootmgr\u0027, \u0027-v\u0027, binary\u003dTrue)"},{"line_number":280,"context_line":"    if hasattr(efi_output[0], \u0027decode\u0027):"},{"line_number":281,"context_line":"        # Bytes must be decoded before regex can be run and"},{"line_number":282,"context_line":"        # matching to work as intended."},{"line_number":283,"context_line":"        # Also ignore errors on decoding, as we can basically get"}],"source_content_type":"text/x-python","patch_set":4,"id":"2e5e0daf_8640d7ed","line":280,"updated":"2023-04-12 10:43:13.000000000","message":"what\u0027s the condition of this being false? any bytes object has a decode()","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"862b90ab31a90591e14f966bdc99cb6c766cbf95","unresolved":false,"context_lines":[{"line_number":277,"context_line":"    \"\"\""},{"line_number":278,"context_line":"    # Invokes binary\u003dTrue so we get a python3 bytestream back."},{"line_number":279,"context_line":"    efi_output \u003d utils.execute(\u0027efibootmgr\u0027, \u0027-v\u0027, binary\u003dTrue)"},{"line_number":280,"context_line":"    if hasattr(efi_output[0], \u0027decode\u0027):"},{"line_number":281,"context_line":"        # Bytes must be decoded before regex can be run and"},{"line_number":282,"context_line":"        # matching to work as intended."},{"line_number":283,"context_line":"        # Also ignore errors on decoding, as we can basically get"}],"source_content_type":"text/x-python","patch_set":4,"id":"e29c8eb3_92bcc857","line":280,"in_reply_to":"2e5e0daf_8640d7ed","updated":"2023-04-17 15:39:21.000000000","message":"Our own unit tests, unless we re-write a bunch of tests. :\\","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d45eeb01762dcb6e08dcac1cab245b7414c27be5","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        cmd_output \u003d efi_output[0].decode(\u0027utf-16\u0027, errors\u003d\u0027ignore\u0027)"},{"line_number":287,"context_line":"    else:"},{"line_number":288,"context_line":"        # This is a fallback."},{"line_number":289,"context_line":"        cmd_output \u003d str(efi_output[0])"},{"line_number":290,"context_line":"    for line in cmd_output.split(\u0027\\n\u0027):"},{"line_number":291,"context_line":"        match \u003d _ENTRY_LABEL.match(line)"},{"line_number":292,"context_line":"        if match is not None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"964d7b64_c296cf13","line":289,"updated":"2023-04-12 10:43:13.000000000","message":"Fortunately, this branch is never reached, because str(bytes) does not do what you probably expect (it\u0027s a string representation of a python object, e.g.\n\n  \u003e\u003e\u003e print(str(b\u0027foo\u0027))\n  b\u0027foo\u0027\n\n).","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"380be888c4981d45c2ddebbe6ac761c22a4ce357","unresolved":true,"context_lines":[{"line_number":283,"context_line":"    # garbage out of the nvram record, this way we don\u0027t fail"},{"line_number":284,"context_line":"    # hard on unrelated records."},{"line_number":285,"context_line":"    cmd_output \u003d efi_output[0].decode(\u0027utf-16\u0027, errors\u003d\u0027ignore\u0027)"},{"line_number":286,"context_line":"    for line in cmd_output.split(\u0027\\n\u0027):"},{"line_number":287,"context_line":"        match \u003d _ENTRY_LABEL.match(line)"},{"line_number":288,"context_line":"        if match is not None:"},{"line_number":289,"context_line":"            yield (match[1], match[2])"}],"source_content_type":"text/x-python","patch_set":5,"id":"1b934400_17f20361","line":286,"updated":"2023-04-17 22:13:19.000000000","message":"Hmm. If we are ignoring errors, are we guaranteed cmd_output is not-None here?","commit_id":"76accfb880474445a5dcb07825889123b3dd0237"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"d0e5bae9239b85c00437998f7d27b3409a0e7e4a","unresolved":true,"context_lines":[{"line_number":283,"context_line":"    # garbage out of the nvram record, this way we don\u0027t fail"},{"line_number":284,"context_line":"    # hard on unrelated records."},{"line_number":285,"context_line":"    cmd_output \u003d efi_output[0].decode(\u0027utf-16\u0027, errors\u003d\u0027ignore\u0027)"},{"line_number":286,"context_line":"    for line in cmd_output.split(\u0027\\n\u0027):"},{"line_number":287,"context_line":"        match \u003d _ENTRY_LABEL.match(line)"},{"line_number":288,"context_line":"        if match is not None:"},{"line_number":289,"context_line":"            yield (match[1], match[2])"}],"source_content_type":"text/x-python","patch_set":5,"id":"d22a7258_02a14ca9","line":286,"in_reply_to":"1b934400_17f20361","updated":"2023-04-25 00:20:40.000000000","message":"We have a test which would otherwise result in a decoding error.\n\nhttps://review.opendev.org/c/openstack/ironic-python-agent/+/879897/5/ironic_python_agent/tests/unit/test_efi_utils.py#234","commit_id":"76accfb880474445a5dcb07825889123b3dd0237"}],"ironic_python_agent/extensions/image.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d45eeb01762dcb6e08dcac1cab245b7414c27be5","unresolved":false,"context_lines":[{"line_number":575,"context_line":""},{"line_number":576,"context_line":"    if boot.current_boot_mode \u003d\u003d \u0027uefi\u0027:"},{"line_number":577,"context_line":"        try:"},{"line_number":578,"context_line":"            utils.execute(\u0027efibootmgr\u0027, \u0027--version\u0027, binary\u003dTrue)"},{"line_number":579,"context_line":"        except FileNotFoundError:"},{"line_number":580,"context_line":"            LOG.warning(\"efibootmgr is not available in the ramdisk\")"},{"line_number":581,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"c4e9c942_364be708","line":578,"updated":"2023-04-12 10:43:13.000000000","message":"This is excessive, the --version command does not output anything from the nvram","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"}],"ironic_python_agent/tests/unit/extensions/test_image.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d45eeb01762dcb6e08dcac1cab245b7414c27be5","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        mock_efi_bl.return_value \u003d [\u0027EFI/BOOT/BOOTX64.EFI\u0027]"},{"line_number":230,"context_line":"        mock_utils_efi_part.return_value \u003d None"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        mock_execute.side_effect \u003d iter([(\u0027\u0027, \u0027\u0027), (\u0027\u0027, \u0027\u0027),"},{"line_number":233,"context_line":"                                         (\u0027\u0027, \u0027\u0027), (\u0027\u0027, \u0027\u0027),"},{"line_number":234,"context_line":"                                         (\u0027\u0027, \u0027\u0027), (\u0027\u0027, \u0027\u0027),"},{"line_number":235,"context_line":"                                         (\u0027\u0027, \u0027\u0027), (\u0027\u0027, \u0027\u0027)])"}],"source_content_type":"text/x-python","patch_set":4,"id":"d6464a21_b519282a","line":232,"updated":"2023-04-12 10:43:13.000000000","message":"You need to update this to return binaries. Otherwise, you\u0027re hitting the weird case of not having decode()","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"}],"releasenotes/notes/fixes-efibootmgr-character-encoding-19e531ba694824c1.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d45eeb01762dcb6e08dcac1cab245b7414c27be5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Fixes UEFI NVRAM record handling with efibootmgr so we can accept and"},{"line_number":5,"context_line":"    handle UTF-16 encoded data which is to be expected in UEFI NVRAM as"},{"line_number":6,"context_line":"    the records are UTF-16 encoded."},{"line_number":7,"context_line":"  - Fixes handling of UEFI NVRAM records to allow for unexpected character"},{"line_number":8,"context_line":"    set encoding, so it is non-fatal to Ironic.."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"18725039_688620f2","line":7,"updated":"2023-04-12 10:43:13.000000000","message":"nit: I wonder if it\u0027s actually true. If the encoding is really REALLY unexpected, decoding it as UTF-16 may provide unusual results even with errors\u003d\u0027ignore\u0027.","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"862b90ab31a90591e14f966bdc99cb6c766cbf95","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Fixes UEFI NVRAM record handling with efibootmgr so we can accept and"},{"line_number":5,"context_line":"    handle UTF-16 encoded data which is to be expected in UEFI NVRAM as"},{"line_number":6,"context_line":"    the records are UTF-16 encoded."},{"line_number":7,"context_line":"  - Fixes handling of UEFI NVRAM records to allow for unexpected character"},{"line_number":8,"context_line":"    set encoding, so it is non-fatal to Ironic.."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"aa2d7ade_aba14c73","line":7,"in_reply_to":"18725039_688620f2","updated":"2023-04-17 15:39:21.000000000","message":"The sample data we got in RH Bugzilla doesn\u0027t have the actual program erroring, it has the data in the multibyte output which gets returned. \n\nIt gets worse, as the commit message indicated, we actually found UTF-16 garbage in our own test VMs after the fact which required a little further work to ensure we handle appropriately.","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6fdc57d89eb8dcbbafbfa9b794c802a45b978efb","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Fixes UEFI NVRAM record handling with efibootmgr so we can accept and"},{"line_number":5,"context_line":"    handle UTF-16 encoded data which is to be expected in UEFI NVRAM as"},{"line_number":6,"context_line":"    the records are UTF-16 encoded."},{"line_number":7,"context_line":"  - Fixes handling of UEFI NVRAM records to allow for unexpected character"},{"line_number":8,"context_line":"    set encoding, so it is non-fatal to Ironic.."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"2c24a574_0089af44","line":7,"in_reply_to":"aa2d7ade_aba14c73","updated":"2023-04-17 15:52:32.000000000","message":"Oh! you meant with the decode, Doh!\n\nAnyway, yeah, we can get back whatever is in the nvram including trailing garbage, and this change does actually allow us to navigate that, fortunately or unfortunately.","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d45eeb01762dcb6e08dcac1cab245b7414c27be5","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    handle UTF-16 encoded data which is to be expected in UEFI NVRAM as"},{"line_number":6,"context_line":"    the records are UTF-16 encoded."},{"line_number":7,"context_line":"  - Fixes handling of UEFI NVRAM records to allow for unexpected character"},{"line_number":8,"context_line":"    set encoding, so it is non-fatal to Ironic.."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"cdec4833_9fde9215","line":8,"updated":"2023-04-12 10:43:13.000000000","message":"nit: douple dots","commit_id":"0334265c80b0bbd73d45775db01819d7a998ba4f"}]}
