From 1decafdbea5451fcebe7dfc3775e8dc2b8c60972 Mon Sep 17 00:00:00 2001 From: Fabian Martinez <46371672+famarting@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:49:12 +0200 Subject: [PATCH 1/2] add missing purge orchestration options --- client/client_grpc.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/client_grpc.go b/client/client_grpc.go index 8209d4d..a90d681 100644 --- a/client/client_grpc.go +++ b/client/client_grpc.go @@ -182,10 +182,15 @@ func (c *TaskHubGrpcClient) ResumeOrchestration(ctx context.Context, id api.Inst // PurgeOrchestrationState deletes the state of the specified orchestration instance. // // [api.api.ErrInstanceNotFound] is returned if the specified orchestration instance doesn't exist. -func (c *TaskHubGrpcClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID) error { +func (c *TaskHubGrpcClient) PurgeOrchestrationState(ctx context.Context, id api.InstanceID, opts ...api.PurgeOptions) error { req := &protos.PurgeInstancesRequest{ Request: &protos.PurgeInstancesRequest_InstanceId{InstanceId: string(id)}, } + for _, configure := range opts { + if err := configure(req); err != nil { + return fmt.Errorf("failed to configure purge request: %w", err) + } + } res, err := c.client.PurgeInstances(ctx, req) if err != nil { From 9c643959c1ccda36132c84f051b9c438733031a9 Mon Sep 17 00:00:00 2001 From: Chris Gillum Date: Mon, 14 Oct 2024 10:31:51 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3bd94f..0cceb00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.6.0] - Unreleased + +### Added + +- Add missing purge orchestration options ([#82](https://github.com/microsoft/durabletask-go/pull/82)) - by [@famarting](https://github.com/famarting) + ## [v0.5.0] - 2024-06-28 ### Added