azriel91 / peace

Zero Stress Automation
https://peace.mk
Apache License 2.0
110 stars 1 forks source link

`StatesSerializer`: Store `ParamsSpecs`, `Params`, and `States` in `states_*.yaml` #142

Open azriel91 opened 1 year ago

azriel91 commented 1 year ago

Enables apply() to be called using state_clean() based on previous parameters.

Not super sure of the value of this just yet:

  1. We will probably want to store the actual resolved value for each params spec in the execution report, so users/developers can view the data from there for troubleshooting.
  2. For cleaning up state, we currently run state_current_try_exec.

    CleanCmd
        StatesDiscoverCmdBlock
            DiscoverForCurrent
            DiscoverFor::discover
            Item::state_current_try_exec

That's presumably more correct than saving the value.