[AIENG-73] Fix Ruby timeout issue by setting HTTP timeouts #1015
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.



Background
Ruby team reported that Launchable CLI sometimes took so long time as follows:
One of the potential causes is that the timeout is not configured in our HTTP client. According to the following documentation, the system default will be used if no timeout is configured. I'm not sure what that default behavior actually means, but when I tested it in my local environment, it waited indefinitely for a response. So, I introduced the environment variable 'LAUNCHABLE_COMMIT_TIMEOUT', which sets a timeout for the commit collection process. We might modify the API later, such as by adding a CLI option. But for now, this environment variable should be sufficient for the Ruby team.
https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/client/config/RequestConfig.html
Example