-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Jackson to version 2.13 #12961
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
patrickmann
force-pushed
the
test/jackson-2.13.2
branch
from
July 20, 2022 12:23
43d7fbc
to
c73551d
Compare
bernd
changed the title
Modifications to upgrade to Jackson 2.13.3
Update Jackson to version 2.13
Jul 21, 2022
mpfz0r
reviewed
Jul 25, 2022
@@ -169,8 +169,7 @@ | |||
<dependency> | |||
<!-- Workaround for https://github.com/FasterXML/jackson-bom/pull/38 --> | |||
<groupId>com.fasterxml.jackson.module</groupId> | |||
<artifactId>jackson-module-scala_2.13</artifactId> | |||
<version>2.9.10</version> | |||
<artifactId>jackson-module-scala_3</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, we haven't updated to scala 3 yet.
This workaround was only needed for jackson 2.9
I think it can be removed entirely
Postponed to 5.0, when we expect to drop ES6. |
This was just a test branch, which we no longer need. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to upgrade to a recent Jackson version, while initially keeping everything else unchanged (as much as possible).
https://github.com/Graylog2/graylog-plugin-enterprise/issues/3674
Notes: Requires a fork of MongoJack 2.10.1 with minimal changes to work with Jackson 2.13.3: https://github.com/graylog-labs/mongojack
Details
If configuration of
ObjectMapper
is modified after first usage, changes may or may not take effect, and configuration calls themselves may fail [link]. This behavior appears to have changed since version 2.9. It only affects a few tests which attempt to modify the mapper:graylog2-server/src/test/java/org/graylog/events/contentpack/facade/EventDefinitionFacadeTest.java
graylog2-server/src/test/java/org/graylog/events/contentpack/facade/NotificationFacadeTest.java
DateTimeFormatter
now throws an exception for empty string, resulting in a JSON missing node that needs to be handled:graylog2-server/src/main/java/org/graylog/plugins/beats/Beats2Codec.java
Jackson 2.11 changed the default
DateTime
formatting for timezone offset tohh:mm
instead ofhhmm
[link]. We need to explicitly set the legacy format in theObjectMapper
.graylog2-server/src/main/java/org/graylog2/shared/bindings/providers/ObjectMapperProvider.java
graylog2-server/src/test/java/org/graylog/plugins/views/migrations/V20200204122000_MigrateUntypedViewsToDashboardsTest.java
_graylog2-server/src/test/java/org/graylog2/jackson/MongoJodaDateTimeSerializerTest.java
graylog2-server/src/test/java/org/graylog2/jackson/MongoZonedDateTimeSerializerTest.java
The new Mongo driver version has a slightly different error message for key collisions. This requires a change to a test:
graylog2-server/src/test/java/org/graylog2/migrations/V2018070614390000_EnforceUniqueGrokPatternsTest.java
Jackson no longer includes Joda date/time by default. The Joda module needs to be explicitly registered:
graylog2-server/src/test/java/org/graylog2/plugin/MessageSummaryTest.java
/jenkins-pr-deps https://github.com/Graylog2/graylog-plugin-enterprise/pull/3766