Repository navigation
fix: deployment with vertx5 client, fix broken expectContinue for vertx 5 - #8252
Open
ash-thakur-rh wants to merge 3 commits into
Open
ash-thakur-rh wants to merge 3 commits into
ash-thakur-rh wants to merge 3 commits into
Conversation
Signed-off-by: Ashish Thakur <ashishth@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8253
Relates to quarkusio/quarkus#57420, complements #8251
What this does
httpclient-vertx-5:Vertx5HttpRequestno longer gates writing the request body on theVert.x
continueHandler. The body is always sent right after the headers.expectContinue()still emits the
Expect: 100-continueheader, Vert.x consumes interim 1xx responses itself, soa
100 Continuearriving mid-body is simply ignored. This matches the okhttp, JDK and Vert.x 4client behavior and is allowed by RFC 9110 (a client may send the body without waiting).
openshift-client:BuildConfigOperationsImpl#submitToApiServerno longer sets.expectContinue(). The handshake was an OkHttp chunked-encoding workaround; the content lengthis known and passed explicitly, so the handshake only adds failure modes.
Why
Vert.x fires
continueHandleronce per received interim100 Continue, and proxy chains do notguarantee exactly-once delivery. With the gating (measured locally against a controlled server,
see the issue for the reproducer):
100responsesRequest already complete; retry machinery then re-sends the consumed stream with an empty body, starting extra broken buildsThe 0-response and 1-response cases are the Quarkus OpenShift deploy failure in quarkusio/quarkus#57420 (deploy
times out at
quarkus.openshift.build-timeoutwhile the build completes successfully momentslater); the multi-response case is its multi-build variant.
Relationship to #8251
Complementary, not overlapping. #8251 stops retries of non-replayable
InputStreambodies: theamplification 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) stillvaluable. Both are needed.
Testing done
Vertx5ExpectContinueInputStreamTestusing a one-shot raw-socket serverwith exact control over the number of interim responses:
testInputStreamWithExpectContinueButNoInterimResponse(0 responses) andtestInputStreamWithExpectContinueAndDuplicatedInterimResponse(2 responses). Both fail on theprevious code and pass with this change; the three existing expect-continue tests still pass.
httpclient-vertx-5andopenshift-client*BuildConfig*suites pass.