Skip to content

[HOLD] Bump protobufjs to v8 and drop proto3-json-serializer - #863

Open
mjameswh wants to merge 4 commits into
mainfrom
bump-protobufjs
Open

[HOLD] Bump protobufjs to v8 and drop proto3-json-serializer#863
mjameswh wants to merge 4 commits into
mainfrom
bump-protobufjs

Conversation

@mjameswh

@mjameswh mjameswh commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Do not merge before the TypeScript SDK release carrying the protobufjs v8 upgrade is published.

Summary

  • Bump protobufjs to v8 and drop proto3-json-serializer
  • Drop the Buffer/Uint8Array injection workarounds (no longer required)

The two protobuf data converter features build their expectation with
DataBlob.create({ encodingType: ENCODING_TYPE_UNSPECIFIED, ... }), which sets an
enum to its zero value, and then deepEqual it against a decoded message.

protobufjs 7 materialized proto3 implicit-presence fields holding their default
value as own properties when decoding; protobufjs 8 leaves them absent. Since
deepEqual compares own properties, the expectation fails against any SDK built
on protobufjs 8.

Compare against an expectation that has itself been through the wire, so the two
sides have the same shape under either version.
@mjameswh
mjameswh requested review from a team as code owners August 10, 2026 17:35
The TS SDK is moving to protobufjs 8, and its CHANGELOG documents the same
upgrade as a requirement for applications that use the Protobuf payload
converters with their own message definitions. Our e2e tests should model what
we ask users to do, so json_protobuf now parses ProtoJSON with
protobufjs/ext/protojson instead of proto3-json-serializer.

The pnpm override pinning protobufjs 7.5.1 (#625) worked around
temporalio/sdk-typescript#1717, which protobufjs 8 fixes upstream, so it goes
away rather than being bumped. It was never needed to keep a single protobufjs
instance either: the generated program maps every bare specifier to its own
node_modules through tsconfig-paths, which is what lets protojson's
`instanceof Type` check hold across the SDK under test.
mjameswh added a commit to temporalio/sdk-typescript that referenced this pull request Aug 10, 2026
The features suite on main still uses proto3-json-serializer and pins
protobufjs 7, which is incompatible with this change. Point the job at
temporalio/features#863 until that PR merges, then revert this.
@mjameswh mjameswh changed the title Don't assume default-valued proto fields survive a round trip Bump protobufjs to v8 and drop proto3-json-serializer Aug 10, 2026
@mjameswh mjameswh changed the title Bump protobufjs to v8 and drop proto3-json-serializer [HOLD] Bump protobufjs to v8 and drop proto3-json-serializer Aug 10, 2026
Both protobuf data converter features reached into the Node realm to overwrite
a global inside the workflow sandbox: binary_protobuf replaced Uint8Array, and
json_protobuf replaced Buffer. They date back to #286 and reference an unnamed
SDK bug around how `bytes` fields cross the sandbox boundary.

The SDK now normalizes protobufjs's `Buffer` allocations to `Uint8Array` when
decoding, so neither injection is needed; both features pass without them.
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