Problem you have encountered: Cloud Tasks making HTTP requests will be retried even if the error response is typically considered permanent (404 for example).
"The response that you receive from your request indicates whether or not it's useful to retry the request. Responses related to transient problems are generally retryable. On the other hand, response related to permanent errors indicate you need to make changes, such as authorization or configuration changes, before it's useful to try the request again. The following responses indicate transient problems that are useful to retry:
HTTP 408, 429, and 5xx response codes. Socket timeouts and TCP disconnects."
4xx errors such as 404s should not be retried.
Steps to reproduce: - Set up a cloud tasks that makes a request to an HTTP endpoint that requires authorization - Do not provide valid authorization - See the Cloud Task being retried as many times as your configuration allows, and fail each time
Description
Cloud Tasks making HTTP requests will be retried even if the error response is typically considered permanent (404 for example).
What you expected to happen:
Cloud Tasks retry strategy to work like the one highlighted for Cloud Storage's (
"The response that you receive from your request indicates whether or not it's useful to retry the request. Responses related to transient problems are generally retryable. On the other hand, response related to permanent errors indicate you need to make changes, such as authorization or configuration changes, before it's useful to try the request again. The following responses indicate transient problems that are useful to retry:
HTTP 408, 429, and 5xx response codes.
Socket timeouts and TCP disconnects."
4xx errors such as 404s should not be retried.
Steps to reproduce:
- Set up a cloud tasks that makes a request to an HTTP endpoint that requires authorization
- Do not provide valid authorization
- See the Cloud Task being retried as many times as your configuration allows, and fail each time