Repository navigation
Expose orchestration clone source instance ID - #385
Open
Varshitha Bachu (bachuv) wants to merge 1 commit into
Open
Varshitha Bachu (bachuv) wants to merge 1 commit into
Varshitha Bachu (bachuv) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new abstract getter breaks existing external OrchestrationContext subclasses.
1 open finding
What changed in this PR
Exposes clone-source lineage in core and classic orchestration contexts, preparing the SDK for related backend and Durable Functions support.
Changes:
- Decodes and propagates
sourceInstanceIdthrough worker execution and replay. - Exposes read-only core and classic context getters.
- Adds documentation, changelogs, and regression coverage.
| File | Description |
|---|---|
CHANGELOG.md |
Documents the core API. |
packages/durabletask-js/src/client/client.ts |
Clarifies restart lineage behavior. |
packages/durabletask-js/src/task/context/orchestration-context.ts |
Adds the public core getter. |
packages/durabletask-js/src/worker/orchestration-executor.ts |
Passes lineage into runtime context. |
packages/durabletask-js/src/worker/runtime-orchestration-context.ts |
Stores and exposes lineage. |
packages/durabletask-js/src/worker/task-hub-grpc-worker.ts |
Decodes request metadata. |
packages/durabletask-js/test/orchestration_executor.spec.ts |
Tests execution and replay. |
packages/durabletask-js/test/worker-response-delivery.spec.ts |
Tests streamed dispatch. |
packages/azure-functions-durable/CHANGELOG.md |
Documents the classic API. |
packages/azure-functions-durable/src/orchestration-context.ts |
Adds the classic facade getter. |
packages/azure-functions-durable/test/unit/orchestration-context.spec.ts |
Tests facade forwarding. |
packages/azure-functions-durable/test/unit/worker.spec.ts |
Tests protobuf handling and failures. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| * by the backend. Missing or null metadata returns `undefined`; strings are preserved | ||
| * verbatim, including empty strings. Backend support and metadata persistence are required. | ||
| */ | ||
| abstract get sourceInstanceId(): string | undefined; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
What changed?
sourceInstanceId: string | undefinedto core orchestration contexts and the classiccontext.dffacade.undefined. Malformed values use existing error logging and Failed completion.Why is this change needed?
Issues / work items
Project checklist
CHANGELOG.mdsourceInstanceId, returningundefinedwhen metadata is unavailable.AI-assisted code disclosure (required)
Was an AI tool used? (select one)
If AI was used:
AI verification (required if AI was used):
Testing
Automated tests
npm run build:core- passed.npm run build -w durable-functions- passed.npm run build:azuremanaged- passed.npm run test:unit -w @microsoft/durabletask-js -- --runTestsByPath test\orchestration_executor.spec.ts test\parent-orchestration-instance.spec.ts test\worker-response-delivery.spec.ts test\client-error-cause.spec.ts- passed, 163 tests.npm run test:unit -w durable-functions -- --runTestsByPath test\unit\worker.spec.ts test\unit\orchestration-context.spec.ts test\unit\client.spec.ts- passed, 80 tests.npm run test:unit -w @microsoft/durabletask-js -- --runTestsByPath test\sub-orchestration-instance-id.spec.ts- passed, 5 tests.$files = git diff --name-only -- '*.ts'; & .\node_modules\.bin\eslint.cmd $files- passed on all changed TypeScript files before commit.Manual validation (only if runtime/behavior changed)
undefined. Positive end-to-end lineage remains blocked on backend emission, not claimed as validated.Notes for reviewers