Skip to content

[Feature Request] Keep an explicit header converter on all outgoing paths #851

Open

Description

@xepozz

Related problems

A Header can carry its own data converter: Header::fromValues($values, $converter).
Most outgoing paths ignore it and always set the client or worker converter:

  • workflow start: src/Internal/Client/WorkflowStarter.php:385
  • ActivityClient: src/Client/ActivityClient.php:266
  • schedules: src/Internal/Mapper/ScheduleMapper.php:42
  • worker commands: src/Worker/Transport/Codec/ProtoCodec/Encoder.php:53, src/Worker/Transport/Codec/JsonCodec/Encoder.php:48

After #839, update and update-with-start keep the explicit converter. So the behavior now differs by path.

In Go, Java, Python and TypeScript, the code that writes a header picks the encoding. The SDK does not apply the client converter to header values.

Solution

Use one rule on all paths: the header converter if set, else the client or worker converter.
Prebuilt Payload entries stay unchanged, as now.

This changes current behavior for headers with an explicit converter. Align it with the cross-SDK decision in temporalio/features#850 (possibly opt-in).

Additional context

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions