You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inlining the state current discovery logic into ApplyCmd, and executing concurrently requires an intemediate outcomes rx, which is essentially re-implementing CmdBase.
Current logic of StatesDiscoverCmd takes in &mut CmdCtx.
For automation logic, StatesDiscoverCmd needs immutable references to the flow and parameter specs.
However, CmdCtx and SingleProfileSingleFlowView contain &mut Output, and &mut CmdProgressTracker.
This makes it hard to pass the container of flow / parameter information around.
Only the top level command needs &mut Output and &mut CmdProgressTracker to set up progress rendering.
We could move those two out of the view and into the CmdCtx, so that fn_exec can take in the *View and progress and outcome Senders, and this view can be passed to sub commands.
If we don't do that, then every command needs to pass through about 5 separate parameters.
So, we should split Output and CmdProgressTracker out of the view into ScopeViewAndOutput.
Currently:
EnsureCmd
andCleanCmd
delegate toApplyCmd
.ApplyCmd
andStatesDiscoverCmd
both collect outcomes to surface errors as a whole.What we would like for all commands:
*Cmd
invocations share one progress output.Use cases:
EnsureCmd
:Forward iteration through each item.
Calls
state_current
,apply_check
,apply_exec
in sequence.CleanCmd
Forward iteration through each item.
Calls
try_state_current
.Reverse iteration through each item.
Calls
apply_check
,apply_exec
in sequence.StatesDiscoverCmd
:Forward iteration through each item.
Calls
try_state_current
/try_state_desired
.The text was updated successfully, but these errors were encountered: