Skip to content

Restart Instance#80

Merged
YunchuWang merged 1 commit intomainfrom
wangbill/restart
Jan 31, 2026
Merged

Restart Instance#80
YunchuWang merged 1 commit intomainfrom
wangbill/restart

Conversation

@YunchuWang
Copy link
Member

@YunchuWang YunchuWang commented Jan 31, 2026

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 restartOrchestration method on the TaskHubGrpcClient class and a new E2E test suite covering various restart scenarios, including positive and negative cases.

New orchestration restart functionality:

  • Added a restartOrchestration method to the TaskHubGrpcClient class, 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:

  • Added a new test file restart.spec.ts with end-to-end tests for the restartOrchestration API, covering:
    • Restarting orchestrations in completed, failed, and terminated states.
    • Restarting with the same or a new instance ID.
    • Preservation of original input data upon restart.
    • Default parameter behavior for the restartWithNewInstanceId argument.
    • Negative cases, such as attempting to restart non-existent, running, or suspended instances with the same ID, and verifying appropriate error handling.

@YunchuWang YunchuWang requested review from Copilot and kaibocai and removed request for Copilot January 31, 2026 00:30
@torosent torosent requested a review from Copilot January 31, 2026 00:41
@YunchuWang YunchuWang merged commit fc50a49 into main Jan 31, 2026
16 checks passed
@YunchuWang YunchuWang deleted the wangbill/restart branch January 31, 2026 00:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 restartOrchestration method to TaskHubGrpcClient with 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.

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.

3 participants