From 8d668851832adffdb53f1a99b84aad7ac5847b56 Mon Sep 17 00:00:00 2001 From: Andre Detsch Date: Mon, 17 Nov 2025 16:25:38 -0300 Subject: [PATCH] update: Allow cancellation of an update in completing state Updates might get stuck in the "completing" state if we hit an error inside runnerImpl.complete. The user can't currently recover from this. Signed-off-by: Andre Detsch --- pkg/update/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/update/update.go b/pkg/update/update.go index c8946be..baa2010 100644 --- a/pkg/update/update.go +++ b/pkg/update/update.go @@ -372,7 +372,7 @@ func (u *runnerImpl) Start(ctx context.Context, options ...compose.StartOption) func (u *runnerImpl) Cancel(ctx context.Context) error { return u.store.lock(func(db *session) error { if !u.State.IsOneOf(StateCreated, StateInitializing, StateInitialized, - StateFetching, StateFetched, StateInstalling, StateInstalled) { + StateFetching, StateFetched, StateInstalling, StateInstalled, StateCompleting) { return fmt.Errorf("cannot cancel update when it is in state %q", u.State) }