Skip to content

Migrate conductor-client to Jackson 3 (tools.jackson) - #189

Open
nthmost-orkes wants to merge 2 commits into
mainfrom
jackson3-conductor-client
Open

nthmost-orkes wants to merge 2 commits into
mainfrom
jackson3-conductor-client

Conversation

@nthmost-orkes

@nthmost-orkes nthmost-orkes commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Rebuilds the published conductor-client (and the other client modules) on Jackson 3, bringing them up to the serialization major the server moved to in conductor-oss/conductor#1573 (3.34.0). The client was still a Jackson 2 artifact (versions.jackson), lagging the platform by a major and dark-compiling the server's gRPC/HTTP end-to-end harness suites (conductor-oss/conductor#1751).

This is the code-migration slice of the epic (#187), tasks 1-2.

What changed

  • Gradle. Import the tools.jackson:jackson-bom platform (3.1.7 -- the line the server resolves via its Spring Boot 4.1 BOM) and declare tools.jackson.core databind/core plus tools.jackson.module kotlin in the root subprojects block. Drop jackson-module-afterburner and jackson-datatype-jsr310 (folded into Jackson 3 core) and the jackson-datatype-jdk8 test dep. Annotations stay on com.fasterxml.jackson.annotation -- per JSTEP-1 Jackson 3 keeps the 2.x annotations module, and the BOM pins the right 2.x build (2.21).
  • ObjectMapperProvider (conductor-client) rebuilt on the immutable JsonMapper.builder() template. WRITE_DATES_AS_TIMESTAMPS is enabled to preserve the numeric date encoding JavaTimeModule produced in Jackson 2.
  • Package move com.fasterxml.jackson.{databind,core} -> tools.jackson.* across main, test, and groovy sources. JsonProcessingException -> tools.jackson.core.JacksonException (unchecked in Jackson 3), matching the server.
  • Immutable-mapper fallout in tests. setVisibility / registerModule / configure on a built mapper moved into JsonMapper.builder() chains (changeDefaultVisibility(vc -> vc.withVisibility(...))). Node-API renames: JsonNode.fieldNames() -> propertyNames(), isContainerNode() -> isContainer(), deepCopy() cast to ObjectNode.
  • conductor-client-ai (added on main after this branch was cut). The internal JsonMapper singleton rebuilt on the immutable builder (ISO-8601 dates preserved -- this mapper intentionally keeps WRITE_DATES_AS_TIMESTAMPS off, unlike the client mapper). The two custom serializers move to ValueSerializer / SerializationContext (JsonSerializer / SerializerProvider are gone in Jackson 3); delegating calls become ctxt.writeValue(gen, value). build.gradle switches its api-scoped Jackson coords to the BOM. agent-examples and e2e get the package move too.
  • AnnotatedWorker.convertValue (new on main) used the removed JsonNode.traverse(codec); rewired through om.treeAsTokens(tree) and catches JacksonException.
  • Gradle dependency lockfiles (Enable Gradle dependency locking + clear the CVEs it revealed #184): regenerated every module's runtimeClasspath lock for the Jackson 3 graph.

Verification

  • ./gradlew build -x test -- green across all modules with dependency-lock enforcement on (shadow fat JAR builds).
  • ./gradlew :conductor-client:test -- 985/986 pass, 4 skipped. ./gradlew :conductor-client-ai:test -- green (36 tests). The lone client failure is WorkflowTestFrameworkTests, which boots a real server on a hardcoded port 8080 in @BeforeAll; port 8080 was held by an unrelated process in the local sandbox, so the server never went healthy. The failure is in setup, before any serialization, and runs fine on CI (free port).

Orkes parity

The Orkes Jackson surface lives in the vendored io/orkes/conductor/client/* packages inside conductor-client, migrated here in lockstep. Source-of-truth for the layout: conductor/common/src/main/java/com/netflix/conductor/common/config/ObjectMapperProvider.java (the server's Jackson-3 builder template, minus the server-only proto module).

OSS-side additions

None -- this mirrors the server's Jackson 3 migration.

Downstream impact

The com.fasterxml.jackson -> tools.jackson package move means downstream consumers of the published client still on Jackson 2 will update their imports when they pick up the next release. Upgrade note:

The client now returns tools.jackson.databind.ObjectMapper from ObjectMapperProvider.getObjectMapper() and throws tools.jackson.core.JacksonException (unchecked) instead of com.fasterxml.jackson.core.JsonProcessingException. Update imports from com.fasterxml.jackson.{databind,core} to tools.jackson.*; Jackson annotations (com.fasterxml.jackson.annotation.*) are unchanged. Jackson 3 mappers are immutable -- move setVisibility/configure/registerModule into JsonMapper.builder(). Custom serializers extend ValueSerializer (not JsonSerializer).

Follow-ups

Maven Central publishing for the conductoross org is unblocked (quota lifted 2026-11-23), so the release path is clear once this merges:

De-vendoring conductor-common is not viable and has been dropped from the plan. Investigated against the published org.conductoross:conductor-common:3.34.0: 19 of the 58 vendored classes have no counterpart there (Orkes service-registry models, the SDK common.run.tasks.* typed-task POJOs, MetadataUtils), and the 39 shared-name classes are intentionally slimmed SDK variants (e.g. Task is 376 lines here vs 1153 in the server's common), so swapping to the published jar would change the wire format and pull server-side concerns into the SDK. The split-package collision this epic flagged is instead addressed by relocating the client's classes to org.conductoross.conductor.* -- a namespace move in the spirit of conductor-oss/conductor#752, tracked separately, not a dependency swap.

Part of #187. Follows conductor-oss/conductor#1573.

@nthmost-orkes

nthmost-orkes commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Supersedes #169 (@bradyyie's Jackson 3 PR), which was built against the reverted 4.0.0-alpha.1 common line and had gone stale/conflicting. This PR lands the same migration against the shipped 3.34.0 line, rebased to current HEAD and green.

Correction on follow-ups: I'd initially listed de-vendoring conductor-common as a carry-forward. On investigation it's not viable -- the client's vendored com.netflix.conductor.common.* is a purpose-built slim SDK fork, not a thin copy: 19 of the 58 vendored classes have no counterpart in the published conductor-common:3.34.0 (Orkes service-registry models, the SDK common.run.tasks.* POJOs, MetadataUtils), and the shared-name classes are ~1/3 the size of the server's (e.g. Task 376 vs 1153 lines). So keeping it vendored is correct, and the split-package concern is addressed by a namespace relocation to org.conductoross.conductor.* (conductor-oss/conductor#752-style), not a dependency swap.

Remaining follow-ups on top of this (part of #187):

Bring the published client up to the serialization major the server moved to
in conductor-oss/conductor#1573 (3.34.0). The client was still a Jackson 2
artifact, lagging the platform and dark-compiling the server's gRPC/HTTP e2e
harness suites (conductor-oss/conductor#1751).

- Gradle: import the tools.jackson:jackson-bom platform (3.1.7, same line the
  server resolves via the Spring Boot BOM) and declare tools.jackson.core
  databind/core + tools.jackson.module kotlin. Drop jackson-module-afterburner
  and jackson-datatype-jsr310 -- both folded into Jackson 3 core. Annotations
  stay on com.fasterxml.jackson.annotation (JSTEP-1: Jackson 3 keeps the 2.x
  annotations module; the BOM pins it).
- ObjectMapperProvider rebuilt on the server's immutable JsonMapper.builder()
  template: WRITE_DATES_AS_TIMESTAMPS preserves the numeric date encoding
  JavaTimeModule produced, Kotlin module only.
- Package move com.fasterxml.jackson.{databind,core} -> tools.jackson.* across
  main + test + groovy sources. JsonProcessingException -> JacksonException
  (unchecked in Jackson 3), matching the server.
- Immutable-mapper fallout in tests: setVisibility/registerModule/configure on
  a built mapper moved into JsonMapper.builder() chains; JsonNode.fieldNames()
  -> propertyNames(), isContainerNode() -> isContainer(), deepCopy() cast;
  Jdk8Module dropped (built into core).

862/863 client tests pass; the one failure (WorkflowTestFrameworkTests) is a
local port-8080 conflict in @BeforeAll, not a serialization change.
Rebasing onto main pulled in modules added after this branch was cut
(conductor-client-ai, agent-examples, e2e) plus Gradle dependency locking
(#184). Carrying them to Jackson 3 so the repo resolves a single Jackson
major.

- conductor-client-ai: internal JsonMapper singleton rebuilt on the immutable
  tools.jackson JsonMapper.builder() (ISO-8601 dates preserved -- this mapper
  intentionally keeps WRITE_DATES_AS_TIMESTAMPS off, unlike the client mapper).
  The two custom serializers move to ValueSerializer / SerializationContext
  (JsonSerializer / SerializerProvider are gone in Jackson 3); the delegating
  calls become ctxt.writeValue(gen, value). build.gradle switches its api-scoped
  Jackson coords to the tools.jackson BOM, dropping jsr310/jdk8.
- agent-examples, e2e, and the client files added on main (FileClient, SseClient,
  OrkesAgentClient, TokenRefreshInterceptor, agent model tests): package move to
  tools.jackson. AnnotatedWorker.convertValue -- new on main -- uses the removed
  JsonNode.traverse(codec); rewired through om.treeAsTokens(tree) and catches
  JacksonException.
- Regenerated the per-module runtimeClasspath gradle.lockfiles for the Jackson 3
  graph. `./gradlew build -x test` passes with lock enforcement on.

@chrishagglund-ship-it chrishagglund-ship-it left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude flagged a couple of issues on the this PR that I wanted to check, so I built a demo with CI evidence: PR #194

  • Spring Boot 3 compatibility: in a Boot 3 app, Boot decides the jackson-annotations version, and Boot 3.5.12 and older pick one too old for Jackson 3. The app crashes at startup. Proposal: document the Boot 3.5.13+ floor, add a clearer error message, and add a CI test on Boot 3.5.13 so a future Jackson bump that breaks Boot 3 fails our build.
  • Serialization changes for worker code: Jackson 3 changed several defaults, so the same worker code reads and writes different data than on SDK 6.x (enums, Duration, some fields, Jackson 2 JsonNodes). Proposal: a small fix in ObjectMapperProvider that restores the old behavior, plus upgrade notes for the one case only users can fix (Jackson 2 annotations like @JsonNaming on their own classes).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore the SDK-driven test-harness suites excluded during the Jackson 3 migration

2 participants