Stefan Lance

@stefan_lance

Posted March 6, 2018

🌷 March 2018 Release Notes - Version 18.3.0

Our March releases have arrived!

Finagle 18.3.0, Finatra 18.3.0, Scrooge 18.3.0, TwitterServer 18.3.0, and Util 18.3.0.

Finagle

New Features

  • finagle-core: c.t.f.client.BackupRequestFilter.filterService for wrapping raw services in a c.t.f.client.BackupRequestFilter is now public. b227d988

  • finagle-core: Introduce c.t.f.Stacks.EMPTY_PARAMS for getting an empty Param map from Java, and c.t.f.Stack.Params.plus for easily adding Params to a Param map from Java. 43e0f007

Bug Fixes

  • finagle-core: c.t.f.liveness.FailureAccrualFactory takes no action on c.t.f.Failure.Ignorable responses. 512894cf

  • finagle-core: c.t.f.pool.WatermarkPool is resilient to multiple closes on a service instance. 37c29e9e

  • finagle-core: c.t.f.pool.CachingPool service wrapper instances are resilient to multiple closes. ce779ec7

  • finagle-core: Requeue module now closes sessions it prevented from propagating up the stack. f5cdda14

  • finagle-base-http: c.t.f.http.Netty4CookieCodec.encode now wraps Cookie values that would be wrapped in c.t.f.http.Netty3CookieCodec.encode. 78fdc9aa

  • finagle-base-http: c.t.f.http.Cookie.maxAge returns c.t.f.http.Cookie.DefaultMaxAge (instead of null) if maxAge has been set to null or None in the copy constructor 17a32d44.

  • finagle-http: The HTTP client will not attempt to retry nacked requests with streaming bodies since it is likely that at least part of the body was already consumed and therefore it isn’t safe to retry. a787955b

Breaking API Changes

  • finagle-base-http: Removed c.t.f.http.Cookie.comment_, c.t.f.http.Cookie.comment_=, c.t.f.http.Cookie.commentUrl_, and c.t.f.http.Cookie.commentUrl_=. comment and commentUrl per RFC-6265. 13a6bd2c

  • finagle-base-http: Removed deprecated c.t.f.http.Cookie.isDiscard and c.t.f.http.Cookie.isDiscard_=, per RFC-6265. 0e03b630

  • finagle-base-http: Removed deprecated c.t.f.http.Cookie.ports and c.t.f.http.Cookie.ports_=, per RFC-6265. 0469f5b1

  • finagle-base-http: c.t.f.http.RequestBuilder has been moved to the finagle-http target and the implicit evidence, RequestConfig.Yes has been renamed to RequestBuilder.Valid. 1632856c

  • finagle-base-http: Removed deprecated c.t.f.Cookie.isSecure; use c.t.f.Cookie.secure instead. Removed deprecated c.t.f.Cookie.isSecure_=. 33d75b95

  • finagle-base-http: Removed deprecated c.t.f.http.Cookie.version and c.t.f.http.Cookie.version_=, per RFC-6265. 6c9020cc

  • finagle-core: c.t.f.pool.WatermarkPool was finalized. 37c29e9e

  • finagle-core: c.t.finagle.ssl.Ssl and related classes have been removed. They were replaced as the primary way of using SSL/TLS within Finagle in release 6.44.0 (April 2017). Please migrate to using c.t.f.ssl.client.SslClientEngineFactory or c.t.f.ssl.server.SslServerEngineFactory instead. d10a42b8

  • finagle-core: Removed newSslEngine and newFinagleSslEngine from ServerBuilder. Please implement a class which extends c.t.f.ssl.server.SslServerEngineFactory with the previously passed in function used as the implementation of the apply method. Then use the created engine factory with one of the tls methods instead. d10a42b8

  • finagle-core: The deprecated c.t.f.loadbalancer.DefaultBalancerFactory has been removed. f6971d76

  • finagle-exp: The deprecated c.t.f.exp.BackupRequestFilter has been removed. Please use c.t.f.client.BackupRequestFilter instead. 350d8821

  • finagle-http: Removed the c.t.f.Http.Netty3Impl. Netty4 is now the only underlying HTTP implementation available. ef9fedb1

  • finagle-zipkin-scribe: Renamed the finagle-zipkin module to finagle-zipkin-scribe, to better advertise that this is just the scribe implementation, instead of the default. c23ef398

Finatra

Added

  • inject-server: Add a lint rule in c.t.inject.server.TwitterServer#warmup. If a server does not override the default implementation of TwitterServer#warmup a lint rule violation will appear on the lint page of the HTTP admin interface. f0e9749a

  • inject-server: Add c.t.inject.server.TwitterServer#setup lifecycle callback method. This is run at the end of the postInjectorStartup phase and is primarily intended as a way for servers to start pub-sub components on which the server depends. Users should prefer this method over overriding the c.t.inject.server.TwitterServer#postWarmup @Lifecycle-annotated method as the callback does not require a call its super implementation for the server to correctly start and is ideally less error-prone to use. e35f2873

  • inject-app: Add c.t.inject.annotations.Flags#named for getting an implementation of an @Flag annotation. This is useful when trying to get or bind an instance of an @Flag annotated type. 4baf6c9f

Changed

  • finatra-http: ReaderDiscarded failures writing in c.t.f.http.StreamingResponse now only log at the info level without a stack trace, while other failures log at the error level with a stacktrace. ad7dee19

  • inject-thrift-client: Removed withBackupRequestFilter method on deprecated c.t.inject.thrift.filters.ThriftClientFilterChain. Instead of c.t.inject.thrift.modules.FilteredThriftClientModule, use c.t.inject.thrift.modules.ThriftMethodBuilderClientModule and use the idempotent method on c.t.inject.thrift.ThriftMethodBuilder to configure backup requests. 8d3ae4cf.

  • inject-app: c.t.inject.annotations.FlagImpl is no longer public and should not be used directly. Use c.t.inject.annotations.Flags#named instead. 4baf6c9f

Fixed

  • inject-thrift-client: Fix for duplicate stack client registration. The c.t.inject.thrift.modules.ThriftMethodBuilderClientModule was incorrectly calling the ThriftMux.client twice. Once to create a MethodBuilder and once to create a ServicePerEndpoint. Now, the ServicePerEndpoint is obtained from the configured MethodBuilder. 37e477ba

  • inject-thrift-client: Convert non-camel case ThriftMethod names, e.g., “get_tweets” to camelCase, e.g., “getTweets” for reflection lookup on generated ServicePerEndpoint interface in c.t.inject.thrift.ThriftMethodBuilder. 305c2f55

Scrooge

  • scrooge-generator: Add support for mutually recursive structs. 2a731bbc

TwitterServer

No Changes

Util

Runtime Behavior Changes:

  • util-app: Ensure that any flag parsing error reason is written to System.err before attempting to print flag usage. In the event that collecting flags for the printing the usage message fails, users will still receive a useful message as to why flag parsing failed. 31efdaf0

  • util-core: Promises/Futures now use LIFO execution order for their callbacks (was depth-based algorithm before). bf47b55f

  • util-core: Wrap the function passed to Closable.make in a try/catch and return a Future.exception over any NonFatal exception. 63d1caf3

Deprecations:

  • util-core: RichU64* APIs are deprecated. Use Java 8 Unsigned Long API instead: 0e27f594

    • new RichU64String("123").toU64Long -> Long.parseUnsignedInt
    • new RichU64Long(123L).toU64HexString -> Long.toHexString (no leading zeros)

Changelogs