Skip to main content

Flyte Domain Data Model

The data model for Flyte centers around the Action entity, which serves as the base for both workflow runs and individual task executions. A Run is simply a root Action (where ParentActionName is null). Actions are linked to Task definitions and can be initiated by a Trigger. The lifecycle of an Action is tracked through ActionEvent records, which capture phase transitions and error information. Metadata such as secret and Workflow & Run Management definitions are scoped by Project and Domain. The model uses serialized protobuf messages (e.g., ActionSpec, ActionDetails) to store complex, versioned domain data while denormalizing key fields for efficient querying.

Key Architectural Findings:

  • 'Run' is a type alias for 'Action'; root actions represent workflow runs while child actions represent tasks or sub-workflows.
  • 'ActionEvent' provides an append-only history of phase transitions for an 'Action', enabling detailed observability.
  • 'Task' and 'Trigger' entities manage the definitions and automation rules for executable units.
  • 'Secret' entities are managed as Kubernetes secrets but are logically scoped to Flyte projects and domains.
  • The data model heavily relies on composite primary keys (Project, Domain, Name/RunName) to ensure uniqueness across the multi-tenant system.
Loading diagram...