Skip to content
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

[nexus] Consider SagaUnwound instances Failed #6658

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Sep 24, 2024

Currently, instances whose active VMM is SagaUnwound appear externally as Stopped. We decided to report them as Stopped because start sagas are permitted to run for instances with SagaUnwound active VMMs, and --- at the time when the SagaUnwound VMM state was introduced, Failed instances could not be started. However, #6455 added the ability to restart Failed instances, and #6652 will permit them to be stopped. Therefore, we should recast instances with SagaUnwound active VMMs as Failed: they weren't asked politely to stop; instead, we attempted to start them and something went wrong...which sounds like Failed to me.

This becomes more important in light of #6638: if we will attempt automatically restart such instances, they should definitely appear to be Failed. The distinction between Failed and Stopped becomes that Failed means "this thing isn't running, but it's supposed to be; we may try to fix that for you if permitted to do so", while Stopped means "this thing isn't running and that's fine, because you asked for it to no longer be running". Thus, this commit changes SagaUnwound VMMs to appear Failed externally.

Currently, instances whose active VMM is `SagaUnwound` appear externally
as `Stopped`. We decided to report them as `Stopped` because start sagas
are permitted to run for instances with `SagaUnwound` active VMMs, and
--- at the time when the `SagaUnwound` VMM state was introduced,
`Failed` instances could not be started. However, #6455 added the
ability to restart `Failed` instances, and #6652 will permit them to be
stopped. Therefore, we should recast instances with `SagaUnwound` active
VMMs as `Failed`: they weren't asked politely to stop; instead, we
attempted to start them and something went wrong...which sounds like
`Failed` to me.

This becomes more important in light of #6638: if we will attempt
automatically restart such instances, they should definitely appear
to be `Failed`. The distinction between `Failed` and `Stopped` becomes
that `Failed` means "this thing isn't running, but it's supposed to be;
we may try to fix that for you if permitted to do so", while `Stopped`
means "this thing isn't running and that's fine, because you asked for
it to no longer be running". Thus, this commit changes `SagaUnwound`
VMMs to appear `Failed` externally.
@hawkw hawkw added api Related to the API. nexus Related to nexus labels Sep 24, 2024
@hawkw hawkw requested a review from gjcolombo September 24, 2024 20:44
@hawkw hawkw self-assigned this Sep 24, 2024
@hawkw hawkw merged commit 888f6a1 into main Sep 27, 2024
16 checks passed
@hawkw hawkw deleted the eliza/saga-unwound-is-failed branch September 27, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the API. nexus Related to nexus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants