-
Notifications
You must be signed in to change notification settings - Fork 0
fix(vault): give test requests a timeout and a name #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+102
−8
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: odal-node/dpp-engine
Length of output: 4394
🏁 Script executed:
Repository: odal-node/dpp-engine
Length of output: 4693
🌐 Web query:
reqwest 0.13 ClientBuilder timeout is_timeout source error construction connect timeout official docs💡 Result:
<search_synthesis>
In reqwest 0.13, you can manage timeouts during client construction using the ClientBuilder struct [1][2]. Timeout Configuration: - connect_timeout(Duration): Sets a timeout for the connection phase specifically [1][3]. - timeout(Duration): Sets a global timeout that applies from the start of the request until the response body has been fully received [3]. - Note: By default, the async Client has no timeout, whereas the blocking client defaults to 30 seconds [4]. These configurations require a runtime, typically Tokio, with timers enabled [3]. Error Handling: - To programmatically determine if an error is caused by a timeout, you can use the is_timeout method on the reqwest::Error type [5][6]. - In reqwest 0.13, this method has been refined to explicitly check for underlying hyper::Error timeout variants and IO-related timeout errors, ensuring better accuracy compared to previous versions [5][7][8]. Under the hood, the ClientBuilder configures these timeouts by wrapping the underlying connector service in a Tower TimeoutLayer [1][9]. If a timeout occurs, the layer emits an error that is eventually surfaced through the request future [9]. If you encounter situations where a timeout appears to be ignored (hanging), ensure the timeout is applied at the appropriate level (e.g., connect_timeout vs. request-level timeout) and that your environment is not subject to OS-level networking behavior that masks timeout signals [10].
</search_synthesis>
<source_evidence>
Citations:
🏁 Script executed:
Repository: odal-node/dpp-engine
Length of output: 4689
Do not infer server receipt from
reqwest::Error::is_timeout().TestClientuses reqwest 0.13.4 and setsClientBuilder::timeout(REQUEST_TIMEOUT). This timeout covers connection establishment through response-body completion. Therefore,timeout_hintcan receive a timeout before the server accepts the request. Replace the server-receipt wording and adjacent documentation with a neutral message, such as" (request timed out before completion)". Update the correspondingCHANGELOG.mdtext.🤖 Prompt for AI Agents