(GH-2518) Add read-timeout config for PCP transport #2529
Merged
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.
This adds a
read-timeout
configuration setting for the PCP transport,which accepts an integer and passes the configuration to
OrchestratorClient.new()
. Although the option is an integer, itshould be nil if a value is not provided, as there's no static default
for
Net::Http::Persistent#read_timeout
, so we should not set oneunless it's configured. This allows users to configure either failing
quickly if the Orchestrator is busy (such as during code deploys), or to
extend the time if they'd like to wait for the jobs to finish.
read-timeout
configures the length of time to wait for a response fromthe Orchestrator before raising a timeout error when making HTTP
requests.
Relies on:
!feature
Add read-timeout configuration option for PCP transport (#2518)
Users can now configure a
read-timeout
for HTTP requests to theOrchestrator, which defines how long to wait for a response before
raising a Timeout error.