1.21.0 release notes
22nd December 2022
🌟 New features
You can now use
@RequestTimeout
to set a request timeout to annotated services and gRPC services. #4463 #4499import com.linecorp.armeria.server.annotation.decorator.RequestTimeout; @RequestTimeout(value = 1, unit = TimeUnit.SECONDS) // 👈👈👈 class MyAnnotationService { // A request gets timed out after 1 second. @Get("/fast/api") public CompletableFuture<MyResponse> fastApi() { ... } // A request gets timed out after 5 seconds. @RequestTimeout(value = 5, unit = TimeUnit.SECONDS) // 👈👈👈 public CompletableFuture<MyResponse> slowApi() { ... } }
You can now set the default
MeterRegistry
by implementing a customFlagsProvider
. #4541public class CustomFlagsProvider implements FlagsProvider { @Override public MeterRegistry meterRegistry() { return PrometheusMeterRegistries.newRegistry(); // 👈👈👈 } }
You can now set the default
HttpHeaders
toServer
,VirtualHost
andService
. #4520static AsciiString CUSTOM_HEADER = HttpHeaderNames.of("x-custom-header"); Server .builder() .setHeader(CUSTOM_HEADER, "server-default-header") .virtualHost("foo.com") .setHeader(CUSTOM_HEADER, "vhost-default-header").and() .route() .path("/foo") .setHeader(CUSTOM_HEADER, "service-default-header")
You can now set
:authority
orHost
header whose value is different fromEndpoint.host()
usingClientBuilder.setHeader()
. #4440 #4520- This will be useful when you want to send a request through a proxy server.
WebClient // A request is sent to 'reverse-proxy.example.com'. .builder("http://reverse-proxy.example.com/") // but 'my-order.service.com' is used for the ':authority' header. .setHeader(HeaderNames.AUTHORITY, "my-order.service.com") ...
CircuitBreakerClient
can now be used with arbitraryCircuitBreaker
implementations. #4426You can now see the description of services in the overview section of
DocService
. #4480 #4537You can now override an authority of a gRPC client using
CallOptions
. #4445 #4520
📈 Improvements
DecodingClient
andDecodingService
can now limit the maximum length of decompressed data. #4469 #4564synchronized
blocks have been replaced withReentrantLock
for better virtual thread compatibility. #4551 #4549ServiceSpecification
forDocService
is lazily loaded so as to not block aServer
from starting. #4491
🛠️ Bug fixes
HttpHeaders
set byClientBuilder.setHeader()
is now stored inClientRequestContext.defaultRequestHeaders()
which has the lowest priority and doesn't override values inRequestHeaders
.- Previously, the
HttpHeaders
set viaClientBuilder
were stored inClientRequestContext.additionalRequestHeaders()
which overrode the values inRequestHeaders
#4440 #4520
- Previously, the
- Fixed a regression where
void
methods return200 OK
instead of204 NoContent
if a@Produces
annotation is added. #4575 - Deleted uncompressed
DocService
assets that were added unintentionally. #4500 #4568 - An exception raised in
Authorizer
is now properly peeled usingExceptions.peel()
. #4567 - Exceptions raised in decorators can now be used to determine whether to retry by
RetryingClient
. #4558 #4559 EndpointGroup
is now correctly copied to a newly derived client. #4556RequestContextExportingAppender
can now be used with logbackSocketAppender
. #4546 #4547- Reversed HTTP/1.1 responses are now correctly ordered when HTTP/1.1 pipelining is enabled. #4536 #4470
414 Request-URI Too Long
is now correctly returned for a long URI in HTTP/1.1. #4478 #4532- Fixed to propagate the cause of a decoder failure of an HTTP/1.1 request to
ServerErrorHandler.onProtocolViolation()
#4478 #4532 - You can use
DocService
even whenServer.reconfigure()
is called. #4491 #4513 - Context leak stack trace is more readable now. #4517
🏚️ Deprecations
- N/A
☢️ Breaking changes
FieldInfo.childFieldInfo
has been removed to eliminate duplicate information onStructInfo
. #4566
⛓ Dependencies
- Apache Curator 5.3.0 → 5.4.0
- Brave 5.14.0 → 5.14.1
- Dropwizard 2.1.1 → 2.1.4
- Eureka 1.10.17 → 2.0.0
- GraphQL Java 19.2 → 20.0
- Jackson 2.13.4 → 2.14.1
- java-jwt 4.0.0 → 4.2.1
- Jetty 9.4.48 → 9.4.50
- Kafka client 3.3.0 → 3.3.1
- Kotlin 1.7.20 → 1.7.22
- Micrometer 1.9.4 → 1.10.2
- Netty 4.1.82 → 4.1.86
- io_uring 0.0.15 → 0.0.16
- Reactor 3.4.23 → 3.4.26
- Sangria 3.3.0 → 3.4.1
- Sangria slowlog 2.0.4 → 2.0.5
- Scala 2.13.9 → 2.13.10
- scala-collection-compat 2.8.1 → 2.9.0
- ScalaPB 0.11.11 → 0.11.12
- Tomcat 8.5.81 → 8.5.84, 9.0.65 → 9.0.70
- ZooKeeper 3.6.3 → 3.7.1