httpRequest automatically sends retry when receiving HTTP 503

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: http-request-plugin
    • None

      We are using the HTTP Request Plugin to do http request in our pipelines.

      Since Version 1.22 of the plugin we have observe a change in behavior when it comes to handling HTTP 503 response.

      Before the Version 1.22, the HTTP 503 response was returned to the caller (i.e. the pipeline).

      Now with Version 1.22, the HTTP 503 response is not returned but instead the same request is sent again (i.e. some retry mechanism).

      Looking through the changelog of the plugin (https://github.com/jenkinsci/http-request-plugin), the underlying http client library was updated (httpclient4 to httpclient5).

      It looks to me as if there is a change in default behavior in httpclient5 when it comes to the default retry strategy:

      DefaultHttpRequestRetryStrategy()
      Create the HTTP request retry strategy with a max retry count of 1, default retry interval of 1 second, and using the following list of non-retriable I/O exception classes:
      InterruptedIOException UnknownHostException ConnectException ConnectionClosedException SSLException and retriable HTTP status codes:
      SC_TOO_MANY_REQUESTS (429) SC_SERVICE_UNAVAILABLE (503)

      source: https://hc.apache.org/components/httpcomponents-client-5.1.x/5.1.4/httpclient5/apidocs/org/apache/hc/client5/http/impl/DefaultHttpRequestRetryStrategy.html

      Please investigate this issue and restore the old behavior (no retry by default)

            Assignee:
            Janario Oliveira
            Reporter:
            Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: