Merged
Conversation
kaibocai
approved these changes
Jan 31, 2026
There was a problem hiding this comment.
Pull request overview
This pull request introduces orchestration restart functionality to the Durable Task JavaScript SDK. It adds a new restartOrchestration method to the TaskHubGrpcClient class that allows restarting completed, failed, or terminated orchestrations with either the same or a new instance ID.
Changes:
- Added
restartOrchestrationmethod toTaskHubGrpcClientwith comprehensive input validation and error handling - Created extensive E2E test suite covering positive scenarios (completed, failed, terminated states) and negative scenarios (non-existent, running, suspended instances)
- Implemented support for preserving original orchestration input during restart operations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/durabletask-js/src/client/client.ts | Implements the restartOrchestration method with parameter validation, gRPC request handling, and error translation for common failure scenarios |
| test/e2e-azuremanaged/restart.spec.ts | Comprehensive E2E test suite validating restart behavior across multiple orchestration states and edge cases, including input preservation and parameter defaulting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request introduces a new orchestration restart capability to the Durable Task JavaScript SDK, along with comprehensive end-to-end tests to validate its behavior. The main changes are the addition of a
restartOrchestrationmethod on theTaskHubGrpcClientclass and a new E2E test suite covering various restart scenarios, including positive and negative cases.New orchestration restart functionality:
restartOrchestrationmethod to theTaskHubGrpcClientclass, allowing users to restart completed, failed, or terminated orchestrations with either the same or a new instance ID. The method includes input validation and detailed error handling for various orchestration states.Comprehensive E2E test coverage:
restart.spec.tswith end-to-end tests for therestartOrchestrationAPI, covering:restartWithNewInstanceIdargument.