v1alpha1

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API. +groupName=flyteworkflow.flyte.net

Index

Constants

View Source
const EndNodeID = "end-node"
View Source
const FlyteWorkflowKind = "flyteworkflow"
View Source
const StartNodeID = "start-node"

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var FlyteWorkflowGVK = SchemeGroupVersion.WithKind(FlyteWorkflowKind)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: flyteworkflow.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func GetCompiledFutureFile added in v0.1.9

func GetCompiledFutureFile() string

func GetFutureFile

func GetFutureFile() string

func IsPhaseTerminal

func IsPhaseTerminal(phase NodePhase) bool

func IsWorkflowPhaseTerminal

func IsWorkflowPhaseTerminal(p WorkflowPhase) bool

func Kind

func Kind(kind string) schema.GroupKind

GetKind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Alias

type Alias struct {
	core.Alias
}

func (*Alias) DeepCopy

func (in *Alias) DeepCopy() *Alias

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alias.

func (*Alias) DeepCopyInto

func (in *Alias) DeepCopyInto(out *Alias)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BaseNode

type BaseNode interface {
	GetID() NodeID
	GetKind() NodeKind
}

type BaseWorkflow

type BaseWorkflow interface {
	StartNode() ExecutableNode
	GetID() WorkflowID
	// From returns all nodes that can be reached directly
	// from the node with the given unique name.
	FromNode(name NodeID) ([]NodeID, error)
	GetNode(nodeID NodeID) (ExecutableNode, bool)
}

type BaseWorkflowWithStatus

type BaseWorkflowWithStatus interface {
	BaseWorkflow
	NodeStatusGetter
}

type Binding

type Binding struct {
	*core.Binding
}

func (*Binding) DeepCopy

func (in *Binding) DeepCopy() *Binding

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Binding.

func (*Binding) DeepCopyInto

func (in *Binding) DeepCopyInto(out *Binding)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Binding) MarshalJSON

func (in *Binding) MarshalJSON() ([]byte, error)

func (*Binding) UnmarshalJSON

func (in *Binding) UnmarshalJSON(b []byte) error

type BooleanExpression

type BooleanExpression struct {
	*core.BooleanExpression
}

func (*BooleanExpression) DeepCopy

func (in *BooleanExpression) DeepCopy() *BooleanExpression

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BooleanExpression.

func (*BooleanExpression) DeepCopyInto

func (in *BooleanExpression) DeepCopyInto(out *BooleanExpression)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (BooleanExpression) MarshalJSON

func (in BooleanExpression) MarshalJSON() ([]byte, error)

func (*BooleanExpression) UnmarshalJSON

func (in *BooleanExpression) UnmarshalJSON(b []byte) error

type BranchNodePhase

type BranchNodePhase int

A branchNode has its own Phases. These are used by the child nodes to ensure that the branch node is in the right state

const (
	BranchNodeNotYetEvaluated BranchNodePhase = iota
	BranchNodeSuccess
	BranchNodeError
)

func (BranchNodePhase) String

func (b BranchNodePhase) String() string

type BranchNodeSpec

type BranchNodeSpec struct {
	If       IfBlock    `json:"if"`
	ElseIf   []*IfBlock `json:"elseIf,omitempty"`
	Else     *NodeID    `json:"else,omitempty"`
	ElseFail *Error     `json:"elseFail,omitempty"`
}

func (*BranchNodeSpec) DeepCopy

func (in *BranchNodeSpec) DeepCopy() *BranchNodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchNodeSpec.

func (*BranchNodeSpec) DeepCopyInto

func (in *BranchNodeSpec) DeepCopyInto(out *BranchNodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BranchNodeSpec) GetElse

func (in *BranchNodeSpec) GetElse() *NodeID

func (*BranchNodeSpec) GetElseFail

func (in *BranchNodeSpec) GetElseFail() *core.Error

func (*BranchNodeSpec) GetElseIf

func (in *BranchNodeSpec) GetElseIf() []ExecutableIfBlock

func (*BranchNodeSpec) GetIf

func (in *BranchNodeSpec) GetIf() ExecutableIfBlock

type BranchNodeStatus

type BranchNodeStatus struct {
	MutableStruct
	Phase           BranchNodePhase `json:"phase"`
	FinalizedNodeID *NodeID         `json:"finalNodeId"`
}

func (*BranchNodeStatus) DeepCopy

func (in *BranchNodeStatus) DeepCopy() *BranchNodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchNodeStatus.

func (*BranchNodeStatus) DeepCopyInto

func (in *BranchNodeStatus) DeepCopyInto(out *BranchNodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BranchNodeStatus) Equals

func (in *BranchNodeStatus) Equals(other *BranchNodeStatus) bool

func (*BranchNodeStatus) GetFinalizedNode

func (in *BranchNodeStatus) GetFinalizedNode() *NodeID

func (*BranchNodeStatus) GetPhase

func (in *BranchNodeStatus) GetPhase() BranchNodePhase

func (*BranchNodeStatus) SetBranchNodeError

func (in *BranchNodeStatus) SetBranchNodeError()

func (*BranchNodeStatus) SetBranchNodeSuccess

func (in *BranchNodeStatus) SetBranchNodeSuccess(id NodeID)

type Connections

type Connections struct {
	DownstreamEdges map[NodeID][]NodeID
	UpstreamEdges   map[NodeID][]NodeID
}

func (*Connections) DeepCopy

func (in *Connections) DeepCopy() *Connections

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Connections.

func (*Connections) DeepCopyInto

func (in *Connections) DeepCopyInto(out *Connections)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Connections) MarshalJSON

func (in *Connections) MarshalJSON() ([]byte, error)

func (*Connections) UnmarshalJSON

func (in *Connections) UnmarshalJSON(b []byte) error

type CustomState

type CustomState map[string]interface{}

func (*CustomState) DeepCopy

func (in *CustomState) DeepCopy() *CustomState

func (*CustomState) DeepCopyInto

func (in *CustomState) DeepCopyInto(out *CustomState)

THIS IS NOT AUTO GENERATED

type DataReference

type DataReference = storage.DataReference

func GetInputsFile

func GetInputsFile(inputDir DataReference) DataReference

func GetOutputErrorFile

func GetOutputErrorFile(inputDir DataReference) DataReference

func GetOutputsFile

func GetOutputsFile(outputDir DataReference) DataReference

type DynamicNodePhase

type DynamicNodePhase int
const (
	DynamicNodePhaseNone DynamicNodePhase = iota
	DynamicNodePhaseExecuting
	DynamicNodePhaseFailing
)

type DynamicNodeStatus

type DynamicNodeStatus struct {
	MutableStruct
	Phase  DynamicNodePhase `json:"phase"`
	Reason string           `json:"reason"`
}

func (*DynamicNodeStatus) DeepCopy

func (in *DynamicNodeStatus) DeepCopy() *DynamicNodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicNodeStatus.

func (*DynamicNodeStatus) DeepCopyInto

func (in *DynamicNodeStatus) DeepCopyInto(out *DynamicNodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DynamicNodeStatus) Equals

func (in *DynamicNodeStatus) Equals(o *DynamicNodeStatus) bool

func (*DynamicNodeStatus) GetDynamicNodePhase

func (in *DynamicNodeStatus) GetDynamicNodePhase() DynamicNodePhase

func (*DynamicNodeStatus) GetDynamicNodeReason added in v0.1.15

func (in *DynamicNodeStatus) GetDynamicNodeReason() string

func (*DynamicNodeStatus) SetDynamicNodePhase

func (in *DynamicNodeStatus) SetDynamicNodePhase(phase DynamicNodePhase)

func (*DynamicNodeStatus) SetDynamicNodeReason added in v0.1.15

func (in *DynamicNodeStatus) SetDynamicNodeReason(reason string)

type EnqueueWorkflow

type EnqueueWorkflow func(workflowID WorkflowID)

Simple callback that can be used to indicate that the workflow with WorkflowID should be re-enqueued for examination.

type Error

type Error struct {
	*core.Error
}

func (*Error) DeepCopy

func (in *Error) DeepCopy() *Error

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Error.

func (*Error) DeepCopyInto

func (in *Error) DeepCopyInto(out *Error)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Error) MarshalJSON

func (in Error) MarshalJSON() ([]byte, error)

func (Error) UnmarshalJSON

func (in Error) UnmarshalJSON(b []byte) error

type ExecutableBranchNode

type ExecutableBranchNode interface {
	GetIf() ExecutableIfBlock
	GetElse() *NodeID
	GetElseIf() []ExecutableIfBlock
	GetElseFail() *core.Error
}

Interface for Branch node. All the methods are purely read only except for the GetExecutionStatus. p returns ExecutableBranchNodeStatus, which permits some mutations

type ExecutableBranchNodeStatus

type ExecutableBranchNodeStatus interface {
	GetPhase() BranchNodePhase
	GetFinalizedNode() *NodeID
}

Interface for branch node status. This is the mutable API for a branch node

type ExecutableDynamicNodeStatus

type ExecutableDynamicNodeStatus interface {
	GetDynamicNodePhase() DynamicNodePhase
	GetDynamicNodeReason() string
}

Interface for dynamic node status.

type ExecutableIfBlock

type ExecutableIfBlock interface {
	GetCondition() *core.BooleanExpression
	GetThenNode() *NodeID
}

Interface for the executable If block

type ExecutableNode

type ExecutableNode interface {
	BaseNode
	IsStartNode() bool
	IsEndNode() bool
	GetTaskID() *TaskID
	GetBranchNode() ExecutableBranchNode
	GetWorkflowNode() ExecutableWorkflowNode
	GetOutputAlias() []Alias
	GetInputBindings() []*Binding
	GetResources() *v1.ResourceRequirements
	GetConfig() *v1.ConfigMap
	GetRetryStrategy() *RetryStrategy
	GetExecutionDeadline() *time.Duration
	GetActiveDeadline() *time.Duration
}

Interface for the Executable Node

type ExecutableNodeStatus

type ExecutableNodeStatus interface {
	NodeStatusGetter
	MutableNodeStatus
	NodeStatusVisitor
	GetPhase() NodePhase
	GetQueuedAt() *metav1.Time
	GetStoppedAt() *metav1.Time
	GetStartedAt() *metav1.Time
	GetLastUpdatedAt() *metav1.Time
	GetLastAttemptStartedAt() *metav1.Time
	GetParentNodeID() *NodeID
	GetParentTaskID() *core.TaskExecutionIdentifier
	GetDataDir() DataReference
	GetOutputDir() DataReference
	GetMessage() string
	GetAttempts() uint32
	GetWorkflowNodeStatus() ExecutableWorkflowNodeStatus
	GetTaskNodeStatus() ExecutableTaskNodeStatus

	IsCached() bool
}

Interface for a Node p. This provides a mutable API.

type ExecutableSubWorkflow

type ExecutableSubWorkflow interface {
	BaseWorkflow
	GetOutputBindings() []*Binding
	GetOnFailureNode() ExecutableNode
	GetNodes() []NodeID
	GetConnections() *Connections
	GetOutputs() *OutputVarMap
}

This interface captures the methods available on any workflow (top level or child). The Meta section is available only for the top level workflow

type ExecutableSubWorkflowNodeStatus

type ExecutableSubWorkflowNodeStatus interface {
	GetPhase() WorkflowPhase
}

type ExecutableTask

type ExecutableTask interface {
	TaskType() TaskType
	CoreTask() *core.TaskTemplate
}

Interface for a Task that can be executed

type ExecutableTaskNodeStatus

type ExecutableTaskNodeStatus interface {
	GetPhase() int
	GetPhaseVersion() uint32
	GetPluginState() []byte
	GetPluginStateVersion() uint32
	GetBarrierClockTick() uint32
	GetLastPhaseUpdatedAt() time.Time
}

type ExecutableWorkflow

type ExecutableWorkflow interface {
	ExecutableSubWorkflow
	WorkflowMetaExtended
	NodeStatusGetter
}

A Top level Workflow is a combination of WorkflowMeta and an ExecutableSubWorkflow

type ExecutableWorkflowNode

type ExecutableWorkflowNode interface {
	GetLaunchPlanRefID() *LaunchPlanRefID
	GetSubWorkflowRef() *WorkflowID
}

Interface for a Child Workflow Node

type ExecutableWorkflowNodeStatus

type ExecutableWorkflowNodeStatus interface {
	GetWorkflowNodePhase() WorkflowNodePhase
}

type ExecutableWorkflowStatus

type ExecutableWorkflowStatus interface {
	NodeStatusGetter
	UpdatePhase(p WorkflowPhase, msg string)
	GetPhase() WorkflowPhase
	GetStoppedAt() *metav1.Time
	GetStartedAt() *metav1.Time
	GetLastUpdatedAt() *metav1.Time
	IsTerminated() bool
	GetMessage() string
	SetDataDir(DataReference)
	GetDataDir() DataReference
	GetOutputReference() DataReference
	SetOutputReference(reference DataReference)
	IncFailedAttempts()
	SetMessage(msg string)
	ConstructNodeDataDir(ctx context.Context, name NodeID) (storage.DataReference, error)
}

Interface for the Workflow p. This is the mutable portion for a Workflow

type ExecutionID

type ExecutionID = WorkflowExecutionIdentifier

type FlyteWorkflow

type FlyteWorkflow struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	*WorkflowSpec     `json:"spec"`
	Inputs            *Inputs                      `json:"inputs,omitempty"`
	ExecutionID       ExecutionID                  `json:"executionId"`
	Tasks             map[TaskID]*TaskSpec         `json:"tasks"`
	SubWorkflows      map[WorkflowID]*WorkflowSpec `json:"subWorkflows,omitempty"`
	// StartTime before the system will actively try to mark it failed and kill associated containers.
	// Value must be a positive integer.
	// +optional
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
	// Specifies the time when the workflow has been accepted into the system.
	AcceptedAt *metav1.Time `json:"acceptedAt,omitempty"`
	// ServiceAccountName is the name of the ServiceAccount to use to run this pod.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"`
	// Status is the only mutable section in the workflow. It holds all the execution information
	Status WorkflowStatus `json:"status,omitempty"`

	// non-Serialized fields
	DataReferenceConstructor storage.ReferenceConstructor `json:"-"`
}

FlyteWorkflow: represents one Execution Workflow object

func (*FlyteWorkflow) DeepCopy

func (in *FlyteWorkflow) DeepCopy() *FlyteWorkflow

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlyteWorkflow.

func (*FlyteWorkflow) DeepCopyInto

func (in *FlyteWorkflow) DeepCopyInto(out *FlyteWorkflow)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FlyteWorkflow) DeepCopyObject

func (in *FlyteWorkflow) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*FlyteWorkflow) FindSubWorkflow

func (in *FlyteWorkflow) FindSubWorkflow(subID WorkflowID) ExecutableSubWorkflow

func (*FlyteWorkflow) GetExecutionID

func (in *FlyteWorkflow) GetExecutionID() ExecutionID

func (*FlyteWorkflow) GetExecutionStatus

func (in *FlyteWorkflow) GetExecutionStatus() ExecutableWorkflowStatus

func (*FlyteWorkflow) GetK8sWorkflowID

func (in *FlyteWorkflow) GetK8sWorkflowID() types.NamespacedName

func (*FlyteWorkflow) GetNodeExecutionStatus

func (in *FlyteWorkflow) GetNodeExecutionStatus(ctx context.Context, id NodeID) ExecutableNodeStatus

func (*FlyteWorkflow) GetOwnerReference added in v0.1.13

func (in *FlyteWorkflow) GetOwnerReference() metav1.OwnerReference

func (*FlyteWorkflow) GetServiceAccountName

func (in *FlyteWorkflow) GetServiceAccountName() string

func (*FlyteWorkflow) GetTask

func (in *FlyteWorkflow) GetTask(id TaskID) (ExecutableTask, error)

type FlyteWorkflowList

