workflow

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

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)

In terms of Status Message, we don't propagate the message up for fatal errors

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.

Types

type ActivePlan

type ActivePlan struct {
	Name string
	*kudoapi.PlanStatus
	Spec      *kudoapi.Plan
	Tasks     []kudoapi.Task
	Templates map[string]string
	Params    map[string]interface{}
	Pipes     map[string]string
}

ActivePlan wraps over all data that is needed for its execution including tasks, templates, parameters etc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL