Skip to content

Implement ListInstanceIDs, GetInstanceHistory, and RerunWorkflowFromEvent workflow RPCs#1738

Merged
WhitWaldo merged 2 commits intodapr:masterfrom
JoshVanL:implement-workflow-rpcs
Mar 10, 2026
Merged

Implement ListInstanceIDs, GetInstanceHistory, and RerunWorkflowFromEvent workflow RPCs#1738
WhitWaldo merged 2 commits intodapr:masterfrom
JoshVanL:implement-workflow-rpcs

Conversation

@JoshVanL
Copy link
Copy Markdown
Contributor

@JoshVanL JoshVanL commented Mar 6, 2026

Add the three missing workflow RPCs that are defined in the proto but were not yet exposed through the SDK client. This includes the full stack: abstract base class, gRPC implementation, public interface, public client, model types, logging, and tests.

@JoshVanL JoshVanL requested review from a team as code owners March 6, 2026 14:34
Copilot AI review requested due to automatic review settings March 6, 2026 14:34
Copy link
Copy Markdown

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

Adds the remaining workflow RPCs to the .NET Workflow SDK surface area (and related models/converters), aligning the client with the workflow proto contract.

Changes:

  • Exposes ListInstanceIDsAsync, GetInstanceHistoryAsync, and RerunWorkflowFromEventAsync across the public client/interface layers.
  • Adds new client model types for instance paging, history events, and rerun options, plus proto-to-model conversion helpers.
  • Adds logging and unit tests for the new RPCs (client forwarding + gRPC request/response behavior).

Reviewed changes

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

Show a summary per file
File Description
test/Dapr.Workflow.Test/DaprWorkflowClientTests.cs Adds forwarding/validation tests for the new public client methods.
test/Dapr.Workflow.Test/Client/WorkflowGrpcClientTests.cs Adds gRPC request/response mapping tests for the three new RPCs.
test/Dapr.Workflow.Test/Client/ProtoConvertersTests.cs Adds tests for history event type conversion and event mapping.
src/Dapr.Workflow/Logging.cs Adds structured log helpers for list/history/rerun operations.
src/Dapr.Workflow/IDaprWorkflowClient.cs Extends the public interface with the three missing RPCs.
src/Dapr.Workflow/DaprWorkflowClient.cs Implements new methods by delegating to the inner WorkflowClient.
src/Dapr.Workflow/Client/WorkflowInstancePage.cs Introduces a page model for instance ID listing.
src/Dapr.Workflow/Client/WorkflowHistoryEvent.cs Introduces a history event model + event type enum.
src/Dapr.Workflow/Client/RerunWorkflowFromEventOptions.cs Introduces options for rerunning a workflow from an event.
src/Dapr.Workflow/Client/ProtoConverters.cs Adds conversions for proto history events into SDK models.
src/Dapr.Workflow/Client/WorkflowGrpcClient.cs Implements the three RPCs over gRPC, including request building and logging.
src/Dapr.Workflow/Client/WorkflowClient.cs Extends the abstract base client with the three new RPCs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/Dapr.Workflow/Client/RerunWorkflowFromEventOptions.cs Outdated
Comment thread src/Dapr.Workflow/Client/WorkflowGrpcClient.cs
Comment thread src/Dapr.Workflow/Client/WorkflowGrpcClient.cs
Comment thread src/Dapr.Workflow/DaprWorkflowClient.cs
…vent workflow RPCs

Add the three missing workflow RPCs that are defined in the proto but
were not yet exposed through the SDK client. This includes the full
stack: abstract base class, gRPC implementation, public interface,
public client, model types, logging, and tests.

Signed-off-by: joshvanl <me@joshvanl.dev>
Copy link
Copy Markdown

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 12 out of 12 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/Dapr.Workflow/Client/RerunWorkflowFromEventOptions.cs Outdated
Comment thread src/Dapr.Workflow/Client/WorkflowGrpcClient.cs
Copy link
Copy Markdown
Contributor

@WhitWaldo WhitWaldo left a comment

Choose a reason for hiding this comment

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

@JoshVanL Looks great - since it's validating operational functionality, could you generate an integration test or two within the Dapr.IntegrationTest.Workflow project within a separate class that just proves it works through and through in addition to the unit tests you've got and the few notes I made?

Comment thread src/Dapr.Workflow/DaprWorkflowClient.cs Outdated
/// <returns>
/// A page containing the instance IDs and an optional continuation token for the next page.
/// </returns>
public async Task<WorkflowInstancePage> ListInstanceIDsAsync(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just as a convention, .NET uses "Ids" instead of "IDs" in method names - could you change this?

/// <returns>
/// A page containing the instance IDs and an optional continuation token for the next page.
/// </returns>
Task<WorkflowInstancePage> ListInstanceIDsAsync(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same thing - please change from "IDs" to "Ids"

/// <param name="pageSize">The maximum number of instance IDs to return, or <c>null</c> for no limit.</param>
/// <param name="cancellationToken">A token that can be used to cancel the operation.</param>
/// <returns>A page of instance IDs and an optional continuation token for the next page.</returns>
public abstract Task<WorkflowInstancePage> ListInstanceIDsAsync(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"IDs" -> "Ids"

Comment thread src/Dapr.Workflow/Client/WorkflowGrpcClient.cs
Signed-off-by: joshvanl <me@joshvanl.dev>
Copy link
Copy Markdown
Contributor

@WhitWaldo WhitWaldo left a comment

Choose a reason for hiding this comment

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

Looks good - thank you for putting this together!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants