Reference
runs
One row per gtme run
What you'll learn
You're writing SQL that reads runs and need its columns, what each holds, and the DDL as the spec states it.
- every column and its type
- what the object holds and who writes it
- the DDL as the spec states it
A table. One row per gtme run; config_json is the resolved pipeline.
Columns
| Column | Type | Constraints |
|---|---|---|
id | TEXT | PRIMARY KEY |
pipeline | TEXT | NOT NULL |
config_json | TEXT | NOT NULL |
started_at | TEXT | NOT NULL |
finished_at | TEXT | |
status | TEXT | NOT NULL DEFAULT 'running' |
dry | INTEGER | NOT NULL DEFAULT 0 |
pid | INTEGER | |
host | TEXT |
Definition
From spec/ledger.sql, which is the machine-checkable form of SPEC.md §3:
CREATE TABLE runs (
id TEXT PRIMARY KEY, -- ULID
pipeline TEXT NOT NULL, -- name or '(adhoc)'
config_json TEXT NOT NULL, -- resolved pipeline config snapshot
started_at TEXT NOT NULL,
finished_at TEXT,
status TEXT NOT NULL DEFAULT 'running', -- running|done|failed|pending (ADR-038: ended with a step in flight)
dry INTEGER NOT NULL DEFAULT 0, -- 1 for a --dry-run rehearsal (ADR-052 (7)): finishes nothing a once: source counts
pid INTEGER, -- ADR-061: the executing process, set at create and at resume; display only
host TEXT -- ADR-061: its hostname; liveness is the run lock (§8), never these
);