• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • http-request-plugin
    • None

      We use the httpRequest plugin to trigger a script on a webhook which takes quite some time until it returns the results.

      If there is no answer within 4min the plugin automatically sends another GET request. There is no way to disable this or change this timeout and it does not look from the documentation that this should be the intended behavior (no retry is mentioned anywhere).

          [JENKINS-59050] httpRequest automatically retries requests

          Jozsef Kozell added a comment - - edited

          Yes, Apache HttpComponents Client 4.5 surely has a default auto-retry via the builder (3 times, idempotent only, except on exceptions InterruptedIOException, UnknownHostException, ConnectException, SSLException).

          Jozsef Kozell added a comment - - edited Yes, Apache HttpComponents Client 4.5 surely has a default auto-retry via the builder (3 times, idempotent only, except on exceptions InterruptedIOException, UnknownHostException, ConnectException, SSLException).

          Basil Crow added a comment -

          I would love to see this issue fixed. PRs are welcome!

          Basil Crow added a comment - I would love to see this issue fixed. PRs are welcome!

          Basil Crow added a comment -

          Would be nice if someone could volunteer to convert this plugin to use the new Java 11 HTTP client rather than Apache HttpComponents.

          Basil Crow added a comment - Would be nice if someone could volunteer to convert this plugin to use the new Java 11 HTTP client rather than Apache HttpComponents.

          Jozsef Kozell added a comment -

          Is there a ticket for that?

          Right now, I'm trying to reproduce this bug.

          Jozsef Kozell added a comment - Is there a ticket for that? Right now, I'm trying to reproduce this bug.

          Basil Crow added a comment -

          No ticket as far as I'm aware. A rewrite to use the native Java 11 HTTP client would definitely be more maintainable than Apache HttpComponents. However I suspect some users might have come to rely on the existing retry behavior, so any fix for this ticket (whether combined with a move to Apache HttpComponents or not) would likely need to support both the old and new behavior with an opt-in toggle for the new behavior or an escape hatch to get the old behavior back if users are not prepared.

          Basil Crow added a comment - No ticket as far as I'm aware. A rewrite to use the native Java 11 HTTP client would definitely be more maintainable than Apache HttpComponents. However I suspect some users might have come to rely on the existing retry behavior, so any fix for this ticket (whether combined with a move to Apache HttpComponents or not) would likely need to support both the old and new behavior with an opt-in toggle for the new behavior or an escape hatch to get the old behavior back if users are not prepared.

          Jozsef Kozell added a comment -

          basil Maybe a new major version, to separate the two

          Jozsef Kozell added a comment - basil Maybe a new major version, to separate the two

            janario Janario Oliveira
            andreas_zuber Andreas Zuber
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: