Skip to content

Releases: apple/servicetalk

0.42.7

02 Mar 18:17
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.

Improvements

  • 70d2a47 - Reduce Publisher/Single retry/repeat allocations (#2120)
  • 3aadf0b - Add missing generics for cast in DefaultAsyncContextProvider (#2122)
  • c64ec90 - Reduce initial size of WriteStreamSubscriber queue (#2119)
  • aef3845 - Reduce initial queue size for h1 pipelined connection (#2118)
  • cf0a8b8 - Minor Processor usage cleanup (#2115)

Dependencies

  • aab5549 - Add netty-tcnative-boringssl-static runtime dependency (#2121)

Examples

  • 48c78c2 - Move existing serialization example to json sub-folder (#2106)

Build / CI

  • 609d3dc - Minor improvement in Github action names (#2123)

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.6

27 Feb 22:52
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

  • ddcf256 - Fix memory leak in Completable/Single Processors (#2114)
  • a222317 - Completable/Single Processors more robust top of stack removal (#2116)

Testing

0.42.4

26 Feb 05:04
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

  • 69c0f54 - Publisher.multicast lack of demand on cancel (#2109)

0.41.15

24 Feb 01: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.

New features

Bug fixes

  • 3ceaf2c - CompositeCloseable: prepend doesn't respect ordering (#2097)
  • facbef1 - Content-Type for Zipkin Protobuf should be application/x-protobuf (#2101)
  • ccbe7f9 - ConnectionFactory-level filters can not migrate to new API of #1956 (#2089)

Improvements

  • efbd267 - Validate HTTP header name matches the token format (#2103)
  • a4dd491 - Make HttpLifecycleObserverServiceFilter constructor public (#2096)

Improvements for tests


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