Expand description
Shared model of schedr: DAG JSON, run and task states, and the JSON Schema generated from them.
These Rust types are the reference for every shape that crosses a process boundary (see archive/PROJECT.md, Rust/Python integration: shared model and schemas). The Python package writes DAG JSON by hand-written code that is validated against the schema generated from here.
Re-exports§
pub use connection::ConnectionDef;pub use dag::Dag;pub use dag::DagLocation;pub use dag::Edge;pub use dag::EdgeKind;pub use dag::Group;pub use dag::Params;pub use dag::Resource;pub use dag::ResourceState;pub use ids::DagId;pub use ids::EventName;pub use ids::IdError;pub use ids::TaskId;pub use notify::Body;pub use notify::ChannelRef;pub use notify::NotifyEntry;pub use notify::NotifyEvent;pub use notify::Part;pub use notify::PathKey;pub use notify::Placeholder;pub use notify::Ref;pub use notify::WebhookChannel;pub use secret::SecretDecl;pub use secret::SecretName;pub use states::AttemptStatus;pub use states::CleanupResult;pub use states::RetryRule;pub use states::RunKind;pub use states::RunState;pub use states::TaskInstanceState;pub use states::WorkerState;pub use task::CommandLine;pub use task::DEFAULT_OUTCOME;pub use task::Expand;pub use task::Mapped;pub use task::OutcomeDecl;pub use task::ResourceRole;pub use task::RunIf;pub use task::SensorMode;pub use task::Task;pub use task::TaskKind;pub use task::TaskSettings;pub use task::default_outcomes;pub use trigger::RunEvent;pub use trigger::Trigger;pub use types::Field;pub use types::TypeDesc;pub use value::DagCtxField;pub use value::Encoding;pub use value::PathElem;pub use value::Reference;pub use value::Template;pub use value::TemplatePart;pub use value::TemplateRef;pub use value::Value;pub use version::SchedrVersion;pub use version::VersionError;
Modules§
- beat
- When a loop last turned, for liveness probes (see archive/PROJECT.md, Observability): the master’s scheduling loop and the worker agent’s event loop beat, and the ops port reads how long ago.
- commands
- Commands: actions a person asks for (UI, CLI, API), written by the webserver as command rows and applied by the master, which stays the only writer of scheduling state (see archive/PROJECT.md, Web UI and CLI: how the webserver gets state).
- connection
- Connections (archive/PROJECT.md, Connections; decisions 53 and 174): what the parser records of
a
@connectionfunction, so the agent can render it for a task by name. - ctx
- Messages on a command task’s context channel:
schedr dag-ctxandschedr.scriptasking the agent for the run’s parameters and information (decisions 143-148). - dag
- A DAG as stored in DAG JSON: what the Python runner sends after parsing a DAG file.
- ids
- Identifiers: DAG IDs and task IDs.
- logs
- The worker’s log endpoint as both sides see it (the worker serves it, the webserver reads it; see archive/PROJECT.md, Task logs).
- metric_
doc - What each metric is, for the code that registers it and for the metrics reference in the documentation (see archive/PROJECT.md, Observability): one list per role, so the name and help text are written once, and a test per role checks the type and labels against a scrape.
- notify
- Notifications in DAG JSON (decisions 408, 409, 417-423): which channels a DAG tells of which events, the channels a DAG defines itself, and message bodies as data.
- params
- A run’s parameters (decision 138): from the JSON a trigger gives to the form they are stored and sent in, which is how outputs are stored (dates and tuples tagged), and back to JSON for showing them.
- runner
- Messages between the worker agent and the Python runner (
python -m schedr.runner). - schema
- The JSON Schemas generated from the model, committed to the repository and checked by CI (see archive/PROJECT.md, Rust/Python integration: shared model and schemas).
- secret
- Secrets in DAG JSON: which secret a reference names, and the secrets a task declares (see archive/PROJECT.md, Secret storage).
- states
- Run kinds and the states of runs, task instances and attempts.
- task
- Tasks in DAG JSON: their kind, what they run, and their resolved settings.
- trigger
- A DAG’s trigger, as stored in DAG JSON: what starts its runs.
- types
- Type descriptors: the type of a task’s output, as recorded in DAG JSON.
- usage
- What a schedr process uses (decision 463): its memory and CPU and its container’s, and a
worker’s memory by part. Reported by masters (their row), workers (their heartbeat) and the
webserver (its
/deploymentanswer). - value
- Values in DAG JSON: references, templates and task arguments.
- version
- The schedr version that produced a piece of stored data, and which versions can read it.