type FlyteWorkflowList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []FlyteWorkflow `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object FlyteWorkflowList is a list of FlyteWorkflow resources

func (*FlyteWorkflowList) DeepCopy

func (in *FlyteWorkflowList) DeepCopy() *FlyteWorkflowList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlyteWorkflowList.

func (*FlyteWorkflowList) DeepCopyInto

func (in *FlyteWorkflowList) DeepCopyInto(out *FlyteWorkflowList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FlyteWorkflowList) DeepCopyObject

func (in *FlyteWorkflowList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type Identifier

type Identifier struct {
	*core.Identifier
}

func (*Identifier) DeepCopy

func (in *Identifier) DeepCopy() *Identifier

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identifier.

func (*Identifier) DeepCopyInto

func (in *Identifier) DeepCopyInto(out *Identifier)

func (*Identifier) MarshalJSON

func (in *Identifier) MarshalJSON() ([]byte, error)

func (*Identifier) UnmarshalJSON

func (in *Identifier) UnmarshalJSON(b []byte) error

type IfBlock

type IfBlock struct {
	Condition BooleanExpression `json:"condition"`
	ThenNode  *NodeID           `json:"then"`
}

func (*IfBlock) DeepCopy

func (in *IfBlock) DeepCopy() *IfBlock

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IfBlock.

func (*IfBlock) DeepCopyInto

func (in *IfBlock) DeepCopyInto(out *IfBlock)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (IfBlock) GetCondition

func (in IfBlock) GetCondition() *core.BooleanExpression

func (*IfBlock) GetThenNode

func (in *IfBlock) GetThenNode() *NodeID

type Inputs

type Inputs struct {
	*core.LiteralMap
}

func (*Inputs) DeepCopy

func (in *Inputs) DeepCopy() *Inputs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Inputs.

func (*Inputs) DeepCopyInto

func (in *Inputs) DeepCopyInto(out *Inputs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Inputs) MarshalJSON

func (in *Inputs) MarshalJSON() ([]byte, error)

func (*Inputs) UnmarshalJSON

func (in *Inputs) UnmarshalJSON(b []byte) error

type LaunchPlanRefID

type LaunchPlanRefID = Identifier

type Mutable added in v0.1.25

type Mutable interface {
	IsDirty() bool
}

type MutableBranchNodeStatus

type MutableBranchNodeStatus interface {
	Mutable
	ExecutableBranchNodeStatus

	SetBranchNodeError()
	SetBranchNodeSuccess(id NodeID)
}

type MutableDynamicNodeStatus

type MutableDynamicNodeStatus interface {
	Mutable
	ExecutableDynamicNodeStatus

	SetDynamicNodePhase(phase DynamicNodePhase)
	SetDynamicNodeReason(reason string)
}

type MutableNodeStatus

type MutableNodeStatus interface {
	Mutable
	// Mutation API's
	SetDataDir(DataReference)
	SetOutputDir(d DataReference)
	SetParentNodeID(n *NodeID)
	SetParentTaskID(t *core.TaskExecutionIdentifier)
	UpdatePhase(phase NodePhase, occurredAt metav1.Time, reason string)
	IncrementAttempts() uint32
	SetCached()
	ResetDirty()

	GetBranchStatus() MutableBranchNodeStatus
	GetOrCreateBranchStatus() MutableBranchNodeStatus
	GetWorkflowStatus() MutableWorkflowNodeStatus
	GetOrCreateWorkflowStatus() MutableWorkflowNodeStatus

	ClearWorkflowStatus()
	GetOrCreateTaskStatus() MutableTaskNodeStatus
	GetTaskStatus() MutableTaskNodeStatus
	ClearTaskStatus()
	GetOrCreateDynamicNodeStatus() MutableDynamicNodeStatus
	GetDynamicNodeStatus() MutableDynamicNodeStatus
	ClearDynamicNodeStatus()
	ClearLastAttemptStartedAt()
	ClearSubNodeStatus()
}

type MutableStruct added in v0.1.25

type MutableStruct struct {
	// contains filtered or unexported fields
}

func (*MutableStruct) DeepCopy added in v0.1.25

func (in *MutableStruct) DeepCopy() *MutableStruct

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutableStruct.

func (*MutableStruct) DeepCopyInto added in v0.1.25

func (in *MutableStruct) DeepCopyInto(out *MutableStruct)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (MutableStruct) IsDirty added in v0.1.25

func (in MutableStruct) IsDirty() bool

func (*MutableStruct) ResetDirty added in v0.1.25

func (in *MutableStruct) ResetDirty()

For testing only

func (*MutableStruct) SetDirty added in v0.1.25

func (in *MutableStruct) SetDirty()

type MutableSubWorkflowNodeStatus

type MutableSubWorkflowNodeStatus interface {
	Mutable
	ExecutableSubWorkflowNodeStatus
	SetPhase(phase WorkflowPhase)
}

type MutableTaskNodeStatus

type MutableTaskNodeStatus interface {
	Mutable
	ExecutableTaskNodeStatus
	SetPhase(phase int)
	SetLastPhaseUpdatedAt(updatedAt time.Time)
	SetPhaseVersion(version uint32)
	SetPluginState([]byte)
	SetPluginStateVersion(uint32)
	SetBarrierClockTick(tick uint32)
}

type MutableWorkflowNodeStatus

type MutableWorkflowNodeStatus interface {
	Mutable
	ExecutableWorkflowNodeStatus
	SetWorkflowNodePhase(phase WorkflowNodePhase)
}

type NodeID

type NodeID = string

type NodeKind

type NodeKind string

NodeKind refers to the type of Node.

const (
	// TODO Should we default a NodeKindTask to empty? thus we can assume all unspecified nodetypes as task
	NodeKindTask     NodeKind = "task"
	NodeKindBranch   NodeKind = "branch"   // A Branch node with conditions
	NodeKindWorkflow NodeKind = "workflow" // Either an inline workflow or a remote workflow definition
	NodeKindStart    NodeKind = "start"    // Start node is a special node
	NodeKindEnd      NodeKind = "end"
)

func (NodeKind) String

func (n NodeKind) String() string

type NodeMetadata

type NodeMetadata struct {
	core.NodeMetadata
}

func (*NodeMetadata) DeepCopy

func (in *NodeMetadata) DeepCopy() *NodeMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetadata.

func (*NodeMetadata) DeepCopyInto

func (in *NodeMetadata) DeepCopyInto(out *NodeMetadata)

type NodePhase

type NodePhase int

NodePhase indicates the current state of the Node (phase). A node progresses through these states

const (
	NodePhaseNotYetStarted NodePhase = iota
	NodePhaseQueued
	NodePhaseRunning
	NodePhaseFailing
	NodePhaseSucceeding
	NodePhaseSucceeded
	NodePhaseFailed
	NodePhaseSkipped
	NodePhaseRetryableFailure
	NodePhaseTimingOut
	NodePhaseTimedOut
)

func (NodePhase) String

func (p NodePhase) String() string

type NodeSpec

type NodeSpec struct {
	ID            NodeID                        `json:"id"`
	Resources     *typesv1.ResourceRequirements `json:"resources,omitempty"`
	Kind          NodeKind                      `json:"kind"`
	BranchNode    *BranchNodeSpec               `json:"branch,omitempty"`
	TaskRef       *TaskID                       `json:"task,omitempty"`
	WorkflowNode  *WorkflowNodeSpec             `json:"workflow,omitempty"`
	InputBindings []*Binding                    `json:"inputBindings,omitempty"`
	Config        *typesv1.ConfigMap            `json:"config,omitempty"`
	RetryStrategy *RetryStrategy                `json:"retry,omitempty"`
	OutputAliases []Alias                       `json:"outputAlias,omitempty"`

	// SecurityContext holds pod-level security attributes and common container settings.
	// Optional: Defaults to empty.  See type description for default values of each field.
	// +optional
	SecurityContext *typesv1.PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,14,opt,name=securityContext"`
	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
	// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
	// in the case of docker, only DockerConfig type secrets are honored.
	// More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	ImagePullSecrets []typesv1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"`
	// Specifies the hostname of the Pod
	// If not specified, the pod's hostname will be set to a system-defined value.
	// +optional
	Hostname string `json:"hostname,omitempty" protobuf:"bytes,16,opt,name=hostname"`
	// If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
	// If not specified, the pod will not have a domainname at all.
	// +optional
	Subdomain string `json:"subdomain,omitempty" protobuf:"bytes,17,opt,name=subdomain"`
	// If specified, the pod's scheduling constraints
	// +optional
	Affinity *typesv1.Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"`
	// If specified, the pod will be dispatched by specified scheduler.
	// If not specified, the pod will be dispatched by default scheduler.
	// +optional
	SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,19,opt,name=schedulerName"`
	// If specified, the pod's tolerations.
	// +optional
	Tolerations []typesv1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
	// Node execution timeout
	ExecutionDeadline *v1.Duration `json:"executionDeadline,omitempty"`
	// StartTime before the system will actively try to mark it failed and kill associated containers.
	// Value must be a positive integer. This includes time spent waiting in the queue.
	// +optional
	ActiveDeadline *v1.Duration `json:"activeDeadline,omitempty"`
	// TODO 12-10-2019: For backward compatibility, remove it in future release
	ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"`
}

