Skip to content

Conversation

@sophiatev
Copy link
Contributor

@sophiatev sophiatev commented Dec 2, 2025

This PR introduces a new API to get the orchestration history for the GrpcDurableTaskClient. The server-side implementation of this is implemented in this PR.

Note:
I only added this method to the GrpcDurableTaskClient. In order to add it to the ShimDurableTaskClient we would need to introduce a Newtonsoft.Json dependency to this repo, which as I understand we are trying to avoid.

Addresses #419

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 PR introduces a new public API method GetOrchestrationHistoryAsync to retrieve orchestration history as a list of HistoryEvent objects. The implementation spans three key areas: adding the base API declaration in DurableTaskClient, implementing the gRPC client logic in GrpcDurableTaskClient, and updating the history event conversion to include failure details in ExecutionCompletedEvent.

Key Changes

  • Added virtual method GetOrchestrationHistoryAsync to the base DurableTaskClient class with comprehensive XML documentation
  • Implemented the method in GrpcDurableTaskClient using streaming gRPC calls with proper error handling
  • Updated ExecutionCompletedEvent construction in ProtoUtils to include failure details as a 4th parameter

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Client/Core/DurableTaskClient.cs Declares the new virtual GetOrchestrationHistoryAsync method with complete exception documentation; also updates entity-related exception documentation for RewindInstanceAsync
src/Client/Grpc/GrpcDurableTaskClient.cs Implements GetOrchestrationHistoryAsync using streaming gRPC calls with appropriate validation, error handling, and namespace disambiguation for ProtoUtils
src/Shared/Grpc/ProtoUtils.cs Adds FailureDetails parameter to ExecutionCompletedEvent constructor to properly include failure information in history events

Copy link
Contributor

Copilot AI commented Dec 2, 2025

@sophiatev I've opened a new pull request, #518, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI review requested due to automatic review settings December 5, 2025 19:15
@YunchuWang YunchuWang self-requested a review December 5, 2025 19:16
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

@sophiatev sophiatev merged commit 27b9a6e into main Dec 5, 2025
13 checks passed
@sophiatev sophiatev deleted the stevosyan/add-orchestration-history-api branch December 5, 2025 19:27
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.

4 participants