-
Notifications
You must be signed in to change notification settings - Fork 550
/
state.go
58 lines (48 loc) · 1.68 KB
/
state.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package handler
import (
"time"
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
pluginCore "github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/core"
"github.com/flyteorg/flyte/flytepropeller/pkg/apis/flyteworkflow/v1alpha1"
"github.com/flyteorg/flyte/flytestdlib/bitarray"
"github.com/flyteorg/flyte/flytestdlib/storage"
)
// This is the legacy state structure that gets translated to node status
// TODO eventually we could just convert this to be binary node state encoded into the node status
type TaskNodeState struct {
PluginPhase pluginCore.Phase
PluginPhaseVersion uint32
PluginState []byte
PluginStateVersion uint32
LastPhaseUpdatedAt time.Time
PreviousNodeExecutionCheckpointURI storage.DataReference
CleanupOnFailure bool
}
type BranchNodeState struct {
FinalizedNodeID *v1alpha1.NodeID
Phase v1alpha1.BranchNodePhase
}
type DynamicNodePhase uint8
type DynamicNodeState struct {
Phase v1alpha1.DynamicNodePhase
Reason string
Error *core.ExecutionError
IsFailurePermanent bool
}
type WorkflowNodeState struct {
Phase v1alpha1.WorkflowNodePhase
Error *core.ExecutionError
}
type GateNodeState struct {
Phase v1alpha1.GateNodePhase
StartedAt time.Time
}
type ArrayNodeState struct {
Phase v1alpha1.ArrayNodePhase
TaskPhaseVersion uint32
Error *core.ExecutionError
SubNodePhases bitarray.CompactArray
SubNodeTaskPhases bitarray.CompactArray
SubNodeRetryAttempts bitarray.CompactArray
SubNodeSystemFailures bitarray.CompactArray
}