)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b9b5a8f63ee143fa801ac20fd1c2e5f85c759401","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"When we exceed the timeout time value with our wall clock,"},{"line_number":44,"context_line":"we will fail the download."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Change-Id: I7214fc9dbd903789c9e39ee809f05454aeb5a240"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bf51134e_f903fe40","line":45,"updated":"2020-06-18 13:34:53.000000000","message":"nit: a story","commit_id":"af40be4d699fb2e98602bb6c3a4aada4a8fdeea1"}],"ironic_python_agent/agent.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"e021b86d20318e577fa541be9e8b38f9ceb6d7f6","unresolved":false,"context_lines":[{"line_number":59,"context_line":"# Monkey patch, yet not touch threading or select"},{"line_number":60,"context_line":"# thread because it is incompatible with multiprocessing"},{"line_number":61,"context_line":"# select because heartbeat polling lacks poll."},{"line_number":62,"context_line":"eventlet.monkey_patch(thread\u003dFalse, select\u003dFalse)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def _time():"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_4a8878c5","line":62,"updated":"2020-06-17 12:51:14.000000000","message":"So.. urllib3 is incompatible with it as well and creates a recursive condition.","commit_id":"2e5c44e288b50b0d4a91abe8222eea7fe3cfdfc6"}],"ironic_python_agent/extensions/standby.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"4c88c73d7bc38a8a3c3e18bc4297d036f6f0f7da","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                       \u0027Response body: {}\u0027).format(resp.status_code, url,"},{"line_number":89,"context_line":"                                                   resp.text)"},{"line_number":90,"context_line":"                raise errors.ImageDownloadError(image_id, msg)"},{"line_number":91,"context_line":"        except eventlet.Timeout as e:"},{"line_number":92,"context_line":"            if attempt \u003d\u003d CONF.image_download_connection_retries:"},{"line_number":93,"context_line":"                raise errors.ImageDownloadError("},{"line_number":94,"context_line":"                    image_id\u003durl,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_2cc6004b","line":91,"updated":"2020-06-09 23:32:43.000000000","message":"pep8: F841 local variable \u0027e\u0027 is assigned to but never used","commit_id":"abca8ab40fd9efa6d5fa85810d56e542c08e07d5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"d365670e780e32af3957cde42473a6cdd28764aa","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            with eventlet.Timeout(CONF.image_download_connection_timeout + 1,"},{"line_number":78,"context_line":"                                  eventlet.Timeout):"},{"line_number":79,"context_line":"                resp \u003d requests.get("},{"line_number":80,"context_line":"                    url, stream\u003dTrue, proxies\u003dproxies,"},{"line_number":81,"context_line":"                    verify\u003dverify, cert\u003dcert,"},{"line_number":82,"context_line":"                    timeout\u003dCONF.image_download_connection_timeout)"},{"line_number":83,"context_line":"            if resp.status_code !\u003d 200:"},{"line_number":84,"context_line":"                msg \u003d (\u0027Received status code {} from {}, expected 200. \u0027"},{"line_number":85,"context_line":"                       \u0027Response body: {}\u0027).format(resp.status_code, url,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_aa6f69f8","line":82,"range":{"start_line":79,"start_character":16,"end_line":82,"end_character":67},"updated":"2020-06-11 21:11:36.000000000","message":"This is only:\n1) DNS lookup\n2) Cert lookup/validation\n3) initial GET but NOT the actual transfer of content down from the server.\n\nThe timeout should generally cover this, but if we hang somewhere in places not covered (say dns lookup) this should cover it. The place where things _could_ go sideways in this case is in select in the socket handling on the tcp socket request, but that seems super remote and is not in the download where things can absolutely go sideways if the packet stream is interrupted.","commit_id":"2e5c44e288b50b0d4a91abe8222eea7fe3cfdfc6"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b9b5a8f63ee143fa801ac20fd1c2e5f85c759401","unresolved":false,"context_lines":[{"line_number":360,"context_line":"            # process across the socket. This allows the client consuming the"},{"line_number":361,"context_line":"            # data, i.e. us, to run an external stopwatch just in case the"},{"line_number":362,"context_line":"            # internal one doesn\u0027t figure out if it is broken."},{"line_number":363,"context_line":"            if chunk:"},{"line_number":364,"context_line":"                self._last_chunk_time \u003d time.time()"},{"line_number":365,"context_line":"                self._hash_algo.update(chunk)"},{"line_number":366,"context_line":"            elif (time.time() - self._last_chunk_time"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_d9fefa36","line":363,"updated":"2020-06-18 13:34:53.000000000","message":"It doesn\u0027t look like iter_content can yield empty chunks: https://stackoverflow.com/questions/47978661/is-it-possible-for-requests-response-iter-content-to-return-empty-chunks and https://urllib3.readthedocs.io/en/latest/reference/index.html#urllib3.response.HTTPResponse.stream","commit_id":"af40be4d699fb2e98602bb6c3a4aada4a8fdeea1"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"303f95ddd008ef17c199bafde3f025e09e819afa","unresolved":false,"context_lines":[{"line_number":360,"context_line":"            # process across the socket. This allows the client consuming the"},{"line_number":361,"context_line":"            # data, i.e. us, to run an external stopwatch just in case the"},{"line_number":362,"context_line":"            # internal one doesn\u0027t figure out if it is broken."},{"line_number":363,"context_line":"            if chunk:"},{"line_number":364,"context_line":"                self._last_chunk_time \u003d time.time()"},{"line_number":365,"context_line":"                self._hash_algo.update(chunk)"},{"line_number":366,"context_line":"            elif (time.time() - self._last_chunk_time"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_698d3c7a","line":363,"in_reply_to":"bf51134e_d9fefa36","updated":"2020-06-24 16:55:12.000000000","message":"So, my head hurts.\n\nIt _looks_ like what occurs is urllib3 internally builds the buffer, tries to decode it, adds it to the data available to return and iterate through if possible. It looks like that can fall out with none when there is no new data to decode/assemble, which seems sporatic \n\nis_connection_dropped()-\u003ewait_for_read() -\u003e wait_for_socket() -\u003e epoll/poll/select (which is why eventlet+urllib3 does not get along, they both ultimately use the same toolset on sockets under the hood (and why trying to monkey patch makes things explode))","commit_id":"af40be4d699fb2e98602bb6c3a4aada4a8fdeea1"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68124f18df18e64479f7482e32261026ce919afc","unresolved":false,"context_lines":[{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        :returns: A chunk of the image. Size of chunk is IMAGE_CHUNK_SIZE"},{"line_number":345,"context_line":"                  which is a constant in this module."},{"line_number":346,"context_line":"        \"\"\""},{"line_number":347,"context_line":"        for chunk in self._request.iter_content(IMAGE_CHUNK_SIZE):"},{"line_number":348,"context_line":"            # Per requests forum posts/discussions, iter_content should"},{"line_number":349,"context_line":"            # periodically yield to the caller for the client to do things"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_90b996cd","line":346,"updated":"2020-06-24 08:18:43.000000000","message":"_last_chunk_time should be initialized here otherwise you may end up subtracting None","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"}],"ironic_python_agent/tests/unit/extensions/test_standby.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"4c88c73d7bc38a8a3c3e18bc4297d036f6f0f7da","unresolved":false,"context_lines":[{"line_number":438,"context_line":"        hexdigest_mock.return_value \u003d image_info[\u0027checksum\u0027]"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"        requests_mock.side_effect \u003d create_timeout"},{"line_number":441,"context_line":"        self.assertRaises(errors.ImageDownloadError, standby._download_image, image_info)"},{"line_number":442,"context_line":"        self.assertEqual(no_proxy, os.environ[\u0027no_proxy\u0027])"},{"line_number":443,"context_line":"        self.assertEqual(3, requests_mock.call_count)"},{"line_number":444,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_4cc9b458","line":441,"updated":"2020-06-09 23:32:43.000000000","message":"pep8: E501 line too long (89 \u003e 79 characters)","commit_id":"abca8ab40fd9efa6d5fa85810d56e542c08e07d5"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"d5bc3da7c9ec67f027e4652391bdeaaf220e87dd","unresolved":false,"context_lines":[{"line_number":1201,"context_line":"                return self"},{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"            def __next__(self):"},{"line_number":1204,"context_line":"                if count \u003d\u003d 1:"},{"line_number":1205,"context_line":"                    sleep(4)"},{"line_number":1206,"context_line":"                if count \u003c 2:"},{"line_number":1207,"context_line":"                        "}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_824d53c6","line":1204,"updated":"2020-06-10 03:35:34.000000000","message":"pep8: F821 undefined name \u0027count\u0027","commit_id":"e79a17c44cb2bffc9cbc160b18c14a8b6086b3e8"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"d5bc3da7c9ec67f027e4652391bdeaaf220e87dd","unresolved":false,"context_lines":[{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"            def __next__(self):"},{"line_number":1204,"context_line":"                if count \u003d\u003d 1:"},{"line_number":1205,"context_line":"                    sleep(4)"},{"line_number":1206,"context_line":"                if count \u003c 2:"},{"line_number":1207,"context_line":"                        "},{"line_number":1208,"context_line":"                    self.count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_624abfac","line":1205,"updated":"2020-06-10 03:35:34.000000000","message":"pep8: F821 undefined name \u0027sleep\u0027","commit_id":"e79a17c44cb2bffc9cbc160b18c14a8b6086b3e8"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"d5bc3da7c9ec67f027e4652391bdeaaf220e87dd","unresolved":false,"context_lines":[{"line_number":1203,"context_line":"            def __next__(self):"},{"line_number":1204,"context_line":"                if count \u003d\u003d 1:"},{"line_number":1205,"context_line":"                    sleep(4)"},{"line_number":1206,"context_line":"                if count \u003c 2:"},{"line_number":1207,"context_line":"                        "},{"line_number":1208,"context_line":"                    self.count +\u003d 1"},{"line_number":1209,"context_line":"                    return \"meow\""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_c2c46b11","line":1206,"updated":"2020-06-10 03:35:34.000000000","message":"pep8: F821 undefined name \u0027count\u0027","commit_id":"e79a17c44cb2bffc9cbc160b18c14a8b6086b3e8"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"d5bc3da7c9ec67f027e4652391bdeaaf220e87dd","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"                if count \u003d\u003d 1:"},{"line_number":1205,"context_line":"                    sleep(4)"},{"line_number":1206,"context_line":"                if count \u003c 2:"},{"line_number":1207,"context_line":"                        "},{"line_number":1208,"context_line":"                    self.count +\u003d 1"},{"line_number":1209,"context_line":"                    return \"meow\""},{"line_number":1210,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_a2c97726","line":1207,"updated":"2020-06-10 03:35:34.000000000","message":"pep8: W293 blank line contains whitespace","commit_id":"e79a17c44cb2bffc9cbc160b18c14a8b6086b3e8"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68124f18df18e64479f7482e32261026ce919afc","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"            status_code \u003d 200"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"            def __init__(self, url, stream, proxies, verify, cert, timeout):"},{"line_number":1220,"context_line":"                time.sleep(1)"},{"line_number":1221,"context_line":"                self.count \u003d 0"},{"line_number":1222,"context_line":""},{"line_number":1223,"context_line":"            def __iter__(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_70be82b4","line":1220,"updated":"2020-06-24 08:18:43.000000000","message":"Unrelated?","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"303f95ddd008ef17c199bafde3f025e09e819afa","unresolved":false,"context_lines":[{"line_number":1217,"context_line":"            status_code \u003d 200"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"            def __init__(self, url, stream, proxies, verify, cert, timeout):"},{"line_number":1220,"context_line":"                time.sleep(1)"},{"line_number":1221,"context_line":"                self.count \u003d 0"},{"line_number":1222,"context_line":""},{"line_number":1223,"context_line":"            def __iter__(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_d0d7844a","line":1220,"in_reply_to":"bf51134e_70be82b4","updated":"2020-06-24 16:55:12.000000000","message":"Yup, removing.","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68124f18df18e64479f7482e32261026ce919afc","unresolved":false,"context_lines":[{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"            def __next__(self):"},{"line_number":1227,"context_line":"                if self.count \u003d\u003d 1:"},{"line_number":1228,"context_line":"                    time.sleep(4)"},{"line_number":1229,"context_line":"                    return None"},{"line_number":1230,"context_line":"                if self.count \u003c 3:"},{"line_number":1231,"context_line":"                    self.count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_d0af8e7a","line":1228,"updated":"2020-06-24 08:18:43.000000000","message":"Please don\u0027t use time.sleep in unit tests (ditto above), it already takes 5 seconds.","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"303f95ddd008ef17c199bafde3f025e09e819afa","unresolved":false,"context_lines":[{"line_number":1225,"context_line":""},{"line_number":1226,"context_line":"            def __next__(self):"},{"line_number":1227,"context_line":"                if self.count \u003d\u003d 1:"},{"line_number":1228,"context_line":"                    time.sleep(4)"},{"line_number":1229,"context_line":"                    return None"},{"line_number":1230,"context_line":"                if self.count \u003c 3:"},{"line_number":1231,"context_line":"                    self.count +\u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_10a73c0d","line":1228,"in_reply_to":"bf51134e_d0af8e7a","updated":"2020-06-24 16:55:12.000000000","message":"I get the reasoning, but we want to force an \"external\" event that forces a time window on the code. So it seems right to do in that case. otherwise we need to wrap time.time and mock replies :\\","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68124f18df18e64479f7482e32261026ce919afc","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"                if self.count \u003d\u003d 1:"},{"line_number":1228,"context_line":"                    time.sleep(4)"},{"line_number":1229,"context_line":"                    return None"},{"line_number":1230,"context_line":"                if self.count \u003c 3:"},{"line_number":1231,"context_line":"                    self.count +\u003d 1"},{"line_number":1232,"context_line":"                    return \"meow\""},{"line_number":1233,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_b0b49ad2","line":1230,"updated":"2020-06-24 08:18:43.000000000","message":"Why \u003c 3? This test never hits count \u003e 1.","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"303f95ddd008ef17c199bafde3f025e09e819afa","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"                if self.count \u003d\u003d 1:"},{"line_number":1228,"context_line":"                    time.sleep(4)"},{"line_number":1229,"context_line":"                    return None"},{"line_number":1230,"context_line":"                if self.count \u003c 3:"},{"line_number":1231,"context_line":"                    self.count +\u003d 1"},{"line_number":1232,"context_line":"                    return \"meow\""},{"line_number":1233,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_10729cad","line":1230,"in_reply_to":"bf51134e_b0b49ad2","updated":"2020-06-24 16:55:12.000000000","message":"I honestly don\u0027t remember. I think I was going in an a slightly different direction originally.","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"68124f18df18e64479f7482e32261026ce919afc","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"                    self.count +\u003d 1"},{"line_number":1232,"context_line":"                    return \"meow\""},{"line_number":1233,"context_line":"                else:"},{"line_number":1234,"context_line":"                    time.sleep(30)"},{"line_number":1235,"context_line":"                    raise StopIteration"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":"            def iter_content(self, chunk_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_10cd8665","line":1234,"updated":"2020-06-24 08:18:43.000000000","message":"And this should be removed completely, just raise StopIteration since this path should not be hit in the test","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"303f95ddd008ef17c199bafde3f025e09e819afa","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"                    self.count +\u003d 1"},{"line_number":1232,"context_line":"                    return \"meow\""},{"line_number":1233,"context_line":"                else:"},{"line_number":1234,"context_line":"                    time.sleep(30)"},{"line_number":1235,"context_line":"                    raise StopIteration"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":"            def iter_content(self, chunk_size):"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf51134e_b062d0d6","line":1234,"in_reply_to":"bf51134e_10cd8665","updated":"2020-06-24 16:55:12.000000000","message":"Done","commit_id":"c5b97eb781cf9851f9abe87a1500b4da55b8bde8"}]}
