Versioning, recursive terminating/purging, Replay safe logger#93
Open
YunchuWang wants to merge 14 commits intomainfrom
Open
Versioning, recursive terminating/purging, Replay safe logger#93YunchuWang wants to merge 14 commits intomainfrom
YunchuWang wants to merge 14 commits intomainfrom
Conversation
…version comparison methods
There was a problem hiding this comment.
Pull request overview
This pull request adds three major features to the Durable Task JavaScript SDK:
Changes:
- Versioning Support: Enables orchestrations to be tagged with versions and workers to filter work items based on version matching strategies (None, Strict, CurrentOrOlder), with configurable failure strategies (Reject, Fail)
- Recursive Terminate/Purge: Adds options to terminate and purge orchestrations recursively, including all their sub-orchestrations
- Replay-Safe Logger: Implements a logger wrapper that suppresses duplicate log output during orchestration replay
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/durabletask-js/src/worker/versioning-options.ts | Defines enums and interfaces for versioning configuration |
| packages/durabletask-js/src/orchestration/orchestration-terminate-options.ts | Defines options interface for terminating orchestrations |
| packages/durabletask-js/src/orchestration/orchestration-purge-options.ts | Defines options interface for purging orchestrations |
| packages/durabletask-js/src/types/replay-safe-logger.ts | Implements logger wrapper that only logs during non-replay execution |
| packages/durabletask-js/src/worker/task-hub-grpc-worker.ts | Adds version compatibility checking logic to worker |
| packages/durabletask-js/src/worker/runtime-orchestration-context.ts | Adds version property to runtime context |
| packages/durabletask-js/src/worker/orchestration-executor.ts | Extracts and sets version from execution started event |
| packages/durabletask-js/src/task/context/orchestration-context.ts | Adds version property, compareVersionTo method, and createReplaySafeLogger method |
| packages/durabletask-js/src/client/client.ts | Adds version handling for scheduling, recursive options for terminate/purge |
| packages/durabletask-js/src/utils/versioning.util.ts | Implements semantic version comparison utility |
| packages/durabletask-js/src/utils/pb-helper.util.ts | Adds version mismatch failure details helper and version parameters to actions |
| packages/durabletask-js/src/task/options/task-options.ts | Adds version property to TaskOptions and StartOrchestrationOptions |
| packages/durabletask-js/src/index.ts | Exports new versioning types and utilities |
| test/e2e-azuremanaged/orchestration.spec.ts | Adds E2E tests for versioning, replay-safe logger, and recursive terminate/purge |
| packages/durabletask-js/test/versioning.spec.ts | Unit tests for version comparison utility |
| packages/durabletask-js/test/worker-versioning.spec.ts | Unit tests for worker versioning options |
| packages/durabletask-js/test/orchestration_context_methods.spec.ts | Unit tests for new orchestration context methods |
| packages/durabletask-js/test/replay-safe-logger.spec.ts | Unit tests for ReplaySafeLogger |
| packages/durabletask-js/test/pb-helper-versioning.spec.ts | Unit tests for version mismatch failure details |
| packages/durabletask-js/test/versioning-options.spec.ts | Unit tests for versioning options interfaces |
| packages/durabletask-js/test/client-options.spec.ts | Unit tests for client options with default version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/durabletask-js/test/orchestration_context_methods.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…c.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rabletask-js into wangbill/versioning
…and related tests
kaibocai
approved these changes
Feb 4, 2026
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?
VersioningOptionswithversion,matchStrategy,failureStrategy, anddefaultVersionVersionMatchStrategyenum (None, Strict, CurrentOrOlder)VersionFailureStrategyenum (Reject, Fail)defaultVersionoption for scheduling orchestrationscompareVersionTo(version)method onOrchestrationContextcompareVersions()utility for semantic version comparisonTerminateInstanceOptionswithrecursiveflagPurgeInstanceOptionswithrecursiveflagTaskFailureDetails(ErrorType, IsNonRetriable)AbandonTaskOrchestratorWorkItemAPI when rejecting work items due to version mismatchWhy is this change needed?
Issues / work items
Project checklist
CHANGELOG.mdAI-assisted code disclosure (required)
Was an AI tool used? (select one)
If AI was used:
src/worker/versioning-options.ts- VersioningOptions interface and enumssrc/worker/task-hub-grpc-worker.ts- Version checking logicsrc/utils/versioning.util.ts- compareVersions utilitysrc/task/context/orchestration-context.ts- compareVersionTo methodsrc/types/replay-safe-logger.ts- ReplaySafeLogger implementationsrc/orchestration/orchestration-purge-options.ts- PurgeInstanceOptionssrc/orchestration/orchestration-terminate-options.ts- TerminateInstanceOptionssrc/client/client.ts- defaultVersion support, recursive optionsAI verification (required if AI was used):
Testing
Automated tests
Manual validation (only if runtime/behavior changed)
VersionMatchStrategy.Strictand version "1.0.0"test/e2e-azuremanaged/orchestration.spec.tsNotes for reviewers
compareVersionTo, clientdefaultVersion