Skip to content

feat: [2/6] integrate payloads with clients workers and history - #389

Open
wangbill (YunchuWang) wants to merge 1 commit into
yunchuwang-payload-phase-1-corefrom
yunchuwang-payload-phase-2-sdk
Open

wangbill (YunchuWang) wants to merge 1 commit into
yunchuwang-payload-phase-1-corefrom
yunchuwang-payload-phase-2-sdk

Conversation

@YunchuWang

@YunchuWang wangbill (YunchuWang) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

What changed?

  • Add opt-in payload-aware client and worker options, unary request externalization and response hydration without changing the disabled transport path.
  • Hydrate work items and history chunks before user execution/conversion, apply streamed backpressure, propagate storage failures as retryable work, and handle large histories without variadic argument limits.
  • Expose Azure-managed builder opt-in with core >=0.4.1 and configuration-preservation tests.
  • Use a custom in-memory PayloadStore in loopback gRPC tests. No Azure Blob provider, cleanup API, reserved task registration, or future purge import exists in this snapshot.

Why is this change needed?

  • Phase 2/6 of the requested large-payload implementation split. This PR's base is phase 1's branch, so its diff excludes previously reviewed phases.
  • Behavioral reference: durabletask-dotnet 91739687. The complete stack preserves the original implementation at c9b53fcb3ab8585c4b3b22f9c0500cc9dd122c5a, with the documented instance-kind routing correction.

Issues / work items

  • Resolves: N/A (user-requested phased feature review).
  • Related: original oversized PR #387. It is preserved while the coordinator verifies this replacement stack.

Project checklist

  • Release notes are not required for the next release
    • Otherwise: Notes added to CHANGELOG.md
  • Backport is not required
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • All required tests have been added/updated (unit tests, E2E tests)
  • Breaking change?
    • If yes:
      • Impact: The Azure-managed package now requires core >=0.4.1 for its public payload option types; core 0.4.0 is not a valid type/API provider.
      • Migration guidance: Publish the completed core 0.4.1 before the dependent package; do not release this partial phase.

AI-assisted code disclosure (required)

Was an AI tool used? (select one)

  • No
  • Yes, AI helped write parts of this PR (e.g., GitHub Copilot)
  • Yes, an AI agent generated most of this PR

If AI was used:

  • Tool(s): GitHub Copilot.
  • AI-assisted areas/files: This phase's source, regression tests, and directly related metadata/documentation.
  • What you changed after AI output: Split the implementation along independently buildable boundaries; retained focused regression evidence and removed unrelated formatting-only changes. Human review is still required.

AI verification (required if AI was used):

  • I understand the code and can explain it
  • I verified referenced APIs/types exist and are correct
  • I reviewed edge cases/failure paths (timeouts, retries, cancellation, exceptions)
  • I reviewed concurrency/async behavior
  • I checked for unintended breaking or behavior changes

These human attestations are intentionally left unchecked.


Testing

Automated tests

  • Result: Passed locally for this phase, without later-phase files.
  • npm ci --offline --no-audit --no-fund — passed with the phase-local lockfile.
  • npm run build — passed all existing workspaces.
  • npm run lint — passed.
  • npm run test:unit -w @microsoft/durabletask-js -- --runTestsByPath test\payload-transport.spec.ts test\payloads.spec.ts test\client-stream-cleanup.spec.ts test\worker-history-streaming.spec.ts test\worker-entity.spec.ts test\client-wait-grpc.spec.ts test\worker-versioning.spec.ts — passed 132 tests in 7 suites.
  • npm run test:unit -w @microsoft/durabletask-js-azuremanaged — passed 821 tests in 11 suites.
  • git diff --check yunchuwang-payload-phase-1-core...HEAD — passed.
  • Hosted CI: pending/not inferred. Existing main-base filters mean some workflows will not run for stacked PRs; no workflow triggers were broadened.

Manual validation (only if runtime/behavior changed)

  • Environment (OS, Node.js version, components): Windows, Node.js v24.14.0; loopback gRPC transport tests and provider-independent in-memory payload storage.
  • Steps + observed results:
    1. Materialized this phase on its declared predecessor, with no future-phase imports.
    2. Ran the exact owning checks above and inspected the incremental patch.
    3. Kept the original feature branch/history and primary user checkout unchanged.
  • Evidence (optional): Full local logs are session artifacts, not repository changes.

Notes for reviewers

Merge order Phase PR Base branch
1 Core contracts #388 main
2 SDK integration #389 yunchuwang-payload-phase-1-core
3 Azure Blob provider #390 yunchuwang-payload-phase-2-sdk
4 Purge protocol/client #391 yunchuwang-payload-phase-3-blob
5 Purge worker #392 yunchuwang-payload-phase-4-client
6 Release/usage/consumers #393 yunchuwang-payload-phase-5-worker

Merge 1 → 2 → 3 → 4 → 5 → 6. Each PR targets its predecessor; retarget the next PR only after its prerequisite merges. Do not publish packages or describe a partial phase as the complete feature.

  • This phase enables transparent transport using a supplied PayloadStore, but does not provide Azure Blob storage or cleanup.
  • Payload-aware work-item capability is advertised only when enabled. Cleanup filters and business-version exemptions are deliberately deferred to phase 5.
  • Full live DTS/mixed-.NET execution has not been run locally (Docker daemon unavailable). The final phase records aggregate local Blob/Azurite, source/wire interoperability and packed-consumer evidence without claiming absent hosted checks.

Phase 2 of 6: externalize outgoing payloads and await query, work-item and streamed history hydration before conversion or dispatch. Add Azure-managed builder opt-in and its core API peer floor, without importing the later Azure Blob provider or cleanup runner.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 81e20512-d3a2-4f8e-a574-f396140ec9c7
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