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

State history #385

Closed
wants to merge 1 commit into from
Closed

State history #385

wants to merge 1 commit into from

Conversation

brandonbloom
Copy link
Member

@brandonbloom brandonbloom commented Sep 30, 2021

This is very much work-in-progress. Just sharing for awareness and potential feedback.

The new interface in this PR supports component state storage independent from specification. This simplifies/isolates the logic for state handling. The new interface supports historical states, which will be useful for debugging. Isolated state storage also means that we may be able to support remote state storage, which is important for stacks shared between multiple users in a deployment scenario.

The intention is that many controller actions should be able to operate entirely on state without component specifications. This means that existing controllers might have to change to copy some additional information into the state to make that possible. This will help with recovering from bad specs (#270).

This PR is safe to land, but isn't necessarily worth it to do so, since the new state storage interface isn't actually in use yet. To avoid complex multi-stage migrations, I'll probably storm forward with the new component storage step as well, before merging or after merging, but before switching over.

To be clear: This is step 1, extracted from a very large refactor.

@brandonbloom brandonbloom changed the base branch from main to manifest October 19, 2021 01:05
@brandonbloom
Copy link
Member Author

Concepts need to evolve here. This component state store might actually be better as a resources store. The idea is that "component state" is roughly the most-recent/current "resource" assigned to the component. This is usually not an important distinction, but in the future, there may be two simultaneous resources for a component. For example, when deploying a new version to replace an old version with zero downtime.

Base automatically changed from manifest to main October 20, 2021 16:27
@brandonbloom
Copy link
Member Author

Closing this, as I'm basically going to rework all of the internals. May reuse a bunch of this code at some point, we'll see.

@brandonbloom brandonbloom deleted the state-history branch May 14, 2022 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant