chore: DefaultHTTPTimeout can be configured via the environment variable#13185
chore: DefaultHTTPTimeout can be configured via the environment variable#131850xff-dev wants to merge 1 commit into
Conversation
Signed-off-by: 0xff-dev <stevenshuang521@gmail.com>
| // https://github.com/curl/curl/blob/master/lib/connect.h#L40C21-L40C21 | ||
| // The helm commands are usually executed manually. Considering the acceptable waiting time, we reduced the entire request time to 120s. | ||
| DefaultHTTPTimeout = 120 | ||
| defaultHTTPTimeout = 120 |
There was a problem hiding this comment.
| defaultHTTPTimeout = 120 | |
| DefaultHTTPTimeout = 120 |
Since this is not an internal package, this probably needs to stay public or this would be a breaking change.
| defaultHTTPTimeout = 120 | ||
| ) | ||
|
|
||
| var defaultOptions = []Option{WithTimeout(time.Second * DefaultHTTPTimeout)} |
There was a problem hiding this comment.
I'm not sure you want to makeGetDfaultHTTPTimeout and DefaultOptions public unless there is a need.
There was a problem hiding this comment.
My previous idea was that if a user's project depends on helm and wants to get the default http timeout, helm should provide a method to get it, so I set the GetDefaultHTTPTimeout method to public.
And there is no need to set the DefaultOptions method to public, I'll Update it.
|
This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs. |
What this PR does / why we need it:
The previous PR #12203, which added a default timeout for httpProvider, was not configurable, and commands such as
helm repo add,helm repo update, etc. did not have a timeout parameter, and there was a problem with Issue #12952.To solve this problem, there are two possible options
Considering the minimum changes and impact, use option 2.
Special notes for your reviewer:
If applicable: