Repository navigation
Conversation
…acing real sockets A request that failed to send reported only reqwest's top line, such as "error sending request for url (...)", so a refused connection, a timeout and a certificate error all read the same. Transport errors now append each cause: "...: client error (Connect): tcp connect error: Connection refused". Three CI tests ran on a paused clock against real loopback sockets. The clock jumps ahead whenever the runtime waits on a socket, so on a slower machine it passed the client's 10 s connect timeout and the job's OIDC token request failed. They now use a client without deadlines, and one assertion no longer pins a request to within a second of two minutes.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
could not reach http://...: error sending request for url (...). A refused connection, a timeout and a bad certificate all read the same, so a CI log never says why.main:a_refused_request_is_asked_once_and_the_wait_runs_to_the_deadline,a_review_still_running_at_the_deadline_is_unavailableandonly_a_pull_request_job_on_its_own_identity_asks_once_after_two_minutes. They use a paused clock with real loopback sockets. The clock jumps ahead while the runtime waits on a socket, passes the client's 10 s connect timeout, and the OIDC token request fails withtcp connect error: deadline has elapsed.Change
Http::transportnow appends each error cause:...: client error (Connect): tcp connect error: Connection refused (os error 111). A new unit test binds and drops a port, then asserts the reason names the refusal. It fails without the change.cfg(test)Http::without_deadlinesfor the paused-clock tests. One assertion pinned the request to within 1 s of 2 min; it now checks 2 min <= at < 3 min (the job deadline), since the drift depends on the machine.Checks
cargo test(3 runs),cargo fmt --check,cargo clippy --all-targets: all clean.Notes for the reviewer