Skip to content

External Storage pipeline integration#2201

Open
cconstable wants to merge 2 commits into
mainfrom
extstore/pipeline-integration
Open

External Storage pipeline integration#2201
cconstable wants to merge 2 commits into
mainfrom
extstore/pipeline-integration

Conversation

@cconstable

@cconstable cconstable commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What was changed

  • Added externalStorage to LoadedDataConverter so we can plug it into the process activation pipeline.
  • Updated WorkflowCodecRunner.encodeCompletion to just encode instead of encoding AND applying coresdk.workflow_completion.WorkflowActivationCompletion.encodeDelimited(encodedCompletion).finish();. This allows us to encode then store and then call encodeDelimited after extstore.

Why?

Extstore pipeline integration sets us up for preview release.

Checklist

Closes #2202

@cconstable cconstable changed the title extstore/pipeline integration External Storage pipeline integration Jul 13, 2026
@cconstable
cconstable changed the base branch from main to payload-traversal July 13, 2026 19:02
Base automatically changed from payload-traversal to main July 14, 2026 20:12
…aConverter. Later, we can add ExternalStorage config to DataConverter to 'enable' it.
@cconstable
cconstable force-pushed the extstore/pipeline-integration branch from 041d6f1 to bb7a2bc Compare July 15, 2026 16:02
@cconstable
cconstable marked this pull request as ready for review July 15, 2026 16:12
@cconstable
cconstable requested a review from a team as a code owner July 15, 2026 16:12
} = {}
): Promise<void> {
const runner = new ExternalStorageRunner(externalStorage);
return visitWorkflowActivationCompletion(completion, {

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.

This needs to provide different storage contexts for each command within the workflow task completion. See https://github.com/temporalio/sdk-python/blob/1.30.0/temporalio/worker/_workflow_instance.py#L2302 in Python.

* @internal
* @experimental
*/
export function storeWorkflowActivationCompletion(

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.

Need analogous functions for activity activation and completion.

* @internal
* @experimental
*/
export function storeWorkflowActivationCompletion(

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.

Maybe similarly, we need to update the client call sites to store and retrieve as well. Could use the visitor or invoke per-field; my preference is to use the visitor so we don't have to remember to add more specialized calls for new fields.

t.deepEqual(args[1], small);
});

test('store then retrieve round-trips the original payload bytes through a worker message', async (t) => {

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.

Might be nice to have an integration test that does a round-trip, where we don't manually construct the activation/completion ourselves.

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.

Also would be nice to add equivalent cases for activity payloads that exceed the external storage payload threshold (unsure if this was intended to be part of the change or if this PR was scoped to workflows)

@THardy98 THardy98 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.

LGTM, would prefer some additional test coverage though (noted in comment)

probably prudent to get approval from @jmaeagle99 for ext storage API semantics

@THardy98 THardy98 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.

should we add to CHANGELOG.MD ?

@THardy98 THardy98 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.

(changing to requesting changes because I only meant to comment not approve, and I don't want to accidentally merge - sorry for the paranoia)

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.

[Feature Request] Extstore Pipeline Integration

3 participants