task

package
v1.9.37 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const IDMaxLength = 50
View Source
const MaxPluginStateSizeBytes = 256

TODO Configurable?

Variables

This section is empty.

Functions

func ComputePreviousCheckpointPath

func ComputePreviousCheckpointPath(ctx context.Context, length int, nCtx interfaces.NodeExecutionContext, currentNodeUniqueID v1alpha1.NodeID, currentAttempt uint32) (storage.DataReference, error)

ComputePreviousCheckpointPath returns the checkpoint path for the previous attempt, if this is the first attempt then returns an empty path

func ComputeRawOutputPrefix

func ComputeRawOutputPrefix(ctx context.Context, length int, nCtx interfaces.NodeExecutionContext, currentNodeUniqueID v1alpha1.NodeID, currentAttempt uint32) (io.RawOutputPaths, string, error)

ComputeRawOutputPrefix constructs the output directory, where raw outputs of a task can be stored by the task. FlytePropeller may not have access to this location and can be passed in per execution. the function also returns the uniqueID generated

func WranglePluginsAndGenerateFinalList

func WranglePluginsAndGenerateFinalList(ctx context.Context, cfg *config.TaskPluginConfig, pr PluginRegistryIface,
	kubeClientset kubernetes.Interface) (enabledPlugins []core.PluginEntry, defaultForTaskTypes map[pluginID][]taskType, err error)

Types

type CacheContents

type CacheContents struct {
	WorkflowCRD      *v1alpha1.FlyteWorkflow
	CompiledWorkflow *core.CompiledWorkflowClosure
}

type CodecVersion

type CodecVersion uint8
const (
	GobCodecVersion CodecVersion = iota
)

type FutureFileReader

type FutureFileReader struct {
	RemoteFileWorkflowStore
	// contains filtered or unexported fields
}

func NewRemoteFutureFileReader

func NewRemoteFutureFileReader(ctx context.Context, dataDir storage.DataReference, store *storage.DataStore) (FutureFileReader, error)

func (FutureFileReader) Cache

func (FutureFileReader) CacheExists

func (f FutureFileReader) CacheExists(ctx context.Context) (bool, error)

func (FutureFileReader) Exists

func (f FutureFileReader) Exists(ctx context.Context) (bool, error)

func (FutureFileReader) GetLoc

func (FutureFileReader) Read

func (FutureFileReader) RetrieveCache

func (f FutureFileReader) RetrieveCache(ctx context.Context) (CacheContents, error)

type Handler

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

func New

func New(ctx context.Context, kubeClient executors.Client, kubeClientset kubernetes.Interface, client catalog.Client,
	eventConfig *controllerConfig.EventConfig, clusterID string, scope promutils.Scope) (*Handler, error)

func (Handler) Abort

func (t Handler) Abort(ctx context.Context, nCtx interfaces.NodeExecutionContext, reason string) error

func (Handler) Finalize

func (*Handler) FinalizeRequired

func (t *Handler) FinalizeRequired() bool

func (*Handler) GetCatalogKey

func (t *Handler) GetCatalogKey(ctx context.Context, nCtx interfaces.NodeExecutionContext) (catalog.Key, error)

func (Handler) Handle

func (*Handler) IsCacheable

func (t *Handler) IsCacheable(ctx context.Context, nCtx interfaces.NodeExecutionContext) (bool, bool, error)

func (Handler) ResolvePlugin

func (t Handler) ResolvePlugin(ctx context.Context, ttype string, executionConfig v1alpha1.ExecutionConfig) (pluginCore.Plugin, error)

func (*Handler) Setup

func (t *Handler) Setup(ctx context.Context, sCtx interfaces.SetupContext) error

func (*Handler) ValidateOutput

func (t *Handler) ValidateOutput(ctx context.Context, nodeID v1alpha1.NodeID, i io.InputReader,
	r io.OutputReader, outputCommitter io.OutputWriter, executionConfig v1alpha1.ExecutionConfig,
	tr ioutils.SimpleTaskReader) (*io.ExecutionError, error)

type MetricKey

type MetricKey = string

type PluginRegistryIface

type PluginRegistryIface interface {
	GetCorePlugins() []pluginCore.PluginEntry
	GetK8sPlugins() []pluginK8s.PluginEntry
}

The plugin interface available especially for testing.

type RemoteFileWorkflowStore

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

func NewRemoteWorkflowStore

func NewRemoteWorkflowStore(store *storage.DataStore) RemoteFileWorkflowStore

func (RemoteFileWorkflowStore) Exists

func (RemoteFileWorkflowStore) GetCompiledWorkflow

func (RemoteFileWorkflowStore) GetWorkflowCRD

func (RemoteFileWorkflowStore) PutCompiledFlyteWorkflow

func (r RemoteFileWorkflowStore) PutCompiledFlyteWorkflow(ctx context.Context, workflow *core.CompiledWorkflowClosure, target storage.DataReference) error

func (RemoteFileWorkflowStore) PutFlyteWorkflowCRD

func (r RemoteFileWorkflowStore) PutFlyteWorkflowCRD(ctx context.Context, wf *v1alpha1.FlyteWorkflow, target storage.DataReference) error

type ToTaskExecutionEventInputs

type ToTaskExecutionEventInputs struct {
	TaskExecContext       pluginCore.TaskExecutionContext
	InputReader           io.InputFilePaths
	Inputs                *core.LiteralMap
	EventConfig           *config.EventConfig
	OutputWriter          io.OutputFilePaths
	Info                  pluginCore.PhaseInfo
	NodeExecutionMetadata interfaces.NodeExecutionMetadata
	ExecContext           executors.ExecutionContext
	TaskType              string
	PluginID              string
	ResourcePoolInfo      []*event.ResourcePoolInfo
	ClusterID             string
	OccurredAt            time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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