Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(pl *ActivePlan, em *engine.Metadata, c client.Client, enh renderer.Enhancer, currentTime time.Time) (*v1beta1.PlanStatus, error)
Execute method takes a currently active plan and Metadata from the underlying operator and executes it. An execution loop iterates through plan phases, steps and tasks, executing them according to the execution strategy (serial/parallel). Task execution might result in success, error and fatal error. It is to distinguish between transient and fatal errors. Transient errors are retryable, so the corresponding Plan/Phase are still in progress:
└── first-operator-zljnmj └── Plan deploy (serial strategy) [IN_PROGRESS] └── Phase main [IN_PROGRESS] └── Step everything (ERROR)
However, this does not apply to fatal errors! Should a fatal error occur, we will, in the spirit of "fail-loud-and-proud", abort current execution, resulting in a plan status like:
└── first-operator-zljnmj └── Plan deploy (serial strategy) [FATAL_ERROR] └── Phase main [FATAL_ERROR] └── Step everything (FATAL_ERROR)
Furthermore, a transient ERROR during a step execution, means that the next step may be executed if the step strategy is "parallel". In case of a fatal error, it is returned alongside with the new plan status and published on the event bus.