Skip to content

Commit

Permalink
chore: increase hard-coded timeout for http calls
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickMenoti committed Oct 9, 2024
1 parent a0e80fd commit 5f7fe5e
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmd/azion/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
func main() {
streams := iostreams.System()
httpClient := &http.Client{
Timeout: 20 * time.Second, // TODO: Configure this somewhere
Timeout: 50 * time.Second, // TODO: Configure this somewhere
}

tok, _ := token.ReadSettings()
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/cache_setting/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/domain/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/edge_applications/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/edge_function/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/origin/origin.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/personal_token/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/realtime_purge/realtime_purge.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/rules_engine/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/variables/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewClient(c *http.Client, url string, token string) *Client {
conf.Servers = sdk.ServerConfigurations{
{URL: url},
}
conf.HTTPClient.Timeout = 30 * time.Second
conf.HTTPClient.Timeout = 50 * time.Second

return &Client{
apiClient: sdk.NewAPIClient(conf),
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/root/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
func TestExecute(t *testing.T) {
streams := iostreams.System()
httpClient := &http.Client{
Timeout: 10 * time.Second, // TODO: Configure this somewhere
Timeout: 50 * time.Second, // TODO: Configure this somewhere
}

tok, _ := token.ReadSettings()
Expand Down

0 comments on commit 5f7fe5e

Please sign in to comment.