-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Upgrade Jackson 2 to Jackson 3 in sdk/cosmos #49551
Copy link
Copy link
Open
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.CosmosService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.azure-spring-cosmosSpring cosmos related issues.Spring cosmos related issues.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK team
Milestone
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.CosmosService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.azure-spring-cosmosSpring cosmos related issues.Spring cosmos related issues.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Todo
Summary
Upgrade Jackson from major version 2 (
com.fasterxml.jackson) to major version 3 (tools.jackson) across all modules undersdk/cosmos.Context
As part of aligning with Spring Boot 4, the
sdk/springmodules were migrated from Jackson 2 to Jackson 3 (see #49538 and #49550). During that work, the Cosmos modules (azure-spring-data-cosmosand, transitively,azure-cosmos) were intentionally left out of scope because they cannot be migrated in isolation.This issue tracks the follow-up work to bring
sdk/cosmosto Jackson 3 so thatazure-spring-data-cosmosand the Spring Cloud Azure Cosmos starter can fully move off Jackson 2.Why Cosmos could not be upgraded together with
sdk/springazure-cosmosexposes Jackson 2 types as part of its public API, not just internally. Around 65 public (non-implementation) classes importcom.fasterxml.jackson, for example:CosmosItemSerializer(public abstract extension point whose signatures useObjectNode/JsonNode)CosmosItemResponse,CosmosBulkItemResponse,CosmosBatchOperationResultcom.azure.cosmos.models.*properties classes (CosmosContainerProperties,IndexingPolicy,SqlQuerySpec, ...)Because
JsonNodeis part of the public contract, switching to Jackson 3 is a breaking API change forazure-cosmos. That change cascades to every module that depends on it.Affected modules
Modules under
sdk/cosmosthat depend onazure-cosmosand/or use Jackson 2 directly (approximate Jackson 2 file counts):azure-cosmosazure-cosmos-testsazure-cosmos-spark_3(+ all spark variants)azure-cosmos-kafka-connectazure-cosmos-encryptionazure-cosmos-benchmarkazure-cosmos-testRoughly 440+ source files reference Jackson 2 across the tree.
Considerations
azure-cosmosis a GA data-plane library; a 2 -> 3 migration that changes the public API is a breaking change and requires the appropriate API review / approval.azure-cosmos(keep the Jackson 2 public API, add Jackson 3) to avoid an immediate break for downstream consumers.sdk/cosmosmodules in lockstep.com.fasterxml.jackson.annotation) is unchanged in Jackson 3 and can be retained.Related