Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

save instance state even when fail to spawn #51

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

vieiralucas
Copy link
Member

Closes #41

type InstanceStatus string

const (
InstanceStatusReady InstanceStatus = InstanceStatus("ready")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you prefer ready or success? I feel like success is a better counterpart to fail.

Nbd though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this ready status as a counterpart to fail. I think the "counterpart" of ready is like killed or dead, maybe we could go with alive?
The fail is a state in the middle, perhaps fail is also bad naming.

I tried to draw a graph and ended up with this, I'll use new names for all status:

  graph TD;
      spawning-->alive;
      spawning-->broken;
      alive-->refreshing;
      alive-->killing;
      refreshing-->alive;
      refreshing-->broken;
      broken-->refreshing;
      broken-->killing;
      killing-->broken;
      killing-->dead;

Btw, I think I like these new names 🤔

Also I think we should eventually implement tracking of all these status.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, but let's go with "faulty" instead of broken.

@vieiralucas vieiralucas merged commit d3433d2 into main Sep 2, 2023
2 checks passed
@vieiralucas vieiralucas deleted the save-state-on-spawn-error branch September 2, 2023 19:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save layer state when it errors out on apply
2 participants