-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump Spring and Jetty dependencies #5372
Conversation
Motivation: Spring 6 HTTP client is split into two parts. line#4838 (comment) It will be easier to review if Spring dependencies is upgraded before working on Spring HTTP 6 integration. - Spring 6.0.13 -> 6.1.12 - Spring Boot 2.7.16 -> 2.7.18, 3.1.4 -> 3.2.1
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5372 +/- ##
===========================================
+ Coverage 0 73.77% +73.77%
- Complexity 0 20460 +20460
===========================================
Files 0 1776 +1776
Lines 0 75521 +75521
Branches 0 9628 +9628
===========================================
+ Hits 0 55719 +55719
- Misses 0 15181 +15181
- Partials 0 4621 +4621 ☔ View full report in Codecov by Sentry. |
.getBytes(StandardCharsets.US_ASCII); | ||
|
||
@Override | ||
public boolean handle(Request req, Response res, Callback callback) throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is similar to AsyncStreamingHandlerFunction
in Jetty 11 module but the super interface has been changed.
Sorry for the massive change in a single PR. 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! Left some minor comments 🙇
...nfigure/src/main/java/com/linecorp/armeria/spring/web/reactive/ArmeriaServerHttpRequest.java
Outdated
Show resolved
Hide resolved
.../java/com/linecorp/armeria/spring/web/reactive/AbstractServerHttpRequestVersionSpecific.java
Outdated
Show resolved
Hide resolved
jetty/jetty12/src/main/java/com/linecorp/armeria/server/jetty/AbstractArmeriaEndPoint.java
Outdated
Show resolved
Hide resolved
/** | ||
* A skeletal builder implementation for {@link JettyServiceBuilder} in Jetty 9 and Jetty 10+ modules. | ||
*/ | ||
public abstract class AbstractJettyServiceBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question) What do you think of moving the deprecated methods to jetty11/JettyServiceBuilder
and sharing the implementation of AbstractJettyServiceBuilder
between jetty11
and jetty12
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JettyServiceBuilder
exists in both jetty11
and jetty9
. Let me move the deprecated methods to them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me. Thanks a lot! 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update micrometer deps as the latest patch of spring boot causes a conflict with what we have.
-micrometer = "1.11.5"
-micrometer-tracing = "1.1.6"
-micrometer-docs-generator = "1.0.2"
+micrometer = "1.12.2"
+micrometer-tracing = "1.2.2"
+micrometer-docs-generator = "1.0.3"
Noticed this in zipkin until I bumped micrometer, too
java.lang.NoSuchMethodError: 'void io.micrometer.core.instrument.binder.jvm.ExecutorServiceMetrics.<init>(java.util.concurrent.ExecutorService, java.lang.String, java.lang.String, java.lang.Iterable)'
at com.linecorp.armeria.server.DefaultServerConfig.monitorBlockingTaskExecutor(DefaultServerConfig.java:331)
I'm just waiting for this PR to be merged. |
Sure, I will bump all other dependencies in a dependency upgrade PR. |
Co-authored-by: Crypt Keeper <[email protected]>
Co-authored-by: Crypt Keeper <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks @ikhoon 🙇 👍 🙇 (bar the lint failures)
The lint failure is fixed in the main branch with e3ba6ec |
woot 🥇 |
Motivation:
Spring 6 HTTP client is split into two parts.
#4838 (comment) It will be easier to review if Spring dependencies are upgraded before working on Spring HTTP 6 integration.
Dependencies:
Modifications:
@AutoConfigureMetrics
has been removed in favor of@AutoConfigureObservability
. Disable tracing in integration tests spring-projects/spring-boot#31308@EnableTestMetrics
is added in Spring Boot 2 and 3 modules to share the same test code.@EnableTestMetrics
inboot2-actuator-autoconfigure
inherits@AutoConfigureMetrics
but@AutoConfigureObservability
is inherited inboot3-actuator-autoconfigure
.AbstractServerHttpRequestVersionSpecific
is added to shim the API changes in Spring 6.1Mono
in test REST APIs. Otherwise, the service method is invoked with a blocking executor of Spring WebFlux. spring-projects/spring-framework@b016f38#diff-8fd6b8e3408492ba1cabbbea613ac33b7c674db0a9287a2d479e83ec55c1544eR253-R254JettyService
code can no longer be reused, soJettyService
is newly implemented based on the Jetty 12 API.JettyServiceBuilder
JettyServiceBuilder.tlsReverseDnsLookup()
is removed because JettyServletApiRequest.getRemoteHost()
does not perform a reverse DNS lookup.JettyServiceBuilder.handlerWrapper(HandlerWrapper)
has been removed in favor ofJettyServiceBuilder.insertHandler(Handler.Singleton)
HandlerWrapper
does not exist in Jetty 12.insertHandler(Handler.Singleton)
is the most similar replacement.JettyServiceBuilder.sessionIdManager(SessionIdManager)
andsessionIdManagerFactory(Function)
have been removed becauseServer.setSessionIdManager()
does not exist.SessionIdManager
can be set viaJettyServiceBuilder.bean()
https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#pg-server-session-idmgrJettyService
Request
becomes immutable so Armeria request headers are indirectly set viaHttpChannel.onRequest()
HttpStreamOverHTTP1
provides a request body instead ofHttpChannelOverHttp
.HttpStreamOverHTTP1.send(...)
. Previously,HttpConnection.send(...)
was used.jReq.setDispatcherType()
andjReq.setAsyncSupported()
.setAsyncSupported
, async could support viaCallback
interface.httpChannel.handle()
has been replaced withhttpChannel.onRequest(requestMetadata).run()
.