-
Notifications
You must be signed in to change notification settings - Fork 4
update: Allow cancellation of an update in completing state #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 <andre.detsch@foundries.io>
| return u.store.lock(func(db *session) error { | ||
| if !u.State.IsOneOf(StateCreated, StateInitializing, StateInitialized, | ||
| StateFetching, StateFetched, StateInstalling, StateInstalled) { | ||
| StateFetching, StateFetched, StateInstalling, StateInstalled, StateCompleting) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will allow users to "cancel" an update that has been successfully started, as a result successful update is considered as "failing".
Maybe we rather should fix the "composectl update complete" implementation, so it guarantees moving the update state to the "completed" as long as the update is successfully started.
According to this composeapp/pkg/update/update.go Line 423 in 007dc4b
complete, so it is not quite clear how/why a user can get stuck at the "completing" state.
|
What about the I was hitting the situation of having a update stuck in What if the process gets killed before the we have the chance of setting |
The update will be in "completing" state and the next attempt will "complete" it. |
That's the case when complete is invoked with pruning and the latter fails because of some uninstall or remove failures. I think a client should do a few It looks like we need to adjust The key question is: Should we consider an update successful if all update apps were pulled, installed, and started successfully while the pruning failed or not? |
I think that is fine. It is OK to consider it successful. |
If so, then we cannot use |
|
Closed in favor of #105 and foundriesio/fioup#147 |
Updates might get stuck in the "completing" state if we hit an error inside runnerImpl.complete. The user can't currently recover from this.