Skip to content

http Agent: Honor retries on read timeouts #165

@puerco

Description

@puerco

At present, the http agent will honor the retries setting when sending the http request to the server:

release-utils/http/agent.go

Lines 163 to 169 in 7e56f68

func (a *Agent) GetRequest(u string) (response *http.Response, err error) {
logrus.Debugf("Sending GET request to %s", u)
return a.retryRequest(func() (*http.Response, error) {
return a.SendGetRequest(a.Client(), u)
})
}

This means that errors in the connection or from http status codes are retried. But after returning the request object, timeouts reading the response body will cause the agent to return an error immediately instead of honoring the retries setting.

/kind bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions