Skip to content

Fix command context awareness to apply to all of DataConverter#1387

Open
jmaeagle99 wants to merge 1 commit intotemporalio:mainfrom
jmaeagle99:command-aware
Open

Fix command context awareness to apply to all of DataConverter#1387
jmaeagle99 wants to merge 1 commit intotemporalio:mainfrom
jmaeagle99:command-aware

Conversation

@jmaeagle99
Copy link
Contributor

What was changed

Refactor _CommandAwarePayloadCodec to _CommandAwareDataConverter so all relevant aspects of DataConverter are command aware.

Why?

External storage was not participating in command awareness so it was using the parent workflow context for every command in a workflow task completion and activation.

Checklist

  1. How was this tested: Existing tests and new serialization context test.
  2. Any docs updates needed? No

@jmaeagle99 jmaeagle99 requested a review from a team as a code owner March 22, 2026 19:45
payloads: Sequence[temporalio.api.common.v1.Payload],
) -> list[temporalio.api.common.v1.Payload]:
return await self._get_current_command_codec().decode(payloads)
_ca_instance: WorkflowInstance = dataclasses.field(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these so different from what they were on codec?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because DataConverter is a frozen dataclass whereas PayloadCodec is an ABC.

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.

2 participants