From 888cb198569e94f87eb18e270085c6ba940927e6 Mon Sep 17 00:00:00 2001 From: Hiro Tamada Date: Wed, 24 Sep 2025 14:39:59 -0400 Subject: [PATCH 1/2] Undelete delete browsers from Invocation cancellation --- cmd/invoke.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/invoke.go b/cmd/invoke.go index 579f8d7..7c3b974 100644 --- a/cmd/invoke.go +++ b/cmd/invoke.go @@ -99,6 +99,9 @@ func runInvoke(cmd *cobra.Command, args []string) error { cleanupStarted.Store(true) defer close(cleanupDone) pterm.Warning.Println("Invocation cancelled...cleaning up...") + if err := client.Invocations.DeleteBrowsers(context.Background(), resp.ID, option.WithRequestTimeout(30*time.Second)); err != nil { + pterm.Error.Printf("Failed to cancel invocation: %v\n", err) + } if _, err := client.Invocations.Update( context.Background(), resp.ID, From a1d48e56263aa048d70f142a9fa80a0b540dbdbb Mon Sep 17 00:00:00 2001 From: Hiro Tamada Date: Wed, 24 Sep 2025 15:06:28 -0400 Subject: [PATCH 2/2] moar --- cmd/invoke.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/invoke.go b/cmd/invoke.go index 7c3b974..17cd032 100644 --- a/cmd/invoke.go +++ b/cmd/invoke.go @@ -99,9 +99,6 @@ func runInvoke(cmd *cobra.Command, args []string) error { cleanupStarted.Store(true) defer close(cleanupDone) pterm.Warning.Println("Invocation cancelled...cleaning up...") - if err := client.Invocations.DeleteBrowsers(context.Background(), resp.ID, option.WithRequestTimeout(30*time.Second)); err != nil { - pterm.Error.Printf("Failed to cancel invocation: %v\n", err) - } if _, err := client.Invocations.Update( context.Background(), resp.ID, @@ -113,6 +110,9 @@ func runInvoke(cmd *cobra.Command, args []string) error { ); err != nil { pterm.Error.Printf("Failed to mark invocation as failed: %v\n", err) } + if err := client.Invocations.DeleteBrowsers(context.Background(), resp.ID, option.WithRequestTimeout(30*time.Second)); err != nil { + pterm.Error.Printf("Failed to cancel invocation: %v\n", err) + } }) })