Skip to content

Add opt-in header codec processing - #3165

Open
Sushisource wants to merge 1 commit into
mainfrom
normalize-header-conversion
Open

Sushisource wants to merge 1 commit into
mainfrom
normalize-header-conversion

Conversation

@Sushisource

@Sushisource Sushisource commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

What was changed

  • Add default-false ContextPropagator.encodeHeaders() and OpenTracing/OpenTelemetry options using the configured client's payload codec, compatible with existing propagator implementations.
  • Encode only opted-in producers' output, leaving application-supplied wire-ready headers unchanged. Opted-in inbound consumers receive decoded copies; tracing keeps standard serialization. Encoding ownership follows the producer’s key and payload instance.
  • Preserve destination contexts, header presence, raw schedule retention, storage ordering, and once-only multioperation processing, without converter policy wrappers or a separate header-only codec chain.

Breaking changes: None. Existing producers default to false; custom converter wrappers can forward PayloadCodecProvider to expose their codec.
Server PR: Not required.

Why?

Part of temporalio/features#850. Tracing and context propagators can opt into the configured client codec without double-encoding unrelated user-supplied headers or changing existing defaults.

Checklist

  1. Related issue: Normalize Header Data Conversion across languages features#850 (this PR does not close the cross-SDK issue).
  2. How was this tested:
    • Mixed producers, plaintext/pre-encoded header isolation, contextual binding, and codec errors/cardinality.
    • Client/worker boundaries, tracing, storage, retained schedules, child namespaces, reused multioperation headers, and activity/Nexus client propagation. Targeted Gradle suites and Spotless passed using scratch protobuf sources from the exact pinned API commits because local submodules are partial; one existing memo test was skipped. Full suites and remote CI were not verified.
  3. Any docs updates needed? README, public API documentation, and changelog included; guidance covers producer opt-in, configured-client codecs, compatible decoders, and wrapper forwarding.

@Sushisource
Sushisource force-pushed the normalize-header-conversion branch 6 times, most recently from a022f6f to f0ef77f Compare October 29, 2026 22:55
@Sushisource
Sushisource force-pushed the normalize-header-conversion branch from f0ef77f to 37a747d Compare October 30, 2026 00:51
@Sushisource
Sushisource marked this pull request as ready for review October 30, 2026 22:08
@Sushisource
Sushisource requested a review from a team as a code owner October 30, 2026 22:08

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.

1 participant