Naming and API Refinements: Current / Desired (Goal) States and Commands
Closed this issue · 0 comments
azriel91 commented
In 0.0.10
and earlier:
StatesCurrent
is stored asstates_saved.yaml
, andStatesDesired
is stored asstates_desired.yaml
.- It is a surprise / hard to discover when one wants to read the previously stored
StatesCurrent
, and has to remember to useStatesSavedReadCmd
instead ofStatesCurrent..Cmd
. - It is additional effort when one has
StatesCurrent
, and needs to pass inStatesSaved
toEnsureCmd
-- they have to map the data type (related: #59). - "desired" doesn't capture the meaning that that is the state when the automation ensures.
To address these:
-
"desired" should be renamed to "goal".
-
StatesDesired*Cmd
renamed toStatesGoal*Cmd
-
states_desired.yaml
renamed tostates_goal.yaml
- Update docs.
Name bikeshedding:
- leave as is
- built / created (some things aren't built / created, and a bit obscure)
- complete / finished this? (may confuse user that it is "done")
- done (overloaded / hard to search / confusing)
- formed (overloaded term)
- forged (obscure)
- goal this? (semantic overlap with "target"?)
- manufactured (too long)
-
-
Rename
StatesSaved*
toStatesCurrentStored
. -
Add
StatesGoalStored*
to distinguish betweenStatesGoal
and what was saved. -
Make sure it is easy to go from
States*Stored
toStates*
.
Out of scope:
-
Rename
DiffCmd
toStatesDiffCmd
(?) -- what about diffing parameters or specs. -
Store state for each item, even if it was not discovered.
- Current states.
- Goal states.
- State diffs.
Fixes the ordering in stored files.
-
StatesDiffCmd
API to make it obvious whether we are diffing:Single profile, single flow:
- Discovered current and discovered goal states.
- Discovered current and discovered goal states.
- Saved current and discovered goal states.
- Discovered current and saved goal states.
Multi profile, single flow:
- Current states of both profiles.
- Goal states of both profiles.
Arbitrary two states.