func (*NodeSpec) DeepCopy

func (in *NodeSpec) DeepCopy() *NodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.

func (*NodeSpec) DeepCopyInto

func (in *NodeSpec) DeepCopyInto(out *NodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeSpec) GetActiveDeadline added in v0.1.17

func (in *NodeSpec) GetActiveDeadline() *time.Duration

func (*NodeSpec) GetBranchNode

func (in *NodeSpec) GetBranchNode() ExecutableBranchNode

func (*NodeSpec) GetConfig

func (in *NodeSpec) GetConfig() *typesv1.ConfigMap

func (*NodeSpec) GetExecutionDeadline added in v0.1.17

func (in *NodeSpec) GetExecutionDeadline() *time.Duration

func (*NodeSpec) GetID

func (in *NodeSpec) GetID() NodeID

func (*NodeSpec) GetInputBindings

func (in *NodeSpec) GetInputBindings() []*Binding

func (*NodeSpec) GetKind

func (in *NodeSpec) GetKind() NodeKind

func (*NodeSpec) GetOutputAlias

func (in *NodeSpec) GetOutputAlias() []Alias

func (*NodeSpec) GetResources

func (in *NodeSpec) GetResources() *typesv1.ResourceRequirements

func (*NodeSpec) GetRetryStrategy

func (in *NodeSpec) GetRetryStrategy() *RetryStrategy

func (*NodeSpec) GetTaskID

func (in *NodeSpec) GetTaskID() *TaskID

func (*NodeSpec) GetWorkflowNode

func (in *NodeSpec) GetWorkflowNode() ExecutableWorkflowNode

func (*NodeSpec) IsEndNode

func (in *NodeSpec) IsEndNode() bool

func (*NodeSpec) IsStartNode

func (in *NodeSpec) IsStartNode() bool

type NodeStatus

type NodeStatus struct {
	MutableStruct
	Phase                NodePhase     `json:"phase"`
	QueuedAt             *metav1.Time  `json:"queuedAt,omitempty"`
	StartedAt            *metav1.Time  `json:"startedAt,omitempty"`
	StoppedAt            *metav1.Time  `json:"stoppedAt,omitempty"`
	LastUpdatedAt        *metav1.Time  `json:"lastUpdatedAt,omitempty"`
	LastAttemptStartedAt *metav1.Time  `json:"laStartedAt,omitempty"`
	Message              string        `json:"message,omitempty"`
	DataDir              DataReference `json:"-"`
	OutputDir            DataReference `json:"-"`
	Attempts             uint32        `json:"attempts"`
	Cached               bool          `json:"cached"`

	// This is useful only for branch nodes. If this is set, then it can be used to determine if execution can proceed
	ParentNode    *NodeID                  `json:"parentNode,omitempty"`
	ParentTask    *TaskExecutionIdentifier `json:"-"`
	BranchStatus  *BranchNodeStatus        `json:"branchStatus,omitempty"`
	SubNodeStatus map[NodeID]*NodeStatus   `json:"subNodeStatus,omitempty"`

	// TODO not used delete
	WorkflowNodeStatus *WorkflowNodeStatus `json:"workflowNodeStatus,omitempty"`

	TaskNodeStatus    *TaskNodeStatus    `json:",omitempty"`
	DynamicNodeStatus *DynamicNodeStatus `json:"dynamicNodeStatus,omitempty"`

	// Not Persisted
	DataReferenceConstructor storage.ReferenceConstructor `json:"-"`
}

func (*NodeStatus) ClearDynamicNodeStatus

func (in *NodeStatus) ClearDynamicNodeStatus()

func (*NodeStatus) ClearLastAttemptStartedAt added in v0.1.17

func (in *NodeStatus) ClearLastAttemptStartedAt()

func (*NodeStatus) ClearSubNodeStatus added in v0.1.25

func (in *NodeStatus) ClearSubNodeStatus()

func (*NodeStatus) ClearTaskStatus

func (in *NodeStatus) ClearTaskStatus()

func (*NodeStatus) ClearWorkflowStatus

func (in *NodeStatus) ClearWorkflowStatus()

func (*NodeStatus) DeepCopy

func (in *NodeStatus) DeepCopy() *NodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.

func (*NodeStatus) DeepCopyInto

func (in *NodeStatus) DeepCopyInto(out *NodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeStatus) Equals

func (in *NodeStatus) Equals(other *NodeStatus) bool

func (*NodeStatus) GetAttempts

func (in *NodeStatus) GetAttempts() uint32

func (*NodeStatus) GetBranchStatus added in v0.1.13

func (in *NodeStatus) GetBranchStatus() MutableBranchNodeStatus

func (*NodeStatus) GetDataDir

func (in *NodeStatus) GetDataDir() DataReference

func (NodeStatus) GetDynamicNodeStatus added in v0.1.13

func (in NodeStatus) GetDynamicNodeStatus() MutableDynamicNodeStatus

func (*NodeStatus) GetLastAttemptStartedAt added in v0.1.17

func (in *NodeStatus) GetLastAttemptStartedAt() *metav1.Time

func (*NodeStatus) GetLastUpdatedAt

func (in *NodeStatus) GetLastUpdatedAt() *metav1.Time

func (*NodeStatus) GetMessage

func (in *NodeStatus) GetMessage() string

func (*NodeStatus) GetNodeExecutionStatus

func (in *NodeStatus) GetNodeExecutionStatus(ctx context.Context, id NodeID) ExecutableNodeStatus

func (*NodeStatus) GetOrCreateBranchStatus

func (in *NodeStatus) GetOrCreateBranchStatus() MutableBranchNodeStatus

func (*NodeStatus) GetOrCreateDynamicNodeStatus

func (in *NodeStatus) GetOrCreateDynamicNodeStatus() MutableDynamicNodeStatus

