Run tests against Jackson 2.12 to ensure runtime compatibility #695
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.
Previously, I merged #668, which bumps jackson to 2.13.0.
In this PR, I have added an additional GitHub workflow step that will run tests against jackson 2.12.5 (without recompiling). Running these tests ensures that even though logstash-logback-encoder is compiled against jackson 2.13.0, logstash-logback-encoder continues to work with jackson 2.12.5 at runtime. If users need jackson 2.12.5, they can use dependencyManagement to pin jackson back to 2.12.5.
Note that logstash-logback-encoder is not compatible with jackson 2.11.x (the tests fail due to
java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/filter/TokenFilter$Inclusion
)I could not find a way to run the tests against both jackson 2.13.0 and 2.12.5 in a single maven command execution. So, I had to add an additional maven execution. Unfortunately, this means that during development, maven won't run the tests against 2.12 by default. We can either execute them manually pre-commit. Or push and wait for GitHub to tell us if they pass. Any other ideas welcome.