Skip to content

Releases: apple/servicetalk

0.42.3

23 Feb 21:55
Compare
Choose a tag to compare

Changes

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:

New features

  • bacb5ab - Add Single.repeatWhen(BiIntFunction<T, Completable>) (#2090)
  • 6471bdf - Add PayloadSizeLimitingHttp[Requester|Service]Filter (#2100)

Bug fixes

Improvements

  • c730c0d - Always encode spans as list in HttpReporter (#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).
  • 2376910 - Increase log level when global resources are closed (#2105)
  • 24c34c3 - Revert breaking changes for TimeoutFromRequest introduced in #1832 (#2094)

Improvements for tests

  • a3fe3fa - Changing instances of ExecutorExtension to static (#2088)

Documentation

  • bf48490 - Update docs references to 0.41.14 and 0.42.2
  • 6848b09 - Update Jersey Router documentation (#2059)
  • 3720865 - Fix jackson-jersey references to deprecated classes (#2063)
  • 4aa5287 - Add client RetryingHttpRequesterFilter example (#2095)
  • cfb5949 - Fix broken JAX-RS javadoc links (#2072)

Dependencies


Thank you

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.

0.42.2

10 Feb 16:30
88ad116
Compare
Choose a tag to compare

Changes

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:

New features

  • d31c0dc - Publisher#multicast option to not cancel upstream (#2065)
  • 5fe4903 - Implement setClassLevel() for ExecutorExtension (#2075)

Bug fixes

  • e3b3c3c - Fix jersey-jackson not considering deprecated JacksonSerializationProvider #2060 (#2064)

Improvements

  • dd99c4f - Use setClassLevel(true) on static instances (#2068)
  • 886cbcd - Default requiredOffloads use influenceStrategy (#2058)

Documentation

  • 6848b09 - Update Jersey Router documentation (#2059)
  • 3720865 - Fix jackson-jersey references to deprecated classes (#2063)

Thank you

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.

0.41.14

10 Feb 16:24
1276ad0
Compare
Choose a tag to compare

Changes

This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.

New features

Bug fixes

  • 9251d06 - Fix filters for MultiAddressUrlHttpClientBuilder (#2071)
  • 1f972d1 - MultiAddressUrlHttpClient should redirect POST/PUT/PATCH/DELETE by default (#2077)

Improvements

  • 580a5a2 - Schedule/execute no offload timeouts on IoExecutor (#2070)
  • a556d22 - Update grpc example pom.xml (#2057)
  • e33e1f4 - NettyIoThread should implement ContextMapHolder (#2083)

Documentation

Dependencies

  • d86ab9a - Update Netty 4.1.73.Final -> 4.1.74.Final (#2080)
  • 6fe9356 - Update netty-incubator-transport-native-io_uring 0.0.11 -> 0.0.12 (#2082)
  • 9c84575 - Update slf4j 1.7.32 -> 1.7.36 (#2081)

Thank you

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.

0.42.1

13 Jan 21:26
5484e9e
Compare
Choose a tag to compare

Changes

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:

New features

  • 1b407d4 - HttpSerializers client set Accept header (#2023)

Improvements

  • 30550d5 - Fix H2 Flush Strategy Aggregated API Optimization (#2033)

Documentation

Dependencies


Thank you

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.

0.41.13

13 Jan 18:58
020b425
Compare
Choose a tag to compare

Changes

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.

New features

  • 6df6952 - Make exception mapper filters public (#2050)
    • HttpExceptionMapperServiceFilter and GrpcExceptionMapperServiceFilter can be used at any position in the filter chain to map Throwable(s) into a properly formatted HTTP/gRPC response.
  • 83d4b93 - Make HttpLifecycleObserverServiceFilter public (#2051)
    • In addition to [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.

API deprecation

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.

  • 593d620 - Rename subscribeShareContext() to shareContextOnSubscribe() (#1975)
    • Deprecated 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.

Bug fixes

  • c69078f - Prevent retry logic modifications through the builder (#2031)
  • eb72c09 - Allow using pre-existing AutoRetryStrategyProvider and RetryingHttpRequesterFilter together (#2042)
  • 6e3667f - Fix infinite retries under particular conditions (#2041) (#2049)

Improvements

  • c444966 - RoundRobinLoadBalancer: make targetResource logging less confusing (#2044)
  • 22ae4cb - Add more logging for GrpcRouter and other transport classes (#2055)

Documentation

Dependencies


Thank you

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.

0.42.0

20 Dec 23:21
Compare
Choose a tag to compare

Overview

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.

Changes

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.

Offloading Changes

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.

Executors and other operators

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.

Retrying / Auto-Retrying filters

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
    Supports retry behavior for 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
    Supports retry behavior for requests that are marked as idempotent when an I/O exception occurs.
  • retryDelayedRetries
    Supports retry behavior for errors that are type of 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
    Supports mapping any response to an 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 RetryableExceptions, 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.

Serialization

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:

  • Composition between scalar serializers in streaming use cases. Streaming serializers provide reusable framing (Length Delimited VarInt/Fixed, gRPC) across different serialization technologies (Protobuf, thrift, ..).
  • Encapsulation of serialization allows exposing streaming building blocks while hiding custom framing (gRPC SerializerDescriptor).
  • Streaming APIs leverage Reactive Streams lifecycle and primitives instead of custom APIs and lifecycle.
  • Support for JDK primitive types such as byte[] and String. See how these utilities are composed/leveraged in HttpSerializers.

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:

Builders

General

  • All builders (client & server, HTTP & gRPC) have been changed from abstract classes to interfaces to allows users wrap them to enhance/modify behavior. Method names didn’t change. HTTP users should not notice this change as soon as they recompile with 0.42, gRPC users may need to migrate their HTTP-specific configuration to 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.
  • All one-way builder methods, like HttpServerBuilder.disableDrainingRequestPayloadBody(), have been changed to take a boolean argument to allow ...
Read more

0.41.12

15 Dec 01:26
Compare
Choose a tag to compare

Changes

This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.

New features

  • cc61daa - Add support for io_uring (#1971)
    • io_uring is a new asynchronous I/O API for Linux that provides significant performance improvements for I/O operations. The minimal Linux kernel requirement is 5.10. Users need to set -Dio.servicetalk.transport.netty.tryIoUring=true to activate this feature.
  • 13dce91 - Let users opt-in for app initialization failures without native libs (#2006)
    • Use -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.
  • ad81b3f - Adjusting ServiceDiscovererEvent contract (#1906)
    • ServiceDiscovererEvent now has status() method instead of isAvailable() boolean flag;
  • 93a98af - Completable#concat(Completable...) (#1945)
  • cfe7007 - Add context associated with an HTTP request or response (#1904)
    • As an alternative to 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.

API deprecation

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.

  • 3c2d0e2 - Remove HttpExecutionStrategy from requester and reserveConnection API (#1956)
    • Users should update their filters to override another 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;
  • ebe2911 - Deprecate ServiceDiscoveryRetryStrategy (#1931)
    • Deprecated ServiceDiscoveryRetryStrategy and DefaultServiceDiscoveryRetryStrategy;
    • Deprecated PartitionedHttpClientBuilder#retryServiceDiscoveryErrors(ServiceDiscoveryRetryStrategy) and introduced a variant accepting BiIntFunction<Throwable, ? extends Completable>;
    • Deprecated SingleAddressHttpClientBuilder#retryServiceDiscoveryErrors(ServiceDiscoveryRetryStrategy) and introduced a variant accepting BiIntFunction<Throwable, ? extends Completable>.
  • 9c66e41 - Deprecate and replace noOffloadsStrategy() (#1989)
    • noOffloadsStrategy() is deprecated and the more descriptive offloadNever() is introduced to replace it.
  • 0d70851 - Unified retry / auto-retry filter support (#2020)
    • A new variant of 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;
  • 34f726e - Migrate AsyncContext to ContextMap API (#1910)
    • API modifications:
      • Deprecate AsyncContextMap in favor of ContextMap API;
      • Deprecate AsyncContextMapHolder in favor of ContextMapHolder;
      • AsyncContext: deprecate all methods that reference AsyncContextMap and add new static methods that target ContextMap API;
      • Add temporarily method 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);
    • Behavior changes:
      • AsyncContext.put(...) and AsyncContext.putAll(...) don't throw UnsupportedOperationException when AsyncContext is disabled;
      • Default implementation of 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);

Improvements

  • 1fecc6b - Read/WriteObserver: give users visibility into items (#2013)
  • c0c2c83 - TransportObserver#onNewConnection give visibility into addresses (#2012)
  • e7a287b - Provide more context when native transport is unavailable (#1978)
  • 1d3ba69 - Give visibility to the assigned HTTP/2 Stream ID (#1969)
  • 81c81c9 - MessageEncodingException should take an encoding name only (#1940)
  • 3358e01 - Implement toString() for our ThreadFactory variants (#1939)
  • cc4d56f - Correctly report TLS handshake when TCP Fast Open is enabled (#1970)

Bug Fixes

  • 582259a - Reduce SSLSession cache misses (#1958) (#1966)
  • 80435d7 - DefaultCompositeCloseable StackOverflowException (#1946)
  • c08a411 - HttpLoadBalancerFactory should override newLoadBalancer with 3 args (#1935)

Documentation

  • 5055942 - Improve BlockingIterable javadoc (#2010)
  • f07e708 - Clarify ServiceDiscovererEvent contract related to address and status (#1963)

Dependencies

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.


Thank you

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
@idelpivnit...

Read more

0.41.11

04 Nov 22:58
cdd7e6e
Compare
Choose a tag to compare

Changes

This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.

Bug fixes

  • 378a61c - RoundRobinLoadBalancer: use an Executor with unbounded queue by default for health checks (#1937)

Improvements

  • f09799b - RoundRobinLoadBalancer: reduce number of operators in health check chain (#1938)
  • 95c6bdd - RoundRobinLoadBalancerFactory flip eagerConnectionShutdown to false by default (#1934)
  • 934b7ba - SingleThreadedScheduler should fallback execution upon offloading failure and give visibility for unexpected exceptions from offloadExecutor (#1936)

Thank you

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.

0.41.10

03 Nov 14:15
Compare
Choose a tag to compare

Changes

This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.

API deprecation

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.

Bug fixes

  • b6af2b6 - Fixes for EmptyBuffer implementation (#1929)
  • 70ce4bb - Make static final buffers unreleasable and read-only (#1928)

Improvements

Build/Release/Github actions

  • c6ae8c3 - Bump actions/checkout from 2.3.5 to 2.4.0 (#1932)

Dependency upgrades


Thank you

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.

0.41.9

01 Nov 23:00
Compare
Choose a tag to compare

Changes

This is a minor maintenance release appropriate for all ServiceTalk users that contains several bug fixes and improvements.

API deprecation

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.

Bug fixes

  • 9c79e91 - Add Netty BOM as platform for test fixtures (#1916)

Improvements

  • 48a9851 - Use connection/context executor for timeout (#1911)
  • 43d64fd - Improve POM/BOM publication metadata (#1917)
  • e300d27 - Enhance javadoc to clarify StackOverflowError possibility (#1925)
  • ff7bf79 - Add missed serialVersionUID for exceptions (#1919)
  • 5106670 - Enhance GrpcStatus.fromCodeValue static factories to include actual status code when it maps to UNKNOWN (#1923)

Build/Release/Github actions


Thank you

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.