Merge master into 14.x#3443
Merged
Merged
Conversation
…ors (#3407) `MicrometerObservationCapability` started an `Observation` but never opened its `Scope`, so the new observation was not the current one while the call ran. Downstream `ObservationHandler`s — most importantly, tracing handlers that copy trace/span ids into the MDC — saw the parent observation instead of the Feign one, so log lines for the outgoing call were tagged with the wrong span id. The capability also caught only `FeignException`. Underlying clients (JDK `HttpURLConnection`, Apache HC5, OkHttp, …) throw client-specific exceptions — `SocketTimeoutException`, `HttpHostConnectException`, `IOException` — directly, never wrapped as `FeignException`. Those slipped past the `catch`, so the observation was never stopped: the error was not recorded, the timer was never committed, and the observation leaked. Both calls now open the observation as a `Scope` while the underlying client runs, catch any `Throwable` to record the error and stop the observation, and unwrap `CompletionException` on the async path so the recorded error is the cause rather than the wrapper. Fixes #2406 Fixes #2566
) * Avoid ClassLoader leak from static default async executor AsyncFeign held its default ExecutorService in a static singleton (LazyInitializedExecutorService) that was never shut down. Inside a servlet container, the daemon thread pool retained a strong reference to the initial application's ContextClassLoader, so each redeployment leaked the previous application's ClassLoader and threads, eventually causing a Metaspace OutOfMemoryError. Replace the static singleton with an instance-scoped default executor created per built client, so it (and its threads) become eligible for GC once the client is discarded. Also add AsyncBuilder.executorService(...) so callers can supply and own a managed, shut-downable executor. Fixes #3178 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com> * Exclude async executor from capability enrichment --------- Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…load (#3406) * fix: adapt logger tests to the Request.create(Body, RequestTemplate) signature JavaLoggerTest and LoggerRebufferTest still called the Request.create(..., byte[], Charset) overload removed in f9159cf, breaking test compilation of feign-core on master. Use the (Body, RequestTemplate) signature with null arguments, matching the existing usage in RetryableExceptionTest. * fix: adapt Slf4jLoggerTest to the Request.create(Body, RequestTemplate) signature Slf4jLoggerTest had the same problem as the feign-core logger tests: it called the removed Request.create(..., byte[], Charset) overload and also referenced feign.Util without an import, breaking feign-slf4j test compilation once feign-core compiles again. * fix: adapt validation tests to the RequestTemplate#body(Request.Body) signature Both BeanValidationMethodInterceptorTest variants still used the RequestTemplate#body(String) overload removed in f9159cf. * test: make Http2ClientTest hermetic, dropping the live nghttp2.org dependency that hangs CI Signed-off-by: Marvin Froeder <velo.br@gmail.com> --------- Signed-off-by: Marvin Froeder <velo.br@gmail.com> Co-authored-by: Marvin Froeder <velo.br@gmail.com> Co-authored-by: Marvin <velo@users.noreply.github.com>
… belong to 14.x (#3409) Signed-off-by: Marvin Froeder <velo.br@gmail.com>
Bumps `jackson.version` from 2.21.3 to 2.22.0. Updates `com.fasterxml.jackson:jackson-bom` from 2.21.3 to 2.22.0 - [Commits](FasterXML/jackson-bom@jackson-bom-2.21.3...jackson-bom-2.22.0) Updates `com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider` from 2.21.3 to 2.22.0 --- updated-dependencies: - dependency-name: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider dependency-version: 2.22.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.fasterxml.jackson:jackson-bom dependency-version: 2.22.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.hibernate.validator:hibernate-validator](https://github.com/hibernate/hibernate-validator) from 6.2.5.Final to 9.1.0.Final. - [Release notes](https://github.com/hibernate/hibernate-validator/releases) - [Changelog](https://github.com/hibernate/hibernate-validator/blob/main/changelog.txt) - [Commits](hibernate/hibernate-validator@6.2.5.Final...9.1.0.Final) --- updated-dependencies: - dependency-name: org.hibernate.validator:hibernate-validator dependency-version: 9.1.0.Final dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.springframework.cloud:spring-cloud-dependencies](https://github.com/spring-cloud/spring-cloud-release) from 2025.1.1 to 2025.1.2. - [Release notes](https://github.com/spring-cloud/spring-cloud-release/releases) - [Commits](spring-cloud/spring-cloud-release@v2025.1.1...v2025.1.2) --- updated-dependencies: - dependency-name: org.springframework.cloud:spring-cloud-dependencies dependency-version: 2025.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps `jersey.version` from 3.1.11 to 3.1.12. Updates `org.glassfish.jersey.core:jersey-client` from 3.1.11 to 3.1.12 Updates `org.glassfish.jersey.inject:jersey-hk2` from 3.1.11 to 3.1.12 --- updated-dependencies: - dependency-name: org.glassfish.jersey.core:jersey-client dependency-version: 3.1.12 dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: org.glassfish.jersey.inject:jersey-hk2 dependency-version: 3.1.12 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…y.version-3.1.12 build(deps-dev): Bump jersey.version from 3.1.11 to 3.1.12 in /jaxrs3
…amework.cloud-spring-cloud-dependencies-2025.1.2 build(deps): Bump org.springframework.cloud:spring-cloud-dependencies from 2025.1.1 to 2025.1.2
…openfeign Bumps [org.springframework.cloud:spring-cloud-starter-openfeign](https://github.com/spring-cloud/spring-cloud-openfeign) from 5.0.1 to 5.0.2. - [Release notes](https://github.com/spring-cloud/spring-cloud-openfeign/releases) - [Commits](spring-cloud/spring-cloud-openfeign@v5.0.1...v5.0.2) --- updated-dependencies: - dependency-name: org.springframework.cloud:spring-cloud-starter-openfeign dependency-version: 5.0.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…amework.cloud-spring-cloud-starter-openfeign-5.0.2 build(deps-dev): Bump org.springframework.cloud:spring-cloud-starter-openfeign from 5.0.1 to 5.0.2
…ion-2.22.0 build(deps): Bump jackson.version from 2.21.3 to 2.22.0
…e.validator-hibernate-validator-9.1.0.Final build(deps): Bump org.hibernate.validator:hibernate-validator from 6.2.5.Final to 9.1.0.Final
Bumps [tools.jackson:jackson-bom](https://github.com/FasterXML/jackson-bom) from 3.1.3 to 3.2.0. - [Commits](FasterXML/jackson-bom@jackson-bom-3.1.3...jackson-bom-3.2.0) --- updated-dependencies: - dependency-name: tools.jackson:jackson-bom dependency-version: 3.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps `springboot.version` from 4.0.6 to 4.1.0. Updates `org.springframework.boot:spring-boot-maven-plugin` from 4.0.6 to 4.1.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v4.0.6...v4.1.0) Updates `org.springframework.boot:spring-boot-starter-web` from 4.0.6 to 4.1.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v4.0.6...v4.1.0) Updates `org.springframework.boot:spring-boot-starter-test` from 4.0.6 to 4.1.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v4.0.6...v4.1.0) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-maven-plugin dependency-version: 4.1.0 dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: org.springframework.boot:spring-boot-starter-test dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.springframework.boot:spring-boot-starter-web dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…Unwrapping Signed-off-by: Marvin Froeder <velo.br@gmail.com> # Conflicts: # core/src/main/java/feign/SynchronousMethodHandler.java # core/src/test/java/feign/FeignTest.java
Bumps [com.squareup.okhttp3:okhttp-bom](https://github.com/square/okhttp) from 5.3.2 to 5.4.0. - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](square/okhttp@parent-5.3.2...parent-5.4.0) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:okhttp-bom dependency-version: 5.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps `vertx.version` from 5.1.1 to 5.1.2. Updates `io.vertx:vertx-junit5` from 5.1.1 to 5.1.2 - [Commits](eclipse-vertx/vertx-junit5@5.1.1...5.1.2) Updates `io.vertx:vertx-web-client` from 5.1.1 to 5.1.2 - [Commits](vert-x3/vertx-web@5.1.1...5.1.2) --- updated-dependencies: - dependency-name: io.vertx:vertx-junit5 dependency-version: 5.1.2 dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: io.vertx:vertx-web-client dependency-version: 5.1.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps `reactor.version` from 3.8.5 to 3.8.6. Updates `io.projectreactor:reactor-core` from 3.8.5 to 3.8.6 - [Release notes](https://github.com/reactor/reactor-core/releases) - [Commits](reactor/reactor-core@v3.8.5...v3.8.6) Updates `io.projectreactor:reactor-test` from 3.8.5 to 3.8.6 - [Release notes](https://github.com/reactor/reactor-core/releases) - [Commits](reactor/reactor-core@v3.8.5...v3.8.6) --- updated-dependencies: - dependency-name: io.projectreactor:reactor-core dependency-version: 3.8.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.projectreactor:reactor-test dependency-version: 3.8.6 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps `micrometer.version` from 1.16.5 to 1.17.0. Updates `io.micrometer:micrometer-core` from 1.16.5 to 1.17.0 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](micrometer-metrics/micrometer@v1.16.5...v1.17.0) Updates `io.micrometer:micrometer-test` from 1.16.5 to 1.17.0 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](micrometer-metrics/micrometer@v1.16.5...v1.17.0) --- updated-dependencies: - dependency-name: io.micrometer:micrometer-core dependency-version: 1.17.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.micrometer:micrometer-test dependency-version: 1.17.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: alhudz <al.hudz.k@gmail.com> Co-authored-by: Marvin <velo@users.noreply.github.com>
…fix Signed-off-by: Marvin Froeder <velo.br@gmail.com>
[Issue 1487] Fix ErrorDecoder not invoked for Apache HttpClient checked exceptions
…vertx5-test/vertx.version-5.1.2 build(deps-dev): Bump vertx.version from 5.1.1 to 5.1.2 in /vertx/feign-vertx5-test
…ersion-1.17.0 build(deps): Bump micrometer.version from 1.16.5 to 1.17.0
…n-jackson-bom-3.2.0 build(deps): Bump tools.jackson:jackson-bom from 3.1.3 to 3.2.0
….okhttp3-okhttp-bom-5.4.0 build(deps): Bump com.squareup.okhttp3:okhttp-bom from 5.3.2 to 5.4.0
Bumps [org.openrewrite.maven:rewrite-maven-plugin](https://github.com/openrewrite/rewrite-maven-plugin) from 6.41.0 to 6.42.0. - [Release notes](https://github.com/openrewrite/rewrite-maven-plugin/releases) - [Commits](openrewrite/rewrite-maven-plugin@v6.41.0...v6.42.0) --- updated-dependencies: - dependency-name: org.openrewrite.maven:rewrite-maven-plugin dependency-version: 6.42.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.openrewrite.recipe:rewrite-migrate-java](https://github.com/openrewrite/rewrite-migrate-java) from 3.36.0 to 3.37.0. - [Release notes](https://github.com/openrewrite/rewrite-migrate-java/releases) - [Commits](openrewrite/rewrite-migrate-java@v3.36.0...v3.37.0) --- updated-dependencies: - dependency-name: org.openrewrite.recipe:rewrite-migrate-java dependency-version: 3.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…ite.recipe-rewrite-migrate-java-3.37.0 build(deps): Bump org.openrewrite.recipe:rewrite-migrate-java from 3.36.0 to 3.37.0
…ite.maven-rewrite-maven-plugin-6.42.0 build(deps-dev): Bump org.openrewrite.maven:rewrite-maven-plugin from 6.41.0 to 6.42.0
…e.validator-hibernate-validator-9.1.0.Final build(deps): Bump org.hibernate.validator:hibernate-validator from 6.2.5.Final to 9.1.0.Final
Bumps [org.hibernate.validator:hibernate-validator](https://github.com/hibernate/hibernate-validator) from 6.2.5.Final to 9.1.0.Final. - [Release notes](https://github.com/hibernate/hibernate-validator/releases) - [Changelog](https://github.com/hibernate/hibernate-validator/blob/main/changelog.txt) - [Commits](hibernate/hibernate-validator@6.2.5.Final...9.1.0.Final) --- updated-dependencies: - dependency-name: org.hibernate.validator:hibernate-validator dependency-version: 9.1.0.Final dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Response.charset() and feign-form's FormEncoder.getCharset() passed the parsed charset token straight to Charset.forName, so an unsupported or illegal name from a Content-Type header threw instead of using the documented UTF-8 default. Catch the charset exceptions in both and fall back to UTF-8, as FeignException.getResponseCharset already does.
The maximum length of a single template expression was hard-coded to 10000 characters in feign.template.Expressions, throwing IllegalArgumentException for anything longer with no way to opt out. Make the limit configurable through the "feign.template.expression.maxLength" system property (default 10000), and allow disabling the check entirely by setting it to a non-positive value. Fixes #2916 Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com>
`DelegateWriter` encodes a parameter through the delegate `Encoder` (e.g. the Jackson encoder), which sets the correct `Content-Type` (such as `application/json`) on the throwaway `RequestTemplate`. That header was discarded and `SingleParameterWriter` hard-coded `text/plain`, so JSON parts of a multipart request were emitted as `text/plain`. `DelegateWriter` now reads the `Content-Type` produced by the delegate and passes it through to `SingleParameterWriter.writeWithContentType`, falling back to `text/plain; charset=<charset>` when the delegate sets no content type. The previous behaviour for plain single parameters is unchanged. Fixes #2813 Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e.validator-hibernate-validator-9.1.0.Final build(deps): Bump org.hibernate.validator:hibernate-validator from 6.2.5.Final to 9.1.0.Final
Bumps com.gradle:develocity-maven-extension from 2.4.1 to 2.4.2. --- updated-dependencies: - dependency-name: com.gradle:develocity-maven-extension dependency-version: 2.4.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.openrewrite.recipe:rewrite-testing-frameworks](https://github.com/openrewrite/rewrite-testing-frameworks) from 3.38.0 to 3.40.0. - [Release notes](https://github.com/openrewrite/rewrite-testing-frameworks/releases) - [Commits](openrewrite/rewrite-testing-frameworks@v3.38.0...v3.40.0) --- updated-dependencies: - dependency-name: org.openrewrite.recipe:rewrite-testing-frameworks dependency-version: 3.40.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…evelocity-maven-extension-2.4.2 build(deps-dev): Bump com.gradle:develocity-maven-extension from 2.4.1 to 2.4.2
…ite.recipe-rewrite-testing-frameworks-3.40.0 build(deps): Bump org.openrewrite.recipe:rewrite-testing-frameworks from 3.38.0 to 3.40.0
Bumps `vertx.version` from 5.1.2 to 5.1.3. Updates `io.vertx:vertx-junit5` from 5.1.2 to 5.1.3 - [Commits](eclipse-vertx/vertx-junit5@5.1.2...5.1.3) Updates `io.vertx:vertx-web-client` from 5.1.2 to 5.1.3 - [Commits](vert-x3/vertx-web@5.1.2...5.1.3) --- updated-dependencies: - dependency-name: io.vertx:vertx-junit5 dependency-version: 5.1.3 dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: io.vertx:vertx-web-client dependency-version: 5.1.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [org.openrewrite.recipe:rewrite-migrate-java](https://github.com/openrewrite/rewrite-migrate-java) from 3.37.0 to 3.38.0. - [Release notes](https://github.com/openrewrite/rewrite-migrate-java/releases) - [Commits](openrewrite/rewrite-migrate-java@v3.37.0...v3.38.0) --- updated-dependencies: - dependency-name: org.openrewrite.recipe:rewrite-migrate-java dependency-version: 3.38.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…vertx5-test/vertx.version-5.1.3 build(deps-dev): Bump vertx.version from 5.1.2 to 5.1.3 in /vertx/feign-vertx5-test
…ite.recipe-rewrite-migrate-java-3.38.0 build(deps): Bump org.openrewrite.recipe:rewrite-migrate-java from 3.37.0 to 3.38.0
* Return response body in FeignException from errorReading (#2618) FeignException.errorReading passed request.body() and request.headers() into the constructor's responseBody/responseHeaders parameters, so FeignException.responseBody()/contentUTF8()/responseHeaders() exposed the request data instead of the response when a read failure occurred while decoding a response. Read the response body (mirroring errorStatus, tolerating a streamed or already-consumed body) and pass the response headers instead. Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com> * test: assert response body in errorReading FeignException (#2618) The pre-existing throwsFeignException{Including,Without}Body tests in FeignTest, AsyncFeignTest and FeignUnderAsyncTest asserted the old behavior where FeignException.contentUTF8() returned the *request* body on the errorReading path. #2618 corrects this to return the *response* body, so update the assertions accordingly (and enqueue an empty response for the without-body case). Fixes the failing ci/circleci: pr-build. Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com> * test: assert response body in errorReading for async client modules (#2618) The okhttp/java11/hc5 async client tests still asserted the pre-#2618 request body in throwsFeignExceptionIncludingBody, turning ci/circleci: pr-build red. Align them with core to expect the response body, matching the new errorReading behavior. Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com> --------- Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com>
Signed-off-by: Marvin Froeder <velo.br@gmail.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.
Brings
master(13.x line, throughbaeba5a7) into the14.xrelease branch via a real merge commit, so master's history is preserved and futuremaster→14.xmerges stay cheap (a proper merge-base is recorded).Conflict resolution
The dominant part of master's delta since the merge base was the streaming-bodies revert (#3409), which must not take effect on
14.x— the streamingRequest.BodyAPI is a deliberate v14 breaking change. Every revert-touched file was resolved toward14.x. Because14.x's streamingBodyAPI is type-incompatible with the revertedbyte[]-based API, the compiler verified that no revert slipped through silently.Genuine master fixes carried in
ErrorDecoder: guard numeric retry-after against long overflow (guard numeric retry-after against long overflow #3405)14.x's streaming writersHttp2Client: honorjdk.httpclient.allowRestrictedHeaders(Honor jdk.httpclient.allowRestrictedHeaders in Http2Client (#2975) #3419) + capContent-Lengthbefore narrowing to int (cap Content-Length before narrowing to int in Http2Client #3431) — re-applied onto14.x's client; their new tests adapted to the streamingBodyAPINotes for reviewers
<excludes>for the v14 breaking types (feign.Request,feign.RequestTemplate,feign.mock.RequestKey,feign.vertx.VertxHttpClient) which the auto-merge had dropped from the parent POM.FeignException.errorReadingreturning the response body) was intentionally not carried:14.xdeliberately haserrorReadingreturn an empty body (its tests assertisEmpty()). Adopting Return response body in FeignException from errorReading (#2618) #3415 would reverse that decision — left as a follow-up if14.xwants it.14.xalready encodes the SOAP body from rawtoByteArray()(no charset-corruptingStringround-trip), which is exactly what encode soap request body with the configured charset #3433 fixes.Verification
Full
mvn clean install -Pdevpasses locally — all modules compile, unit + integration tests green, all japicmp checks pass. The only local failures were Spring-Boot tests that bind a hardcoded port 8080 (occupied by an unrelated local service) and two network-dependent example ITs; both are environmental and unrelated to this merge.