insights-core
insights-core copied to clipboard
Handle read timeouts on registration check
Requests made during a registration check (done on running insights-client --support
) cause crash if read (not connection) timeout occurs. Fixed by catching these read timeouts the same way as other connection errors.
There are only unit tests, checking that the timeout errors get caught just as the connection errors do. It would be possible and plausible to make a functional test that would check the whole run. That would require mocking out the HTTP requests. I have begun working on that for #1418, but it has been postponed. With that done it will be possible to add functional tests for this PR too.
Can one of the admins verify this patch?
Does @YakovLittle want to do a review, or is it more something for @gravitypriest or @kylape?
Closed by accident. Reopening.
This may be still relevant. Is it worth checking? @gravitypriest @subpop
I agree. These changes seem reasonable to me. The more error-handling the better.
Looks good but I'll just comment that this will eventually get swallowed up in the connection.py changes once those are finished and tested (the new stuff also handles timeouts)