Skip to main content

v1

runs record, v1 — canonical aliases.

Consumers and the record registry import from here and never touch the inner module names, mirroring steps/*/v1/__init__.py.

Module

Submodules

Classes

ORM

class ORM(**kwargs):

SQLAlchemy model for the runs cache table.

Tracks the lifecycle of flow executions. Multiple rows per task hash are allowed — each run attempt is a distinct row identified by (task_hash, run_id).

The type column is a free-form run-kind discriminator (e.g. "file_metadata", "interactive", a DAG name, or a node name). The duplicate-run guard in mark_run_started / _is_run_active is scoped by (task_hash, type), so the value must be specific enough that two runs sharing it are genuinely mutually-exclusive duplicates — runs of different types for the same task_hash may legally run in parallel.

parent_run_id supports hierarchical runs: a DAG-level run has parent_run_id = None, and each node-level run within that DAG carries the DAG run's run_id as its parent_run_id while getting its own unique run_id.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.

Variables

  • completed_at : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • error : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • files_processed : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • parent_run_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • project_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • run_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • started_at : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • status : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • tags : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • task_hash : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
  • type : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]

Record

class Record(**data: Any):

Record of a single flow execution.

Attributes

  • task_hash: Pipeline task hash.
  • run_id: UUID uniquely identifying this run attempt.
  • type: Free-form run-kind discriminator used as the dedup key (e.g. a DAG name, a "<dag>:interactive" suffix, a node name, or "file_metadata"). NOT a closed set.
  • status: Current lifecycle state (RunStatus).
  • started_at: When the run started.
  • completed_at: When the run finished (None if still running).
  • files_processed: Number of files processed in this run.
  • error: Error message if the run failed.
  • tags: Arbitrary flat metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Variables

  • static error : str | None
  • static files_processed : int
  • static model_config
  • static parent_run_id : str | None
  • static project_id : str | None
  • static run_id : str
  • static task_hash : str
  • static type : str