From a35f18b48b4a3d3ea2f491ef87bc2b60e467b244 Mon Sep 17 00:00:00 2001 From: Fabian Martinez <46371672+famarting@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:55:22 +0200 Subject: [PATCH] add options to PurgeWorkflow Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- workflow/client.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 0530f1a0..84d6fb34 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/go-chi/chi/v5 v5.1.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.6.0 - github.com/microsoft/durabletask-go v0.5.0 + github.com/microsoft/durabletask-go v0.5.1-0.20241014200046-fac9dd959f4d github.com/stretchr/testify v1.9.0 google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 diff --git a/go.sum b/go.sum index 95e128f4..dc1ef4bd 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/marusama/semaphore/v2 v2.5.0 h1:o/1QJD9DBYOWRnDhPwDVAXQn6mQYD0gZaS1Tpx6DJGM= github.com/marusama/semaphore/v2 v2.5.0/go.mod h1:z9nMiNUekt/LTpTUQdpp+4sJeYqUGpwMHfW0Z8V8fnQ= -github.com/microsoft/durabletask-go v0.5.0 h1:4DWBgg05wnkV/VwakaiPqZ4cARvATP74ZQJFcXVMC18= -github.com/microsoft/durabletask-go v0.5.0/go.mod h1:goe2gmMgLptCijMDQ7JsekaR86KjPUG64V9JDXvKBhE= +github.com/microsoft/durabletask-go v0.5.1-0.20241014200046-fac9dd959f4d h1:Phnx8/wPd9BM6RPIjlqNl8kAaFjtU+Sdw9CzmZd8Wsw= +github.com/microsoft/durabletask-go v0.5.1-0.20241014200046-fac9dd959f4d/go.mod h1:goe2gmMgLptCijMDQ7JsekaR86KjPUG64V9JDXvKBhE= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= diff --git a/workflow/client.go b/workflow/client.go index b416d02b..9c0639a1 100644 --- a/workflow/client.go +++ b/workflow/client.go @@ -216,9 +216,9 @@ func (c *Client) ResumeWorkflow(ctx context.Context, id, reason string) error { // PurgeWorkflow will purge a given workflow and return an error output. // NOTE: The workflow must be in a terminated or completed state. // TODO missing upstream support for api.PurgeOptions -func (c *Client) PurgeWorkflow(ctx context.Context, id string) error { +func (c *Client) PurgeWorkflow(ctx context.Context, id string, opts ...api.PurgeOptions) error { if id == "" { return errors.New("no workflow id specified") } - return c.taskHubClient.PurgeOrchestrationState(ctx, api.InstanceID(id)) + return c.taskHubClient.PurgeOrchestrationState(ctx, api.InstanceID(id), opts...) }