func (*NodeStatus) GetOrCreateTaskStatus

func (in *NodeStatus) GetOrCreateTaskStatus() MutableTaskNodeStatus

func (*NodeStatus) GetOrCreateWorkflowStatus

func (in *NodeStatus) GetOrCreateWorkflowStatus() MutableWorkflowNodeStatus

func (*NodeStatus) GetOutputDir added in v0.1.27

func (in *NodeStatus) GetOutputDir() DataReference

func (*NodeStatus) GetParentNodeID

func (in *NodeStatus) GetParentNodeID() *NodeID

func (*NodeStatus) GetParentTaskID

func (in *NodeStatus) GetParentTaskID() *core.TaskExecutionIdentifier

func (*NodeStatus) GetPhase

func (in *NodeStatus) GetPhase() NodePhase

func (*NodeStatus) GetQueuedAt

func (in *NodeStatus) GetQueuedAt() *metav1.Time

func (*NodeStatus) GetStartedAt

func (in *NodeStatus) GetStartedAt() *metav1.Time

func (*NodeStatus) GetStoppedAt

func (in *NodeStatus) GetStoppedAt() *metav1.Time

func (NodeStatus) GetTaskNodeStatus

func (in NodeStatus) GetTaskNodeStatus() ExecutableTaskNodeStatus

func (*NodeStatus) GetTaskStatus added in v0.1.13

func (in *NodeStatus) GetTaskStatus() MutableTaskNodeStatus

func (*NodeStatus) GetWorkflowNodeStatus

func (in *NodeStatus) GetWorkflowNodeStatus() ExecutableWorkflowNodeStatus

func (*NodeStatus) GetWorkflowStatus added in v0.1.13

func (in *NodeStatus) GetWorkflowStatus() MutableWorkflowNodeStatus

func (*NodeStatus) IncrementAttempts

func (in *NodeStatus) IncrementAttempts() uint32

func (*NodeStatus) IsCached

func (in *NodeStatus) IsCached() bool

func (*NodeStatus) IsDirty

func (in *NodeStatus) IsDirty() bool

func (*NodeStatus) IsTerminated

func (in *NodeStatus) IsTerminated() bool

func (*NodeStatus) ResetDirty

func (in *NodeStatus) ResetDirty()

ResetDirty is for unit tests, shouldn't be used in actual logic.

func (*NodeStatus) SetCached

func (in *NodeStatus) SetCached()

func (*NodeStatus) SetDataDir

func (in *NodeStatus) SetDataDir(d DataReference)

func (*NodeStatus) SetOutputDir added in v0.1.27

func (in *NodeStatus) SetOutputDir(d DataReference)

func (*NodeStatus) SetParentNodeID

func (in *NodeStatus) SetParentNodeID(n *NodeID)

func (*NodeStatus) SetParentTaskID

func (in *NodeStatus) SetParentTaskID(t *core.TaskExecutionIdentifier)

func (*NodeStatus) UpdatePhase

func (in *NodeStatus) UpdatePhase(p NodePhase, occurredAt metav1.Time, reason string)

func (NodeStatus) VisitNodeStatuses

func (in NodeStatus) VisitNodeStatuses(visitor NodeStatusVisitFn)

type NodeStatusGetter

type NodeStatusGetter interface {
	GetNodeExecutionStatus(ctx context.Context, id NodeID) ExecutableNodeStatus
}

type NodeStatusMap

type NodeStatusMap = map[NodeID]ExecutableNodeStatus

type NodeStatusVisitFn

type NodeStatusVisitFn = func(node NodeID, status ExecutableNodeStatus)

type NodeStatusVisitor

type NodeStatusVisitor interface {
	VisitNodeStatuses(visitor NodeStatusVisitFn)
}

type OutputVarMap

type OutputVarMap struct {
	*core.VariableMap
}

func (*OutputVarMap) DeepCopy

func (in *OutputVarMap) DeepCopy() *OutputVarMap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutputVarMap.

func (*OutputVarMap) DeepCopyInto

func (in *OutputVarMap) DeepCopyInto(out *OutputVarMap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OutputVarMap) MarshalJSON

func (in *OutputVarMap) MarshalJSON() ([]byte, error)

func (*OutputVarMap) UnmarshalJSON

func (in *OutputVarMap) UnmarshalJSON(b []byte) error

type RetryStrategy

type RetryStrategy struct {
	// MinAttempts implies the atleast n attempts to try this node before giving up. The atleast here is because we may
	// fail to write the attempt information and end up retrying again.
	// Also `0` and `1` both mean atleast one attempt will be done. 0 is a degenerate case.
	MinAttempts *int `json:"minAttempts"`
}

Strategy to be used to Retry a node that is in RetryableFailure state

func (*RetryStrategy) DeepCopy

func (in *RetryStrategy) DeepCopy() *RetryStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryStrategy.

func (*RetryStrategy) DeepCopyInto

