Bot releases are hidden (Show)
Published by finaglehelper about 2 years ago
inject-server: Remove deprecated c.t.inject.server.DeprecatedLogging trait. This trait was
introduced as a placeholder shim to ensure that JUL util-logging Flags were still defined within
a Finatra server such that servers did not fail upon startup if Flag values were being set.
The default behavior during Flag parsing is to error if a Flag value is passed for a Flag not
defined within the application.
We have removed the shim and the trait (and thus the Flag definitions), as it is not expected
that users use util-logging JUL Flags for logging configuration with Finatra servers since Finatra
uses the SLF4J-API. Logging configuration should be done on the choosen SLF4J-API logging
implementation. If your server fails to start after this change, please ensure you are not passing
values for the JUL util-logging Flags. 5b5ccf4f
finatra: Removed kafka
and kafka-streams
modules from finatra core library.
Note: We published a stand-alone finatra-kafka client
with deprecation announcement to serve as exit pathway for current users.
Announcement: finagle blog
27e2c9c4
finatra: Update Jackson library to version 2.13.3 a4065f19
Published by finaglehelper over 2 years ago
No Changes
Published by finaglehelper over 2 years ago
Published by finaglehelper over 2 years ago
inject-modules: Deprecate c.t.inject.modules.LoggerModule. Update c.t.inject.app.App to
mix in the util/util-slf4j-jul-bridge Slf4jBridge trait. The LoggerModule does
not provide a solution inline with the best practices for bridging JUL to the SLF4J-API
and users are encouraged to instead mix in the c.t.util.logging.Slf4jBridge into the
main class of their application if necessary. The updates to c.t.inject.app.App will now
properly bridge JUL to the SLF4J-API early in the constructor of the application catching any
log messages emitted to JUL before where the bridging would have been attempted when using
the LoggerModule.
Note that Slf4jBridge trait is already mixed into the c.t.server.TwitterServer trait and
thus no further action is necessary forbridging JUL to the SLF4J-API in extensions of
c.t.server.TwitterServer. 83360745
inject-slf4j: Deprecate c.t.inject.logging.Logging trait and methods. Users are encouraged
to use the c.t.util.logging.Logging trait directly. There are no replacements for
c.t.inject.logging.Logging#debugFutureResult and c.t.inject.logging.Logging#time.
084257a9
Published by finaglehelper over 2 years ago
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
c.t.finatra.http.HttpServerTrait#build method has been replaced by two more specific versions:
#buildHttpListeningServer and #buildHttpsListeningServer which are used in postWarmup to
create the appropriate ListeningServer given it has a defined port value.
We also update the EmbeddedHttpServer and EmbeddedHttpClient to allow for being able to run both
the HTTP and HTTPS listening servers in tests. This is done by setting the httpsPortFlag to the
value of https.port which will enable the binding of the HTTPS listening server to the ephemeral
port in tests. 13a600ff
mysql-client: Add base client configuration in EmbeddedMysqlServer to enable for more robust
testing setup. This would allow users to add configurations like charset.
Added a overridable function createRichClient to MysqlClientModuleTrait to allow
creating the mysql client in other ways like newRichClient(Finagle.Name, String).
dc1de215
Published by finaglehelper almost 3 years ago
Published by finaglehelper almost 3 years ago
Published by finaglehelper almost 3 years ago
Published by finaglehelper about 3 years ago
Published by finaglehelper about 3 years ago
Published by finaglehelper over 3 years ago
inject-thrift-client (BREAKING API CHANGE): Removed the deprecated
c.t.inject.thrift.modules.FilteredThriftClientModule. Please use its successor
c.t.inject.thrift.modules.ThriftMethodBuilderClientModule for per-method configuration of a
Thrift client. 008d8ca1
thrift: Add service_class to Finatra library thrift registry entry. c5159208
finatra (BREAKING API CHANGE): Update to use the new util/util-jackson ScalaObjectMapper for
case class object mapping. We've removed the custom Finatra c.t.finatra.jackson.ScalaObjectMapper
and instead now use the c.t.util.jackson.ScalaObjectMapper. Since the c.t.util.jackson.ScalaObjectMapper
does not support Joda-Time, backwards compatibility is
maintained through usage of the Finatra ScalaObjectMapperModule for obtaining a configured
ScalaObjectMapper which will be created with Joda-Time support, though support for Joda-Time in
Finatra is deprecated and users should expect for Joda-Time support to be removed in an upcoming release.
Users should prefer to use the JDK 8 java.time classes or java.util.Date.
The finatra/inject c.t.inject.domain.WrappedValue has been removed and users should update to the
util/util-core c.t.util.WrappedValue instead.
The finatra/jackson JsonDiff utility is also removed. Users should switch to the improved version
in util/util-jackson: c.t.util.jackson.JsonDiff.
With the move to the util/util-jackson ScalaObjectMapper we're also able to clean up some awkward
directory structures in Finatra which were necessary because of dependencies. Specifically, the
finatra/json-annotations library no longer exists, as @InjectableValue is now an annotation in
util/util-jackson-annotations, and the remaining binding annotations @CamelCaseMapper and @SnakeCaseMapper
have been moved into finatra/jackson.
Using the util/util-jackson ScalaObjectMapper also brings Java 8 date/time
(JSR310) support via inclusion of the Jackson JavaTimeModule
by default.
Lastly, we've also added the YamlScalaObjectMapperModule which can be used in place of the
ScalaObjectMapperModule in order to provide a YAMLFactory configured ScalaObjectMapper.
9a168a98
inject-utils: Remove deprecated c.t.inject.utils.StringUtils. Users should prefer to use
the corresponding methods in com.twitter.conversions.StringOps from util/util-core, instead.
3a063a9e
inject-utils: Remove deprecated c.t.inject.utils.AnnotationUtils. Users should instead prefer
c.t.util.reflect.Annotations from util/util-reflect. 35b58d34
Published by finaglehelper over 3 years ago
finatra-jackson: Do not enforce CaseClassDeserializer deserialization semantics for a
field until after any deserializer annotation has been resolved. This fully allows a deserializer
to specify how to deserialize a field completely independent of the CaseClassDeserializer
requirements for fields. For example, if a user wanted to allow parsing of a JSON null value
into a null field instance value, they could define a custom deserializer to do so and annotate
the case class field with @JsonDeserialize(using = classOf[CustomNullableDeserializer]).
Additionally, we fix a bug in how String case class fields are handled when the incoming JSON is
not a String-type. The current code incorrectly returns an empty string when the field value is
parsed into Jackson ContainerNode or ObjectNode types and an incorrect toString representation
for a PojoNode type. We now correctly represent the field value as a string in these cases to
deserialize into the case class field. 715890a4
finatra-jackson: Properly handle Scala enumeration fields wrapped in an Option during
deserialization failures in the CaseClassDeserializer#isScalaEnumerationType method.
a6cb5a10
finatra-kafka: Deprecate c.t.finatra.kafka.consumers.TracingKafkaConsumer
as it only produced single-span traces and there is no way to propagate the TraceId back to the
caller without changing the entire API. Users should use the
c.t.finatra.kafka.consumers.KafkaConsumerTracer.trace method instead to enable tracing for
Kafka Consumers. Also added c.t.finatra.kafka.producers.KafkaProducerTraceAnnotator and
c.t.finatra.kafka.consumers.KafkaConsumerTraceAnnotator services which will can be used to add
custom trace annotations to the producer and consumer spans. bba748e6
finatra (BREAKING API CHANGE): Update to use the new util/util-validator ScalaValidator for case
class field validations. We've removed the custom Finatra c.t.finatra.validation.Validator and
instead now use the c.t.util.validation.ScalaValidator. Constraint annotations and validator
implementations now use the standard jakarta.validation API interface classes instead of any
custom Finatra types. We've deprecated the custom Finatra constraints as they are duplicative of
already existing "standard" or otherwise provided constraints and validators. Additionally,
c.t.finatra.validation.ErrorCode is deprecated with no replacement. The same data carried can be
obtained via the standard jakarta.validation.ConstraintViolation[T].
Adapting the Finatra framework to use the util/util-validator also includes the framework Jackson
integration. We're also taking this opportunity to clean up the error reporting interface of
the CaseClassFieldMappingException to define a CaseClassFieldMappingException.Reason type to
replace the usage of the (removed) ValidationResult.Invalid type. The Reason carries a message
String as well as a CaseClassFieldMappingException.Detail which can be one of several possible
types including a CaseClassFieldMappingException.ValidationError which carries any failed validation
information including the emitted ConstraintViolation[T].
Lastly, we are deprecating support for JSON serialization/deserialization of JodaTime fields in
case classes. This support will be dropped in an upcoming release. Users should prefer to use the
JDK 8 java.time classes and we will be adding support for these types in the Finatra Jackson
integration in the future. 0731782d
finatra-jackson: (BREAKING API CHANGE) JsonLogging should use the lazy Scala SLF4J logger
and no longer return the passed in argument that's logged as JSON. 67252f30
Published by finaglehelper over 3 years ago
Published by finaglehelper over 3 years ago
Published by finaglehelper over 3 years ago
Published by finaglehelper over 3 years ago
Published by finaglehelper over 3 years ago
Published by finaglehelper almost 4 years ago
finatra-kafka-streams: Add toCluster DSL call to publish to another Kafka cluster. 449eea1a
jackson: Add support for validating @JsonCreator annotated static (e.g., companion object defined apply methods) or secondary case class constructors. 1c1b55c9
inject-app: Allow injecting flags without default values as both scala.Option and java.util.Optional. b74fe9e9
finatra-kafka-streams: Revert AsyncTransformer to still use ConcurrentHashMap. 7d5b3ccf
inject-thrift-client: The Singleton annotation has been removed from the DarkTrafficFilter and the JavaDarkTrafficFilter. It was there in error. 5efc1ab2
inject-thrift-client: When using RepRepServicePerEndpoint, Finatra's DarkTrafficFilter would throw a NoSuchMethodException when trying to lookup an inherited Thrift endpoint.
697b2137
Published by finaglehelper about 4 years ago