shrun
Safe HaskellNone
LanguageGHC2021

Shrun.Command

Contents

Synopsis

Primary

runCommands Source #

Arguments

:: (HasCallStack, HasCommands env, HasLogging env m, MonadAsync m, MonadAtomic m, MonadEvaluate m, MonadMVar m, MonadReader env m, MonadRegionLogger m, MonadThrow m, MonadTime m) 
=> (HasCallStack => CommandP1 -> m ())

Individual command runner.

-> m () 

Responsible for scheduling commands.

Misc

data PredecessorResult Source #

Given a vertex v, PredecessorResult represents the status of all of its predecessors. Note that this refers to the status of the 'edge condition', not the predecessor command itself. For instance, if we have 'cmd1 | cmd2' and cmd1 fails, that is considered PredecessorSuccess.

The algebra is left-biased for identical constructors, otherwise takes the greatest in

  PredecessorSuccess < PredecessorFailure < PredecessorUnfinished

We have unfinished higher than failed as we only need to consider the overall success/failed status once, when everything has finished. This also makes logging simpler, as we only print non-debug messages for failure, and having unfinished first means we do not have multiple commands all printing the same "cannot start command ... due to other failure" log.

Constructors

PredecessorUnfinished Vertex

Some predecessor unfinished.

PredecessorSuccess

All predecessors finished and expectations matched. Note that this does not necessarily imply all predecessor commands finished successfully.

PredecessorFailure Bool Vertex

Some predecessor finished but did not match the expectation. The boolean is True iff failure was expected.