Skip to content

fix: deployment with vertx5 client, fix broken expectContinue for vertx 5 - #8252

Open
ash-thakur-rh wants to merge 3 commits into
fabric8io:mainfrom
ash-thakur-rh:issue-q-57420
Open

ash-thakur-rh wants to merge 3 commits into
fabric8io:mainfrom
ash-thakur-rh:issue-q-57420

Conversation

@ash-thakur-rh

@ash-thakur-rh ash-thakur-rh commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Fixes #8253
Relates to quarkusio/quarkus#57420, complements #8251

What this does

  • httpclient-vertx-5: Vertx5HttpRequest no longer gates writing the request body on the
    Vert.x continueHandler. The body is always sent right after the headers. expectContinue()
    still emits the Expect: 100-continue header, Vert.x consumes interim 1xx responses itself, so
    a 100 Continue arriving mid-body is simply ignored. This matches the okhttp, JDK and Vert.x 4
    client behavior and is allowed by RFC 9110 (a client may send the body without waiting).
  • openshift-client: BuildConfigOperationsImpl#submitToApiServer no longer sets
    .expectContinue(). The handshake was an OkHttp chunked-encoding workaround; the content length
    is known and passed explicitly, so the handshake only adds failure modes.

Why

Vert.x fires continueHandler once per received interim 100 Continue, and proxy chains do not
guarantee exactly-once delivery. With the gating (measured locally against a controlled server,
see the issue for the reproducer):

interim 100 responses before after
0 (dropped by a proxy) body never sent: request hangs until the response timeout; server-side build only proceeds when the client disconnects succeeds in ~150 ms
1 succeeds succeeds
2 (duplicated by a proxy) body written twice: Request already complete; retry machinery then re-sends the consumed stream with an empty body, starting extra broken builds succeeds in ~150 ms

The 0-response and 1-response cases are the Quarkus OpenShift deploy failure in quarkusio/quarkus#57420 (deploy
times out at quarkus.openshift.build-timeout while the build completes successfully moments
later); the multi-response case is its multi-build variant.

Relationship to #8251

Complementary, not overlapping. #8251 stops retries of non-replayable InputStream bodies: the
amplification after the first failure. It does not prevent the first failure itself: Quarkus
already disables retries for this call (quarkusio/quarkus@2fe7529cf59, the equivalent of #8251's
protection here) and the hang occurs all the same. Conversely, this PR leaves #8251's general
protection for other failure causes (503/429/resets on any InputStream-bodied request) still
valuable. Both are needed.

Testing done

  • Two regression tests in Vertx5ExpectContinueInputStreamTest using a one-shot raw-socket server
    with exact control over the number of interim responses:
    testInputStreamWithExpectContinueButNoInterimResponse (0 responses) and
    testInputStreamWithExpectContinueAndDuplicatedInterimResponse (2 responses). Both fail on the
    previous code and pass with this change; the three existing expect-continue tests still pass.
  • Full httpclient-vertx-5 and openshift-client *BuildConfig* suites pass.
  • Manual testing with openshift cluster.

Signed-off-by: Ashish Thakur <ashishth@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vert.x 5 client: expectContinue() hangs or double-writes the request body when the interim 100 Continue is dropped or duplicated

1 participant