A networking framework that evolves with your application
APACHE-2.0 License
Bot releases are hidden (Show)
Published by bondolo over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several useful improvements and bug fixes. This release is expected to be a "drop-in" replacement for all prior 0.42.X releases.
The 0.41.x branch is now EOL. Please plan your migrations accordingly, and let us know if you have any questions. The recommended path is:
protoc
compiler you may now need to add servicetalk-data-protobuf
as a dependency as it is required for the generated classes. The missing dependency is most often seen as package ProtobufSerializerFactory does not exist
. Previously servicetalk-data-protobuf
had been transitively included for you.servicetalk-data-jackson
dependency scopes (#2198)AsyncContext
concurrency docs (#2199)javadocAll
errors (#2195)publish-docs.sh
and release.sh
(#2196)release.sh
fixes to build on non-main branch (#2194)japicmp.sh
from release.sh
(#2193)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report any unintended omission.
@bondolo
@chemicL
@eddie4941
@idelpivnitskiy
@Scottmitch
@tkountis
Published by chemicL over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several useful new features, improvements, and bug fixes. This release is expected to be a "drop-in" replacement for all prior 0.42.X releases.
offloadNever()
(#2133)
offloadNone()
LoadBalancer
and ConnectionFactory
: add a context of the caller (#2168)
LoadBalancer#selectConnection(Predicate)
, users should migrate to the new method LoadBalancer#selectConnection(Predicate, ContextMap)
;ConnectionFactory#newConnection(Address, TransportObserver)
, users should migrate to the new method ConnectionFactory#newConnection(Address, ContextMap, TransportObserver)
;ConnectionFactory
see difference between proxied and direct connections (#2169)HttpProviders
and GrpcProviders
(#2137)[Single | Completable].cache(...)
operators (#2162)SslConfig
through ConnectionInfo
(#2150)Publisher.flatMapConcatSingle(...)
(#2151)GrpcLifecycleObserver
in the filter chain (#2171)ConcurrentMap
methods (#2188)ServiceDiscoverer#toString()
for DefaultDnsServiceDiscoverer
(#2149)Processors.newPublisherProcessor()
simplify duplicate terminal check (#2148)RoundRobinLoadBalancer
: better identify excess connections (#2173)RoundRobinLoadBalancer
: increase visibility into health-checking (#2182)ServiceTalkSocketOptions#IDLE_TIMEOUT
(5 minutes) (#2174)IoExecutor
timer for retry (#2134)TextMapFormatter
: default sampled to null
rather than false
when extracting trace context (#2177)asChildOf
calls (#2167)Http2Exception
and send RST_STREAM frame (#2146)Publisher.multicast(...)
duplicate cancel IndexOutOfBounds
exception (#2161)servicetalk-examples-grpc-observer
(#2172)HttpSerializers.stringStreamingSerializer
(#2164)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report any unintended omission.
@bondolo
@chemicL
@eddie4941
@idelpivnitskiy
@saturnism
@Scottmitch
@suman-ganta
@tkountis
Published by bondolo over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk 0.41 users that contains several bug fixes and improvements. The 0.41.X releases are provided for users operating legacy production systems, most users should migrate to the current mainline 0.42 releases.
publishOn
/subscribeOn
Executor
overload (#2155)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report any unintended omission.
Published by chemicL over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
HttpClients.forMultiAddressUrl(ServiceDiscoverer)
(#2132)
MultiAddressHttpClientBuilder#initializer(SingleAddressInitializer)
should be used to override ServiceDiscoverer
using SingleAddressHttpClientBuilder#serviceDiscoverer(ServiceDiscoverer)
.PartitionedHttpClientBuilder
and partition client APIs (#2131)
PartitionedHttpClientBuilder
is hard to use because it requires implementation of a special ServiceDiscoverer
that we do not provide OOTB. We are unaware of anyone using this feature, but if there are any users they should consider ClientGroup
as an alternative or reach out to us to provide more context why the PartitionedHttpClientBuilder
is required.ServiceFactory.Builder
#addService(BlockingService)
-> #addBlockingService(BlockingService)
(#2143)
HttpHeadersFactory
for multi-address and partitioned clients (#2135)HttpClientBuildContext
(#2136)defaultStrategy()
merge method (#2108)proxy-connection
header from outgoing HTTP/2 messages (#2138)logUserData
(#2125)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report any unintended omission.
Published by Scottmitch over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
json
sub-folder (#2106)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by Scottmitch over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
Published by Scottmitch over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
Published by tkountis over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
CompositeCloseable
: prepend doesn't respect ordering (#2097)Content-Type
for Zipkin Protobuf should be application/x-protobuf
(#2101)ConnectionFactory
-level filters can not migrate to new API of #1956 (#2089)HttpLifecycleObserverServiceFilter
constructor public (#2096)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by chemicL over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements. It contains all changes released in 0.41.15 plus the following:
Single.repeatWhen(BiIntFunction<T, Completable>)
(#2090)PayloadSizeLimitingHttp[Requester|Service]Filter
(#2100)HttpReporter
(https://github.com/apple/servicetalk/pull/2092)io.servicetalk.opentracing.zipkin.publisher.reporter.HttpReporter
used to report non-batched single span using an unspecified API. From the current release, even non-batched span is published using the endpoint accepting an array of spans with one item (refer to https://zipkin.io/zipkin-api/#/default/post_spans for HTTP API specification).TimeoutFromRequest
introduced in #1832 (#2094)ExecutorExtension
to static (#2088)RetryingHttpRequesterFilter
example (#2095)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by idelpivnitskiy over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements. It contains all changes released in 0.41.14 plus the following:
Publisher#multicast
option to not cancel upstream (#2065)setClassLevel()
for ExecutorExtension
(#2075)setClassLevel(true)
on static instances (#2068)requiredOffloads
use influenceStrategy
(#2058)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by idelpivnitskiy over 2 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
Expect: 100-continue
(#2037) (#2079)
IoExecutor
implements concurrent.Executor
(#2066)awaitSubscribed()
to test async sources (#1661)MultiAddressUrlHttpClientBuilder
(#2071)MultiAddressUrlHttpClient
should redirect POST/PUT/PATCH/DELETE
by default (#2077)IoExecutor
(#2070)NettyIoThread
should implement ContextMapHolder
(#2083)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by idelpivnitskiy almost 3 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements. It contains all changes released in 0.41.13 plus the following:
HttpSerializers
client set Accept
header (#2023)https
(#2034)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by idelpivnitskiy almost 3 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements. It contains important bug fixes for retry logic configuration, upgrades netty to 4.1.73 which relaxes duplicated native library detection, protobuf to 3.19.2 which fixes a potential Denial of Service issue, log4j to 2.17.1 which fixes CVE-2021-44832.
HttpExceptionMapperServiceFilter
and GrpcExceptionMapperServiceFilter
can be used at any position in the filter chain to map Throwable
(s) into a properly formatted HTTP/gRPC response.HttpLifecycleObserverServiceFilter
public (#2051)
[Http|Grpc]ServerBuilder#lifecycleObserver(...)
method that captures entire state of the server processing chain, new HttpLifecycleObserverServiceFilter
allows users to place lifecycle observer at any other position in the filter chain or apply conditionally.Developer note: Additional API deprecation advisories and guidance have been added in each of the 0.41.X releases. Please build your application with the latest 0.41.X release and carefully review the deprecation warnings reported and associated suggestions. Changes to applications may be required for compatibility with future versions of ServiceTalk beyond the API compatible 0.41.X series. While there are many deprecations for planned future API changes, most applications should require few changes as the most significant changes are to internal or specialized APIs. If you have concerns or expect problems related to any of the API deprecations please report these as an issue.
subscribeShareContext()
to shareContextOnSubscribe()
(#1975)
subscribeShareContext()
operator in Single
, Completable
, and Publisher
, introduce shareContextOnSubscribe()
as a replacement to clarify that this operator does not actually subscribes to the async source.AutoRetryStrategyProvider
and RetryingHttpRequesterFilter
together (#2042)RoundRobinLoadBalancer
: make targetResource
logging less confusing (#2044)GrpcRouter
and other transport classes (#2055)https
(#2034)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by bondolo almost 3 years ago
This is a major ServiceTalk feature release appropriate for all users containing numerous new features and many improvements. We are actively working towards ServiceTalk 1.0 and this intermediate release helps us to refine and stabilize the API. Existing ServiceTalk applications will need to be recompiled to use the 0.42 release and will likely require some code changes or migration to the new API. Also, make sure all other libraries or extensions that depends on the ServiceTalk API in your classpath are also recompiled with 0.42.
The 0.42.0 release includes significant new features and API changes but incorporates as closely as possible the same dependencies and bug fixes as the prior 0.41.12 release.
In addition to the API changes, ServiceTalk 0.42 includes some significant behavioral differences that may impact existing applications. Offloading, the execution of user code on non-I/O threads, is one area that has changed significantly. In ServiceTalk 0.41 and earlier the strategy used for offloading was applied more generally than in 0.42. This meant that most user code, even code which did not expect to be offloaded, was offloaded from I/O threads. This approach had the advantages of consistency and safety; the execution environment for user code was predictable and the Netty I/O threads were protected from being unavailable while executing application code.
In ServiceTalk 0.42 the offloading strategy is more focused and offloading is done in fewer situations, primarily only those situations which explicitly require offloading. Offloading is an expensive activity. If the application or ServiceTalk logic which needs to be executed is insignificant or carefully bounded and never blocks then avoiding offloading has a positive impact on both latency and throughput. Offloading is controlled by the use of the publishOn
and subscribeOn
offloading operators and for filters and services by implementing the StrategyInfluencer
interface.
In prior versions of ServiceTalk all operators could access the most recently referenced Executor
in the operator pipeline. In 0.42 the intended executor for executing the operations pipeline is only exposed to offloading operators. Other operators are effectively “immediate” meaning that they expect to run on whatever thread is active when they are invoked, the timeout
and liftAsync
operators are affected.
RetryingHttpRequesterFilter & Auto-Retrying filters/API were unified in a new RetryingHttpRequesterFilter
now available under io.servicetalk.http.netty
package. The new filter offers support for handling lower level transport errors and retrying them (ie. what Auto-Retry was offering before) as well as allowing users to define their own retry rules per request/response basis.
RetryingHttpRequesterFilter
offers fine grain control over retry behavior, here are some highlights:
retryRetryableExceptions
RetryableException
which are transport layer errors that occur inside ST and signal erroneous behavior before a request touches the “wire”. By default this is enabled and behaves the same way Auto-Retry was before.retryIdempotentRequests
retryDelayedRetries
DelayedRetry
a marker interface that holds additional backoff time info, to be evaluated when the total back-off time is computed. One possible situation that this can be useful is if users want to translate a Retry-After
header in a response, and allow the retry-filter to wait for that amount of time (ie. retry-after period) before retrying.responseMapper
& retryResponses
HttpResponseException
giving the ability to users to retry particular responses according to their own criteria. First you map the response to an error with responseMapper
then you define the retry behavior through retryResponses
.All above flavors offer fine control over the retry behavior of each retry criterion, e.g retry up-to 5 times retryable exceptions, and up-to 2 times delayed retries with max-delay of 2 seconds. On top of that, users can define a max-total
retry count, that can be used to exit the retry logic if the cumulative amount of retries (of all retry configurations) reaches that count.
The RetryingHttpRequesterFilter
is by default enabled and added as the last filter in the filter chain, similarly to how auto-retry behaved before, only retrying RetryableException
s, however if users define their own version of that and apply it in a particular placement in their filter chain, then this order/configuration takes precedence over the default behavior.
This work was ignited as an effort to minimize the places users have to define retry logic, and avoid situations where these placements conflict with each other resulting in retry logic that wasn’t expected.
Interfaces from the io.servicetalk.serialization.api package have been deprecated (SerializationProvider
, ..). The deprecated interfaces have been replaced with new interfaces in io.servicetalk.serializer.api. The new APIs apply lessons learned from usage of deprecated APIs and here are some highlights:
Checkout the http serialization examples to see the new APIs in action. Javadocs on each deprecated type include @deprecated
notices referencing the replacement classes, and here is a summary of commonly used types:
HttpInitializer
API (see #1867 and #1861). Resolving all deprecations highlighted building for 0.41.12 will make this transition smooth when upgrading to 0.42.HttpServerBuilder.disableDrainingRequestPayloadBody()
, have been changed to take a boolean
argument to allow users enable/disable a feature it controls. Migrate from all deprecated builder methods in 0.41.12 or see #1750, #1823, and #1825 for the full list of methods.listen*
methods return a protocol-specific context now: Single<HttpServerContext>
for HTTP and Single<GrpcServerContext>
for gRPC. Previously, these methods returned Single<ServerContext>
.MultiAddressHttpClientBuilder & PartitionedHttpClientBuilder
SingleAddressInitializer
abstraction to give access to the underlying SingleAddressHttpClientBuilder
(s)MultiAddressHttpClientBuilder
maxRedirects(int)
→ followRedirects(RedirectConfig)
followRedirects(RedirectConfig)
to enable themHttpExecutionStrategy
from the arguments, see #1956.Users should update their filters to override one or more of the request
or reserveConnection
methods that does not take HttpExecutionStrategy
as an argument. If modifications for the HttpExecutionStrategy
are required, use HttpContextKeys#HTTP_EXECUTION_STRATEGY_KEY
. See changes for HostHeaderHttpRequesterFilter as an example of how to migrate a filter. After this migration is done with 0.41.12 version, 0.42 won’t cause any issues.
Note: All StreamingHttpClientFilter
implementations should use delegate.request(...)
instead of invoking super.request(delegate, ...)
. Invoking a super class implementation may lead to unexpected behavior change with new releases.
append
method have been removed from all filter factories: ConnectionFactoryFilter
, GrpcServiceFilterFactory
, MultiAddressHttpClientFilterFactory
, StreamingHttpClientFilterFactory
, StreamingHttpConnectionFilterFactory
, StreamingHttpServiceFilterFactory
because the resulting factories did not allow correct computation of the combined execution strategy. Consider using appropriate append*
methods on the client/server builder intead.MultiAddressHttpClientFilterFactory
have been removed, migrate to MultiAddressHttpClientBuilder#SingleAddressInitializer
and use SingleAddressHttpClientBuilder#appendClientFilter(...)
.GrpcClientBuilder#MultiClientBuilder
and GrpcClientBuilder#buildMulti
have been removed, use GrpcClientFactory#newClient(GrpcClientCallFactory)
if necessary.A new ServiceDiscovererEvent.Status
type was introduced to let SD use a non-binary state of the address. ServiceDiscovererEvent#isAvailable()
is replaced with ServiceDiscovererEvent#status()
.
DefaultDnsServiceDiscoverer
is using ServiceDiscovererEvent.Status.EXPIRED
by default.
ServiceDiscoveryRetryStrategy
and DefaultServiceDiscoveryRetryStrategy
have been deprecated in 0.41.12 and removed in 0.42 in favor of a standard BiIntFunction<Throwable, ? extends Completable>
API of RetryStrategies
.
LoadBalancerFactory#newLoadBalancer
:
String
argument was added that describes a target resource for connections. It helps with debuggability.eventStream
publisher was changed from Publisher<? extends ServiceDiscovererEvent>
to Publisher<? extends Collection<? extends ServiceDiscovererEvent>>
to align it with ServiceDiscoverer
API.RoundRobinLoadBalancer.RoundRobinLoadBalancerFactory
become a top level class with the builder.
RoundRobinLoadBalancer
changed its visibility from public
to pkg-private, RoundRobinLoadBalancerFactory
should be used instead.
RoundRobinLoadBalancer.RoundRobinLoadBalancerFactory.Builder#eagerConnectionShutdown(boolean)
was removed because ServiceDiscovererEvent.Status
can provide all necessary information. The same behavior can be achieved by configuring DefaultDnsServiceDiscovererBuilder#missingRecordStatus(ServiceDiscovererEvent.Status.UNAVAILABE)
.
If you have a custom implementation of the LoadBalancer
interface, consider supporting all new statuses from the ServiceDiscoverer
: AVAILABLE
, UNAVAILABLE
, EXPIRED
.
TrailersTransformer<Object, Payload>
to TrailersTransformer<Void, Payload>
.BlockingStreamingHttpServerResponse
was converted from an abstract class
to an interface
.HttpClients.*viaProxy(...)
methods have been removed in favor of SingleAddressHttpClientBuilder#proxyAddress(...)
configuration option after using a regular HttpClients.forSingleAddress(...)
factory.Removed exception types that were public but never thrown by ServiceTalk (see #1920):
ConnectionClosedException
InvalidRedirectException
MaxRequestLimitExceededException
MaxRequestLimitExceededRejectedSubscribeException
Some exception types were changed to use more appropriate parent type:
ConnectionRejectedException
extends RuntimeException
→ SocketException
;NoAvailableHostException
extends RuntimeException
→ IOException
;DuplicateAttributeException
extends RuntimeException
→ IllegalStateException
;TerminateRepeatException
extends Exception
→ RuntimeException
;ClosedServiceDiscovererException
extends RuntimeException
→ ClosedChannelException
;Some existing callbacks were improved to take extra arguments that help to increase visibility:
TransportObserver#onNewConnection()
→ TransportObserver#onNewConnection(Object, Object)
- tells which local/remote address is used for a new connection. Previously, it was impossible to know what was the remote peer if a connect attempt fails.ReadObserver#itemRead()
→ ReadObserver#itemRead(Object)
- tells which object have been read from the network.WriteObserver#itemReceived()
→ WriteObserver#itemReceived(Object)
- tells which object have been received for a write operation.WriteObserver#itemWritten()
→ WriteObserver#itemWritten(Object)
- tells which object have been serialized and written to the OS network buffer.New callbacks that have to be implemented:
WriteObserver#itemFlushed()
- notifies when a previously written object have been flushed to the network.StreamObserver#streamIdAssigned(long)
- notifies when a steam of a multiplexed connection (HTTP/2) gets an assigned id number.ConnectionObserver#onTransportHandshakeComplete()
- notifies when a transport protocol completes a handshake (like TCP 3-way handshake).Due to a bug in our B3 header handling, we weren’t able to handle all possible sampling states as defined by the specification. More specifically the lack of presence of x-b3-sampled
, was being mishandled as if the carrier was suggesting no-sampling.
The behavior was address by changing the API to support Boolean
type sampling flag, restoring the possibility of 3-state option.
InMemorySpanContext#isSampled
boolean → BooleanAdditional API changes:
InMemoryTraceState
, SpanContext
was enhanced to bridge API gap.Span
level, instead the SpanContext
houses them now.NettyIoExecutors#createIoExecutor(ThreadFactory)
now requires io.servicetalk.transport.api.IoThreadFactory
.GrpcClient
or GrpcService
should provide the same level of control.ServiceTalk 0.42 contains significant API and behavior updates as well as new API deprecations. Most applications will require some changes to use the 0.42 release. For applications developed using ServiceTalk 0.41 or earlier the best approach for updating an application to use the 0.42 release is to begin by updating the application to use the latest 0.41 release, currently 0.41.12. Once all deprecation warning have been resolved and tests are passing, only then begin upgrading to the 0.42 release.
Applications built with much older ServiceTalk releases should upgrade incrementally through the latest release of each minor version until arriving at ServiceTalk 0.42. Fully rebuilding applications with each intermediate ServiceTalk version will provide the most complete deprecation and upgrading advice. Fully rebuilding applications with each intermediate ServiceTalk release will provide the most complete deprecation and upgrading advice and ensure that generated gRPC code is remains compatible with the application usage.
Application developers should also pay careful attention to the API deprecations found in 0.42. Future 0.42.X releases, when they occur, will be compatible with this 0.42.0 release, but 0.43 and beyond versions of ServiceTalk will remove the currently deprecated APIs. Fortunately, it is currently expected that the ServiceTalk API will be more stable in future releases through the eventual ServiceTalk 1.0 release. Thank you for your understanding and cooperation on the way to 1.0!
MethodDescriptor
Collection to services (#1764)TimeSource
in Executor
(#1972)HttpServerContext
and GrpcServerContext
(#1990)ExecutionStrategyInfluencer
(#1832)ConnectionAcceptor
ConnectionFactory
offloading control (#1921)Format<TextMap>
support (#1758)Publisher#multicast
operator, fix Publisher#groupBy backpressure (#1472)Completable#concat(Completable...)
(#1941)publishOn
& subscribeOn
operators (#1689)MalformedURLException
instead of IllegalArgumentException
(#1955)DefaultCompositeCloseable
StackOverflowException (#1942)grpc-encoding: identity
(#1745)ZipkinPublisher
remove unnecessary data (#1767)BlockingStreamingHttpServerResponse
to an interface (#1986)StatelessTrailersTransformer
: Object → Void state (#1985)publishOn/subscribeOn
take io.servicetalk.concurrent.Executor
(#1983)subscribeShareContext
to shareContextOnSubscribe
(#1975)GrpcClientBuilder
to interface (#1908)GrpcServerBuilder
to interface (#1903)AsyncContext
methods (#1839) (#1898)GrpcClientBuilder
from SingleAddressHttpClientBuilder
(#1867)HttpServerBuilder
to an interface (#1820)HttpClientBuilder
s to interfaces (#1819)HttpHeaders
formatter to allow custom containers (#1703)NettyIoExecutors
executors support IoThread
TransportObserver
after #2012 (#2015)Read/WriteObserver
after #2013 (#2014)HttpHeadersFactories
(#2002)HttpClients
factories for proxy (#1980)AbstractRetryingFilterBuilder
build methods (#1981)ConnectionObserver
(#1982)subscribeShareContext
method (#1984)LoadBalancer
APIs (#1976)ServiceDiscovererEvent
methods (#1962)HttpMetaData
(#1961)AsyncContext
API (#1959)ServiceDiscoveryRetryStrategy
(#1949)HttpClientBuilder
(#1866)GrpcClientBuilder#MultiClientBuilder
(#1809)payloadBody(CloseableIterable<Buffer>)
methods (#1802)ExecutionStrategy
offload*
methods (#1794)PartitionedHttpClientBuilder
(#1731)MultiAddressHttpClientBuilder
API cleanup (#1721)publishAndSubscribeOn
(#1649)recoverWith
operators that were deprecated in #1435 (#1635)Verifiers
factory that was deprecated in #1392 (#1633)CharSequences
methods (#1634)append
methods that were deprecated in #1578 (#1631)backlog(int)
server builder option that was deprecated in #1375 (#1636)disableHostnameVerification()
that was deprecated in #1561 (#1637)allowPrematureClosureBeforePayloadBody()
that was deprecated in #1475 (#1638)idleTimeout()
methods (#1602)enableWireLogging
and enableFrameLogging
overloads (#1420)[Http|Grpc]LifecycleObserver
examples (#1857)TypeHolder
(#1782)HttpServerBuilder#append*
methods (#1729)publishOn
and subscribeOn
javadoc clarification (#1713)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
@bondolo
@cancecen
@chemicL
@danfaer
@idelpivnitskiy
@Krupskis
@madrob
@mikhail-shibanov
@rnett
@Scottmitch
@sikevux
@sullis
@tkountis
@vglushak
Published by bondolo almost 3 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
-Dio.servicetalk.transport.netty.tryIoUring=true
to activate this feature.-Dio.servicetalk.transport.netty.requireNativeLibs=true
to fail ServiceTalk to start without native transport (epoll/kqueue). Without this system property, netty will fallback to Java NIO. However, Java NIO has limitations which may cause unexpected behavior and increased number of failed requests. For example, it does not proactively notify when a remote peer closes connections. As the result, a new request have to be attempted to observe that connection was closed leading to a request error.ServiceDiscovererEvent
contract (#1906)
ServiceDiscovererEvent
now has status()
method instead of isAvailable()
boolean flag;Completable#concat(Completable...)
(#1945)AsyncContext
, each HTTP request and response has a context()
method that holds a state during request-response exchange. It's more lightweight and always is associated with a request or response, regardless of asynchronous boundaries or transitioning from async to blocking API.Developer note: Additional API deprecation advisories and guidance have been added in each of the 0.41.X releases. Please build your application with the latest 0.41.X release and carefully review the deprecation warnings reported and associated suggestions. Changes to applications may be required for compatibility with future versions of ServiceTalk beyond the API compatible 0.41.X series. While there are many deprecations for planned future API changes, most applications should require few changes as the most significant changes are to internal or specialized APIs. If you have concerns or expect problems related to any of the API deprecations please report these as an issue.
HttpExecutionStrategy
from requester and reserveConnection API (#1956)
request
or reserveConnection
methods that do not take HttpExecutionStrategy
as an argument. If modifications for the HttpExecutionStrategy
are required, use HttpContextKeys#HTTP_EXECUTION_STRATEGY_KEY
;ServiceDiscoveryRetryStrategy
(#1931)
ServiceDiscoveryRetryStrategy
and DefaultServiceDiscoveryRetryStrategy
;PartitionedHttpClientBuilder#retryServiceDiscoveryErrors(ServiceDiscoveryRetryStrategy)
and introduced a variant accepting BiIntFunction<Throwable, ? extends Completable>
;SingleAddressHttpClientBuilder#retryServiceDiscoveryErrors(ServiceDiscoveryRetryStrategy)
and introduced a variant accepting BiIntFunction<Throwable, ? extends Completable>
.noOffloadsStrategy()
(#1989)
noOffloadsStrategy()
is deprecated and the more descriptive offloadNever()
is introduced to replace it.RetryingHttpRequesterFilter
was introduced in io.servicetalk.http.netty
package;io.servicetalk.http.utils.RetryingHttpRequesterFilter
and AutoRetryStrategyProvider
are deprecated and their logic in consolidated in io.servicetalk.http.netty.RetryingHttpRequesterFilter
;AsyncContext
to ContextMap
API (#1910)
AsyncContextMap
in favor of ContextMap
API;AsyncContextMapHolder
in favor of ContextMapHolder
;AsyncContext
: deprecate all methods that reference AsyncContextMap
and add new static methods that target ContextMap
API;AsyncContext.newKeyMapping
to allow mapping AsyncContextMap.Key
<-> ContextMap.Key
to let users use old/new API in the same codebase;IoThreadFactory.IoThread
extends deprecated AsyncContextMapHolder
, consider migrating to NettyIoExecutors
static factories that do not require an IoThreadFactory
. If your codebase implements IoThreadFactory
, make sure it also implements ContextMapHolder
;BasicAuthHttpServiceFilter
: deprecate userInfoKey(AsyncContextMap.Key)
in favor of userInfoAsyncContextKey(ContextMap.Key)
and userInfoRequestContextKey(ContextMap.Key)
;BasicAuthSecurityContextFilters
: deprecate forGlobalBinding(AsyncContextMap.Key)
in favor of forGlobalBinding(ContextMap.Key)
and forNameBinding(AsyncContextMap.Key)
in favor of forNameBinding(ContextMap.Key)
;AsyncContext.put(...)
and AsyncContext.putAll(...)
don't throw UnsupportedOperationException
when AsyncContext
is disabled;AsyncContext
more strictly validates null
keys. null
keys were never allowed, but pre-existing behavior throws NPE on AsyncContext.get(key)
instead of AsyncContext.put(null, value)
;Read/WriteObserver
: give users visibility into items (#2013)TransportObserver#onNewConnection
give visibility into addresses (#2012)MessageEncodingException
should take an encoding name only (#1940)toString()
for our ThreadFactory
variants (#1939)SSLSession
cache misses (#1958) (#1966)DefaultCompositeCloseable
StackOverflowException (#1946)HttpLoadBalancerFactory
should override newLoadBalancer
with 3 args (#1935)ServiceDiscovererEvent
contract related to address and status (#1963)This release upgrades Netty to 4.1.72 which contains an important fix for CVE-2021-43797 and Log4J to 2.16.0 which contains fixes for CVE-2021-44228 and CVE-2021-45046.
Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
@bondolo
@chemicL
@idelpivnitskiy
@Scottmitch
@tkountis
Published by idelpivnitskiy almost 3 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
RoundRobinLoadBalancer
: use an Executor
with unbounded queue by default for health checks (#1937)RoundRobinLoadBalancer
: reduce number of operators in health check chain (#1938)RoundRobinLoadBalancerFactory
flip eagerConnectionShutdown
to false
by default (#1934)SingleThreadedScheduler
should fallback execution upon offloading failure and give visibility for unexpected exceptions from offloadExecutor
(#1936)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by chemicL almost 3 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
Developer note: Additional API deprecation advisories and guidance have been added in each of the 0.41.X releases. Please build your application with the latest 0.41.X release and carefully review the deprecation warnings reported and associated suggestions. Changes to applications may be required for compatibility with future versions of ServiceTalk beyond the API compatible 0.41.X series. While there are many deprecations for planned future API changes, most applications should require few changes as the most significant changes are to internal or specialized APIs. If you have concerns or expect problems related to any of the API deprecations please report these as an issue.
EmptyBuffer
implementation (#1929)grpc
and http
modules from BOM (#1930)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by tkountis almost 3 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
Developer note: Additional API deprecation advisories and guidance have been added in each of the 0.41.X releases. Please build your application with the latest 0.41.X release and carefully review the deprecation warnings reported and associated suggestions. Changes to applications may be required for compatibility with future versions of ServiceTalk beyond the API compatible 0.41.X series. While there are many deprecations for planned future API changes, most applications should require few changes as the most significant changes are to internal or specialized APIs. If you have concerns or expect problems related to any of the API deprecations please report these as an issue.
FilterableGrpcClient
(#1902)ExecutionContext
related methods in GrpcServerBuilder
(#1888)serialVersionUID
for exceptions (#1919)GrpcStatus.fromCodeValue
static factories to include actual status code when it maps to UNKNOWN
(#1923)japicmp.sh
to be less strict on finding artifacts (#1886)CONTRIBUTING.adoc
and README.adoc
(#1914)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by idelpivnitskiy about 3 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
Developer note: Additional API deprecation advisories and guidance have been added in each of the 0.41.X releases. Please build your application with the latest 0.41.X release and carefully review the deprecation warnings reported and associated suggestions. Changes to applications may be required for compatibility with future versions of ServiceTalk beyond the API compatible 0.41.X series. While there are many deprecations for planned future API changes, most applications should require few changes as the most significant changes are to internal or specialized APIs. If you have concerns or expect problems related to any of the API deprecations please report these as an issue.
GrpcClientBuilder
from SingleAddressHttpClientBuilder
(#1867) (#1882)
GrpcClientBuilder.HttpInitializer
interface and a corresponding GrpcClientBuilder#initializeHttp
method which accepts the initializer for the underlying SingleAddressHttpClientBuilder
;GrpcClientBuilder
methods which have only served the purpose of delegating to the underlying HTTP client builder;GrpcServerBuilder
from HttpServerBuilder
(#1861)
GrpcServerBuilder.HttpInitializer
interface and a corresponding GrpcServerBuilder#initializeHttp
method which accepts the initializer for the underlying HttpServerBuilder
;GrpcServerBuilder
methods which have only served the purpose of delegating to the underlying HTTP server builder;HttpExecutionStrategyInfluencer
(#1884)DefaultGrpc*SecurityConfigurator
classes (#1885)@FunctionalInterface
for GrpcClientBuilder.HttpInitializer
enforcedPlatform
from test fixtures (#1881)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.
Published by idelpivnitskiy about 3 years ago
This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.
LoadBalancer
instance using a targetResource(String)
(#1831)MultiAddressHttpClientBuilder
and for clients using already resolved address (#1751)Developer note: Additional API deprecation advisories and guidance has been added in each of the 0.41.X releases. Please build your application with the latest 0.41.X release and carefully review the deprecation warnings reported and associated suggestions. Changes to applications may be required for compatibility with future versions of ServiceTalk beyond the API compatible 0.41.X series. While there are many deprecations for planned future API changes, most applications should require few changes as the most significant changes are to internal or specialized APIs. If you have concerns or expect problems related to any of the API deprecations please report these as an issue.
LoadBalancerFactory#newLoadBalancer(Publisher, ConnectionFactory)
in favor of a new method: LoadBalancerFactory#newLoadBalancer(String, Publisher, ConnectionFactory)
;Publisher<ServiceDiscovererEvent>
to Publisher<Collection<ServiceDiscovererEvent>>
to be aligned with ServiceDiscoverer
API;MultiAddressHttpClientBuilder
and for clients using already resolved address (#1751):
HttpClients.*viaProxy(...)
methods in favor of SingleAddressHttpClientBuilder#proxyAddress(...)
method that allows configuring proxy at the builder;RedirectingHttpRequesterFilter
: redirect headers and message body (#1792)
RedirectingHttpRequesterFilter
in favor of a new RedirectingHttpRequesterFilter(RedirectConfig)
;MultiAddressHttpClientBuilder#maxRedirects(int)
in favor of a new MultiAddressHttpClientBuilder#followRedirects(RedirectConfig)
;SpliceFlatStreamToMetaSingle
(#1845)RoundRobinLoadBalancer
: recover health checks from unexpected errors (#1871)ServiceDiscoverer
and LoadBalancerFactory
APIs (#1852)RedirectingHttpRequesterFilter
: redirect headers and message body (#1792)RoundRobinLoadBalancer
: trace log when a connection added/removed (#1869)RoundRobinLoadBalancer
: further logging enhancements (#1870)NettyHttpServerTest.testErrorBeforeRead
handle exception (#1848)GrpcLifecycleObserverTest
: close client and server after each test (#1863)CI
env variable is set for CodeQL workflow (#1858)japicmp.sh
: skip jdkflow on JDK8 and adjust error msg format (#1864)[Http|Grpc]LifecycleObserver
examples (#1857)Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report an unintended omission.