Yufan Gong

@yufangong

Posted March 29, 2022

March 2022 Release Notes - Version 22.3.0

March is here ☀️, and Spring isn’t far behind 🌱. Enjoy this wonderful time of year with our March release 🥂.

Util

Deprecations

  • util-stats: Deprecated methods on MetricBuilder for directly instantiating metrics so that we can eventually remove the statsReceiever field from MetricBuilder and let it just be the source of truth for defining a metric. a7958355

Scrooge

New Features

  • scrooge-generator: for each method defined in a service in the Thrift IDL, if any request arg of a method has annotations started with validation., in Java template, generate a new trait ServerValidationMixin with a new API violationReturning<method_name>; which validates incoming request (of Struct, Union, Exception types) and return any violations (as method parameters <request_variable>Violations) back to the users in the method API. aab91465

Breaking API Changes

  • scrooge: ThriftUnion is now defined to extend ThriftStruct. In practice, this is not a significant change as all Scrooge-generated classes that implement ThriftUnion also implement ThriftStruct. We just made the invariant that unions are always structs explicit in the type system. 34ed2ec3

Runtime Behavior Changes

  • scrooge: Bump version of Jackson to 2.13.2. b283d341

Finagle

Breaking API Changes

  • finagle-core: Removed the stack param WhenNoNodesOpenParam from LoadBalancerFactory. Removed NoNodesOpenServiceFactory and NoNodesOpenException. When the majority of nodes are busy or closed (approx 60%), the load balancer will probabilistically fail open and pick a node at random. 1ec9ffa4

Runtime Behavior Changes

  • finagle: Bump version of Jackson to 2.13.2. 0f83179d

Twitter Server

Updates

  • Update the twitter-server/slf4j-jdk14 Logging trait to ensure it defines a Logger to handle the cases where a class the trait is mixed into has redefined the logger. b2ea1709

Runtime Behavior Changes

  • Bump version of Jackson to 2.13.2. 3bb02e43

Finatra

Runtime Behavior Changes

  • inject-app: Remove the SLF4J-API logging bridges as dependencies. These were originally added as the framework was expressly opionated that users should use Logback as an SLF4J-API implementation, however specifying the bridges on the Finatra inject/inject-app library causes many issues with code that must use a different SLF4J-API logging implementation but still uses the Finatra framework. Users should note that if they do not include these bridges in some other manner that they may lose logging if they have any libraries which log with one of the formerly bridged implementations. Also note that servers using a TwitterServer logging implementation to support dynamically changing log levels will get the proper bridges as dependencies. a73a2957

Runtime Behavior Changes

  • inject-server: Throw an UnsupportedOperationException when access to the c.t.inject.server.DeprecatedLogging#log instance is attempted. This is a JUL Logger instance which was provided only as a backward-compatible shim for Finatra services when the c.t.server.TwitterServer framework was moved to the SLF4J-API. The instance was marked @deprecated in hopes of alerting users to not use it. We have now updated it to throw an exception when accessed. Please refer to the Finatra documentation for more information on using the SLF4J-API for logging with the Finatra framework: https://twitter.github.io/finatra/user-guide/logging/index.html. e2f26752

Added

  • inject-app: Introduce test-friendly c.t.inject.app.console.ConsoleWriter and c.t.inject.app.TestConsoleWriter, which can be used to inspect the output of a command-line style c.t.inject.app.App. 404f7eeb

Changed

  • inject-modules: Remove deprecated c.t.inject.modules.LoggerModule. 4fa62a88
  • finatra: Bump version of Jackson to 2.13.2 3e0bd999
  • inject-thrift-client: Deprecate c.t.inject.thrift.AndThenService, c.t.inject.thrift.modules.AndThenServiceModule, and c.t.inject.thrift.internal.DefaultAndThenServiceImpl. These were plumbing for unreleased experimental record/replay functionality and currently do nothing with no plan for implementation. 887c2ffb