func (in *RetryStrategy) DeepCopyInto(out *RetryStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskDetailsGetter added in v0.1.13

type TaskDetailsGetter interface {
	GetTask(id TaskID) (ExecutableTask, error)
}

type TaskExecutionIdentifier

type TaskExecutionIdentifier struct {
	*core.TaskExecutionIdentifier
}

func (*TaskExecutionIdentifier) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskExecutionIdentifier.

func (*TaskExecutionIdentifier) DeepCopyInto

func (in *TaskExecutionIdentifier) DeepCopyInto(out *TaskExecutionIdentifier)

type TaskID

type TaskID = string

type TaskNodeStatus

type TaskNodeStatus struct {
	MutableStruct
	Phase              int       `json:"phase,omitempty"`
	PhaseVersion       uint32    `json:"phaseVersion,omitempty"`
	PluginState        []byte    `json:"pState,omitempty"`
	PluginStateVersion uint32    `json:"psv,omitempty"`
	BarrierClockTick   uint32    `json:"tick,omitempty"`
	LastPhaseUpdatedAt time.Time `json:"updAt,omitempty"`
}

func (*TaskNodeStatus) DeepCopy

func (in *TaskNodeStatus) DeepCopy() *TaskNodeStatus

func (*TaskNodeStatus) DeepCopyInto

func (in *TaskNodeStatus) DeepCopyInto(out *TaskNodeStatus)

func (*TaskNodeStatus) Equals added in v0.1.13

func (in *TaskNodeStatus) Equals(other *TaskNodeStatus) bool

func (*TaskNodeStatus) GetBarrierClockTick added in v0.1.13

func (in *TaskNodeStatus) GetBarrierClockTick() uint32

func (TaskNodeStatus) GetLastPhaseUpdatedAt added in v0.1.27

func (in TaskNodeStatus) GetLastPhaseUpdatedAt() time.Time

func (TaskNodeStatus) GetPhase

func (in TaskNodeStatus) GetPhase() int

func (TaskNodeStatus) GetPhaseVersion

func (in TaskNodeStatus) GetPhaseVersion() uint32

func (*TaskNodeStatus) GetPluginState added in v0.1.13

func (in *TaskNodeStatus) GetPluginState() []byte

func (*TaskNodeStatus) GetPluginStateVersion added in v0.1.13

func (in *TaskNodeStatus) GetPluginStateVersion() uint32

func (*TaskNodeStatus) SetBarrierClockTick added in v0.1.13

func (in *TaskNodeStatus) SetBarrierClockTick(tick uint32)

func (TaskNodeStatus) SetLastPhaseUpdatedAt added in v0.1.27

func (in TaskNodeStatus) SetLastPhaseUpdatedAt(updatedAt time.Time)

func (*TaskNodeStatus) SetPhase

func (in *TaskNodeStatus) SetPhase(phase int)

func (*TaskNodeStatus) SetPhaseVersion

func (in *TaskNodeStatus) SetPhaseVersion(version uint32)

func (*TaskNodeStatus) SetPluginState added in v0.1.13

func (in *TaskNodeStatus) SetPluginState(s []byte)

func (*TaskNodeStatus) SetPluginStateVersion added in v0.1.13

func (in *TaskNodeStatus) SetPluginStateVersion(v uint32)

func (*TaskNodeStatus) UpdatePhase

func (in *TaskNodeStatus) UpdatePhase(phase int, phaseVersion uint32)

type TaskSpec

type TaskSpec struct {
	*core.TaskTemplate
}

func (*TaskSpec) CoreTask

func (in *TaskSpec) CoreTask() *core.TaskTemplate

func (*TaskSpec) DeepCopy

func (in *TaskSpec) DeepCopy() *TaskSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.

func (*TaskSpec) DeepCopyInto

func (in *TaskSpec) DeepCopyInto(out *TaskSpec)

func (*TaskSpec) MarshalJSON

func (in *TaskSpec) MarshalJSON() ([]byte, error)

func (*TaskSpec) TaskType

func (in *TaskSpec) TaskType() TaskType

func (*TaskSpec) UnmarshalJSON

func (in *TaskSpec) UnmarshalJSON(b []byte) error

type TaskType

type TaskType = string

TaskType is a dynamic enumeration, that is defined by configuration

type WorkflowExecutionIdentifier

type WorkflowExecutionIdentifier struct {
	*core.WorkflowExecutionIdentifier
}

func (*WorkflowExecutionIdentifier) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowExecutionIdentifier.

func (*WorkflowExecutionIdentifier) DeepCopyInto

type WorkflowID

type WorkflowID = string

type WorkflowMeta

type WorkflowMeta interface {
	GetExecutionID() ExecutionID
	GetK8sWorkflowID() types.NamespacedName
	GetOwnerReference() metav1.OwnerReference
	GetNamespace() string
	GetCreationTimestamp() metav1.Time
	GetAnnotations() map[string]string
	GetLabels() map[string]string
	GetName() string
	GetServiceAccountName() string
}

WorkflowMeta provides an interface to retrieve labels, annotations and other concepts that are declared only once for the top level workflow

type WorkflowMetaExtended

type WorkflowMetaExtended interface {
	WorkflowMeta
	TaskDetailsGetter
	FindSubWorkflow(subID WorkflowID) ExecutableSubWorkflow
	GetExecutionStatus() ExecutableWorkflowStatus
}

type WorkflowNodePhase added in v0.1.13

type WorkflowNodePhase int
const (
	WorkflowNodePhaseUndefined WorkflowNodePhase = iota
	WorkflowNodePhaseExecuting
)

type WorkflowNodeSpec

type WorkflowNodeSpec struct {
	// Either one of the two
	LaunchPlanRefID *LaunchPlanRefID `json:"launchPlanRefId,omitempty"`
	// We currently want the SubWorkflow to be completely contained in the node. this is because
	// We use the node status to store the information of the execution.
	// Important Note: This may cause a bloat in case we use the same SubWorkflow in multiple nodes. The recommended
	// technique for that is to use launch plan refs. This is because we will end up executing the launch plan refs as
	// disparate executions in Flyte propeller. This is potentially better as it prevents us from hitting the storage limit
	// in etcd
	//+optional.
	// Workflow *WorkflowSpec `json:"workflow,omitempty"`
	SubWorkflowReference *WorkflowID `json:"subWorkflowRef,omitempty"`
}

func (*WorkflowNodeSpec) DeepCopy

func (in *WorkflowNodeSpec) DeepCopy() *WorkflowNodeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeSpec.

func (*WorkflowNodeSpec) DeepCopyInto

func (in *WorkflowNodeSpec) DeepCopyInto(out *WorkflowNodeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowNodeSpec) GetLaunchPlanRefID

func (in *WorkflowNodeSpec) GetLaunchPlanRefID() *LaunchPlanRefID

func (*WorkflowNodeSpec) GetSubWorkflowRef

func (in *WorkflowNodeSpec) GetSubWorkflowRef() *WorkflowID

type WorkflowNodeStatus

type WorkflowNodeStatus struct {
	MutableStruct
	Phase WorkflowNodePhase `json:"phase"`
}

func (*WorkflowNodeStatus) DeepCopy

func (in *WorkflowNodeStatus) DeepCopy() *WorkflowNodeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowNodeStatus.

func (*WorkflowNodeStatus) DeepCopyInto

func (in *WorkflowNodeStatus) DeepCopyInto(out *WorkflowNodeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowNodeStatus) GetWorkflowNodePhase added in v0.1.13

func (in *WorkflowNodeStatus) GetWorkflowNodePhase() WorkflowNodePhase

func (*WorkflowNodeStatus) SetWorkflowNodePhase added in v0.1.13

func (in *WorkflowNodeStatus) SetWorkflowNodePhase(phase WorkflowNodePhase)

type WorkflowPhase

type WorkflowPhase int

WorkflowPhase indicates current state of the Workflow.

const (
	WorkflowPhaseReady WorkflowPhase = iota
	WorkflowPhaseRunning
	WorkflowPhaseSucceeding
	WorkflowPhaseSuccess
	WorkflowPhaseFailing
	WorkflowPhaseFailed
	WorkflowPhaseAborted
)

func (WorkflowPhase) String

func (p WorkflowPhase) String() string

type WorkflowSpec

type WorkflowSpec struct {
	ID    WorkflowID           `json:"id"`
	Nodes map[NodeID]*NodeSpec `json:"nodes"`

	// Defines the set of connections (both data dependencies and execution dependencies) that the graph is
	// formed of. The execution engine will respect and follow these connections as it determines which nodes
	// can and should be executed.
	Connections Connections `json:"connections"`

	// Defines a single node to execute in case the system determined the Workflow has failed.
	OnFailure *NodeSpec `json:"onFailure,omitempty"`

	// Defines the declaration of the outputs types and names this workflow is expected to generate.
	Outputs *OutputVarMap `json:"outputs,omitempty"`

	// Defines the data links used to construct the final outputs of the workflow. Bindings will typically
	// refer to specific outputs of a subset of the nodes executed in the Workflow. When executing the end-node,
	// the execution engine will traverse these bindings and assemble the final set of outputs of the workflow.
	OutputBindings []*Binding `json:"outputBindings,omitempty"`
}

WorkflowSpec is the spec for the actual Flyte Workflow (DAG)

func (*WorkflowSpec) DeepCopy

func (in *WorkflowSpec) DeepCopy() *WorkflowSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowSpec.

func (*WorkflowSpec) DeepCopyInto

func (in *WorkflowSpec) DeepCopyInto(out *WorkflowSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowSpec) FromNode

func (in *WorkflowSpec) FromNode(name NodeID) ([]NodeID, error)

func (*WorkflowSpec) GetConnections

func (in *WorkflowSpec) GetConnections() *Connections

func (*WorkflowSpec) GetID

func (in *WorkflowSpec) GetID() WorkflowID

func (*WorkflowSpec) GetNode

func (in *WorkflowSpec) GetNode(nodeID NodeID) (ExecutableNode, bool)

func (*WorkflowSpec) GetNodes

func (in *WorkflowSpec) GetNodes() []NodeID

func (*WorkflowSpec) GetOnFailureNode

func (in *WorkflowSpec) GetOnFailureNode() ExecutableNode

func (*WorkflowSpec) GetOutputBindings

func (in *WorkflowSpec) GetOutputBindings() []*Binding

func (*WorkflowSpec) GetOutputs

func (in *WorkflowSpec) GetOutputs() *OutputVarMap

func (*WorkflowSpec) StartNode

func (in *WorkflowSpec) StartNode() ExecutableNode

type WorkflowStatus

type WorkflowStatus struct {
	Phase           WorkflowPhase `json:"phase"`
	StartedAt       *metav1.Time  `json:"startedAt,omitempty"`
	StoppedAt       *metav1.Time  `json:"stoppedAt,omitempty"`
	LastUpdatedAt   *metav1.Time  `json:"lastUpdatedAt,omitempty"`
	Message         string        `json:"message,omitempty"`
	DataDir         DataReference `json:"dataDir,omitempty"`
	OutputReference DataReference `json:"outputRef,omitempty"`

	NodeStatus map[NodeID]*NodeStatus `json:"nodeStatus,omitempty"`

	// Number of Attempts completed with rounds resulting in error. this is used to cap out poison pill workflows
	// that spin in an error loop. The value should be set at the global level and will be enforced. At the end of
	// the retries the workflow will fail
	FailedAttempts uint32 `json:"failedAttempts,omitempty"`

	// non-Serialized fields
	DataReferenceConstructor storage.ReferenceConstructor `json:"-"`
}

func (*WorkflowStatus) ConstructNodeDataDir

func (in *WorkflowStatus) ConstructNodeDataDir(ctx context.Context, name NodeID) (storage.DataReference, error)

func (*WorkflowStatus) DeepCopy

func (in *WorkflowStatus) DeepCopy() *WorkflowStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus.

func (*WorkflowStatus) DeepCopyInto

func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*WorkflowStatus) Equals

