Upgrade Jackson to 2.21.3, pin all core modules, and upgrade fabric8 kubernetes-client to 7.7.0#637
Conversation
Agent-Logs-Url: https://github.com/benckx/elephantchess/sessions/a82422a7-a828-4be8-a057-412ab39c326a Co-authored-by: benckx <8626080+benckx@users.noreply.github.com>
| // force "com.fasterxml.jackson.core:jackson-core:$jacksonVersion" | ||
| force "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion" | ||
| force "com.fasterxml.jackson.core:jackson-core:$jacksonVersion" | ||
| force "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion" |
There was a problem hiding this comment.
@copilot Thing is it's not com.fasterxml any more, they moved to another package name.
There was a problem hiding this comment.
You're right that Jackson 3.x moved to the tools.jackson group ID and package names. However, ktor-serialization-jackson:3.4.3 (which this project uses for both HTTP and WebSocket serialization) still depends on Jackson 2.x (com.fasterxml.jackson). Migrating to tools.jackson right now would break the Ktor serialization integration since its internals still reference the old package names.
Options to unblock the migration:
- Wait for Ktor to ship Jackson 3.x support
- Drop
ktor-serialization-jacksonentirely and migrate toktor-serialization-kotlinx-json(already partially in place in this project), removing the Jackson dependency for Ktor content negotiation
Would you like me to pursue option 2? The jackson() call in ApiServiceRoutingModule.kt and related configuration would need to change to json() using kotlinx serialization instead.
|
@copilot so now the k8s client isn't happy. Is it fixable? can it be upgraded? |
Agent-Logs-Url: https://github.com/benckx/elephantchess/sessions/1f79277a-34f3-4a03-ada5-da7b10e73ee5 Co-authored-by: benckx <8626080+benckx@users.noreply.github.com>
Yes, fixable by upgrading. The root cause: fabric8 7.6.1 bundles Jackson |
@copilot but can we go to Jackson 3 or are we stuck at 2 because of the k8S client? |
The k8s client (fabric8) is the current blocker. Here's the full picture:
So for now we're stuck at Jackson 2.x unless we drop the fabric8 dependency entirely. Once a future fabric8 release (likely 8.x) ships Jackson 3 support, the migration path would open up. |
Multiple Jackson 2.x versions (2.21.0–2.21.3) were appearing in the classpath due to transitive dependencies, with no force resolution to consolidate them. Additionally, the pinned Jackson version conflicted with the version bundled by the fabric8 Kubernetes client.
Changes
gradle.properties: BumpjacksonVersion2.21.2→2.21.3build.gradle: Activate force declarations for all three core Jackson modules inallprojects.resolutionStrategy:jackson-annotationsandjackson-coreentries were already present but commented out;jackson-databindis newly added.build.gradle: Upgradeio.fabric8:kubernetes-client7.6.1→7.7.0. Version 7.6.1 bundles Jackson2.20.0, which conflicted with the forced2.21.3. Version 7.7.0 was updated to use Jackson2.21.3, eliminating the mismatch.