Skip to content

Commit

Permalink
3rdparty: Revert "Revert "3rdparty: jackson upgrade to 2.13.0"" & Upg…
Browse files Browse the repository at this point in the history
…rade to 2.13.1

Problem

We're on an old version of jackson, and we'd like to upgrade to a new version.
We tried in the past to upgrade to 2.13.0, but it introduced a regression, where
they were double-serializing.  We believe 2.13.1 no longer has that regression,
so it should be safe to upgrade.

Solution

This reverts commit e27353b784543196b9f5fd572110e4b4fe04f4c4.

JIRA Issues: CSL-11573

Differential Revision: https://phabricator.twitter.biz/D808049
  • Loading branch information
mosesn authored and jenkins committed Jan 12, 2022
1 parent 13a600f commit 79bd09c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 25 deletions.
34 changes: 16 additions & 18 deletions CHANGELOG.rst
Expand Up @@ -7,6 +7,8 @@ Note that ``RB_ID=#`` and ``PHAB_ID=#`` correspond to associated message in comm
Unreleased
----------

Added
~~~~~
* http-server: (BREAKING API CHANGE) Allow for customization of the building of the HTTP and HTTPS
`ListeningServer` constructs. This allows users to specify any additional configuration over the
Finagle `Service[-R, +R]` that is constructed by the `HttpRouter`. The
Expand All @@ -25,6 +27,11 @@ Unreleased
creating the mysql client in other ways like `newRichClient(Finagle.Name, String)`.
``PHAB_ID=D805245``

Changed
~~~~~~~

* finatra: Bump version of Jackson to 2.13.1 ``PHAB_ID=D808049``

21.12.0
-------

Expand Down Expand Up @@ -72,15 +79,12 @@ Changed
21.9.0
------

Breaking API Change
~~~~~~~~~~~~~~~~~~~
Changed
~~~~~~~

* finatra-thrift: Removed c.t.finatra.thrift.ThriftClient#thriftClient, use
* finatra-thrift (BREAKING API CHANGE): Removed c.t.finatra.thrift.ThriftClient#thriftClient, use
#methodPerEndpoint. ``PHAB_ID=D747744``

Runtime Behavior Changes
~~~~~~~~~~~~~~~~~~~~~~~~

* finatra: Bump version of Logback to 1.2.6. ``PHAB_ID=D742405``

* finatra: Bump version of Jackson to 2.11.4. ``PHAB_ID=D727879``
Expand All @@ -101,8 +105,8 @@ Fixed
for non-failed `c.t.util.Future` in some cases where the tested failure is a supertype of
`org.scalatest.exceptions.TestFailedException`. ``PHAB_ID=D705002``

Breaking API Change
~~~~~~~~~~~~~~~~~~~
Changed
~~~~~~~

* inject-utils: Removed deprecated `c.t.inject.conversions.string`, use
`c.t.conversions.StringOps` in the util/util-core project instead.
Expand All @@ -119,9 +123,6 @@ Breaking API Change
* inject-utils: Removed implicit class RichMap from `c.t.inject.conversions.map`, use
`c.t.conversions.MapOps` in the util/util-core project instead. ``PHAB_ID=D699010``

Changed
~~~~~~~

* thrift: Update the test `c.t.finatra.thrift.ThriftClient` to close client and clean-up resources
during the `EmbeddedTwitterServer` close. ``PHAB_ID=D707963``

Expand Down Expand Up @@ -258,19 +259,16 @@ Added
`com.twitter.inject.thrift.ThriftMethodBuilder` for customizing `configureServicePerEndpoint`.
``PHAB_ID=D619565``

Breaking API Changes
~~~~~~~~~~~~~~~~~~~~
Changed
~~~~~~~

* finatra: Deprecate `c.t.inject.utils.AnnotationUtils`, users should instead use
* finatra (BREAKING API CHANGE): Deprecate `c.t.inject.utils.AnnotationUtils`, users should instead use
`c.t.util.reflect.Annotations` from `com.twitter:util-reflect`. Deprecate
`c.t.finatra.utils.ClassUtils`, users should instead use either
`c.t.util.reflect.Classes#simpleName`, `c.t.util.reflect.Types#isCaseClass` or
`c.t.util.reflect.Types#notCaseClass` from `com.twitter:util-reflect`. ``PHAB_ID=D638655``

* finatra: Builds are now only supported for Scala 2.12+ ``PHAB_ID=D631091``

Changed
~~~~~~~
* finatra (BREAKING API CHANGE): Builds are now only supported for Scala 2.12+ ``PHAB_ID=D631091``

* finatra: Revert to scala version 2.12.12 due to https://github.com/scoverage/sbt-scoverage/issues/319
``PHAB_ID=D635917``
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Expand Up @@ -93,7 +93,7 @@ lazy val versions = new {
val commonsFileupload = "1.4"
val fastutil = "8.1.1"
val guice = "4.2.3"
val jackson = "2.11.4"
val jackson = "2.13.1"
val jodaConvert = "1.5"
val jodaTime = "2.10.10"
val json4s = "4.0.3"
Expand Down
Expand Up @@ -673,8 +673,10 @@ class DoEverythingController @Inject() (
throw InternalServerErrorException.plainText("foo1")
}

get("/UnserializableClassField") { r: RequestWithInjectedMapper =>
r
get("/UnserializableClassField") { r: Request =>
val record = new UnserializableRecord(null)
record.recurse = record
record
}

get("/RequestWithQueryParamSeqString") { r: RequestWithQueryParamSeqString =>
Expand Down
Expand Up @@ -4,6 +4,4 @@ import com.twitter.finatra.http.annotations.QueryParam
import com.twitter.util.jackson.ScalaObjectMapper
import javax.inject.Inject

case class RequestWithInjectedMapper(
@Inject mapper: ScalaObjectMapper,
@QueryParam foo: Option[String])
class UnserializableRecord(var recurse: UnserializableRecord)
Expand Up @@ -21,7 +21,8 @@ class CaseClassMappingExceptionMapper @Inject() (
private def toError(exception: CaseClassMappingException): Seq[String] = {
for (error <- exception.errors) yield {
val initialMessage = error.getMessage()
if (initialMessage.contains("Cannot deserialize instance of")) {
if (initialMessage.contains("Cannot deserialize value of") ||
initialMessage.contains("Cannot deserialize instance of")) {
warn(initialMessage)
s"${error.path.names.head}: Unable to parse"
} else {
Expand Down

0 comments on commit 79bd09c

Please sign in to comment.