func (in *WorkflowStatus) Equals(other *WorkflowStatus) bool

func (*WorkflowStatus) GetDataDir

func (in *WorkflowStatus) GetDataDir() DataReference

func (*WorkflowStatus) GetLastUpdatedAt

func (in *WorkflowStatus) GetLastUpdatedAt() *metav1.Time

func (*WorkflowStatus) GetMessage

func (in *WorkflowStatus) GetMessage() string

func (*WorkflowStatus) GetNodeExecutionStatus

func (in *WorkflowStatus) GetNodeExecutionStatus(ctx context.Context, id NodeID) ExecutableNodeStatus

func (*WorkflowStatus) GetOutputReference

func (in *WorkflowStatus) GetOutputReference() DataReference

func (*WorkflowStatus) GetPhase

func (in *WorkflowStatus) GetPhase() WorkflowPhase

func (*WorkflowStatus) GetStartedAt

func (in *WorkflowStatus) GetStartedAt() *metav1.Time

func (*WorkflowStatus) GetStoppedAt

func (in *WorkflowStatus) GetStoppedAt() *metav1.Time

func (*WorkflowStatus) IncFailedAttempts

func (in *WorkflowStatus) IncFailedAttempts()

func (*WorkflowStatus) IsTerminated

func (in *WorkflowStatus) IsTerminated() bool

func (*WorkflowStatus) SetDataDir

func (in *WorkflowStatus) SetDataDir(d DataReference)

func (*WorkflowStatus) SetMessage

func (in *WorkflowStatus) SetMessage(msg string)

func (*WorkflowStatus) SetOutputReference

func (in *WorkflowStatus) SetOutputReference(reference DataReference)

func (*WorkflowStatus) UpdatePhase

func (in *WorkflowStatus) UpdatePhase(p WorkflowPhase, msg string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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