Twitter Util v20.12.0 Release Notes

  • ๐Ÿ’ฅ Breaking API Changes

    * ๐Ÿšš util-core: removed `com.twitter.util.Config.` ``PHAB_ID=D580444``
    
    * ๐Ÿšš util-core: removed `com.twitter.util.Future.isDone` method. The semantics of this method
      are surprising in that `Future.exception(throwable).isDone == false`. Replace usages with
      `Future.isDefined` or `Future.poll` ``PHAB_ID=D585700``
    
    * util-stats: Changed `com.twitter.finagle.stats.MethodBuilder#withName`,
      `com.twitter.finagle.stats.MethodBuilder#withRelativeName`,
      `com.twitter.finagle.stats.MethodBuilder#withPercentiles`,
      `com.twitter.finagle.stats.MethodBuilder#counter`, and
      `com.twitter.finagle.stats.MethodBuilder#histogram`, to accept varargs as parameters,
      rather than a `Seq`.  Added a Java-friendly `com.twitter.finagle.stats.MethodBuilder#gauge`.
      ``PHAB_ID=D620425``
    
    ๐Ÿ†• New Features
    ~~~~~~~~~~~~
    
    * util-core: `c.t.conversions` now includes conversion methods for maps (under `MapOps`)
      that were moved from Finatra. ``PHAB_ID=D578819``
    
    * util-core: `c.t.conversions` now includes conversion methods for tuples (under `TupleOps`)
      that were moved from Finatra. ``PHAB_ID=D578804``
    
    * util-core: `c.t.conversions` now includes conversion methods for seqs (under `SeqOps`)
      that were moved from Finatra. ``PHAB_ID=D578605``
    
    * util-core: `c.t.conversions` now includes conversion methods `toOption`, and `getOrElse`
      under `StringOps`. ``PHAB_ID=D578549``
    
    * util-core: `c.t.util.Duration` now includes `fromJava` and `asJava` conversions to
      `java.time.Duration` types. ``PHAB_ID=D571885``
    
    โš™ Runtime Behavior Changes
    
    • util-core: Activity.apply(Event) will now propagate registry events to the underlying Event instead of registering once and deregistering on garbage collection. This means that if the underlying Event is "notified" while the derived Activity is not actively being observed, it will not pick up the notification. Furthermore, the derived Activity will revert to the Activity.Pending state while it is not under observation. PHAB_ID=D574843

    • util-core: Activity#stabilize will now propagate registry events to the underlying Activity instead of registering once and deregistering on garbage collection. This means that if the underlying Activity is changed to a new state while the derived Activity is not actively being observed, it will not update its own state. The derived Activity will maintain its last "stable" state when it's next observed, unless the underlying Activity was updated to a new "stable" state, in which case it will pick that up instead. PHAB_ID=D574843

    • util-stats: c.t.finagle.stats.DenylistStatsReceiver now includes methods for creating DenyListStatsReceiver from partial functions. PHAB_ID=D576833

    • ๐Ÿ‘ util-core: c.t.util.FuturePool now supports exporting the number of its pending tasks via numPendingTasks. PHAB_ID=D583030