Skip to content

External Storage pipeline integration#2201

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

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

Conversation

@cconstable

@cconstable cconstable commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What was changed

  • Wired extstore store + retrieve into the worker pipeline (workflow, activity, nexus boundaries) behind an internal LoadedDataConverter.externalStorage field, using the payload visitor

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
@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
Comment thread packages/common/src/internal-non-workflow/external-storage-visitor.ts Outdated
Comment thread packages/common/src/internal-non-workflow/external-storage-visitor.ts Outdated
* @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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a round trip test to make sure payload in == payload out and we get a reference payload in between.

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.

Hmm maybe I missed it but I'm not sure I saw a round trip integration test.

I was thinking about a test where we actually run a workflow / activity, running the e2e code path.

@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)

@cconstable
cconstable force-pushed the extstore/pipeline-integration branch from 40ff25b to ab3dace Compare July 17, 2026 16:16
@cconstable

Copy link
Copy Markdown
Contributor Author

should we add to CHANGELOG.MD ?

@THardy98 I can add the changelog entry when the actual public interface is committed (hopefully today).

Comment thread packages/common/src/internal-non-workflow/payload-visitor.ts Outdated
Comment thread packages/worker/src/worker.ts
Comment thread packages/worker/src/worker.ts Outdated
const { externalStorage } = this.options.loadedDataConverter;
if (externalStorage) {
await visitActivityTaskCompletion(rest, extstoreStoreOptions(externalStorage));
}

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.

For all decode paths, where external storage is not enabled, we'll want to raise an exception with TMPRL1105 and make sure it retryably fails the WFT/AT/NT (because that is correctible by enabling external storage), just like https://github.com/temporalio/sdk-python/blob/1.30.0/temporalio/converter/_data_converter.py#L323. Does not have to be part of this change though.

@cconstable
cconstable force-pushed the extstore/pipeline-integration branch from adbe912 to f612d67 Compare July 17, 2026 22:42
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