testing-dags¶
dags check / dags test, run_dag, task_context.
Generated by make records from the decisions whose topic (or also) is this one; edit the decisions, not this page.
Current¶
run_dag¶
TaskResult output is typed as object (D73):
run_dagexposesTaskResult.outputasobject, so a test narrows it before using fields.output_jsonuses theJsontype.run_dag exposes mapped instances under the task result (D85):
result.tasks["fetch"]represents the whole task and its output is the gathered list. Indexing that result or using.instancesaccesses individual instance results.Testing one DAG file parses that file alone (D117): When dags test selects a file, its directory is the root but only that file is parsed. Imports from sibling files still work; the internal selection is not configurable.
From other topics¶
Connections provide sync and async clients and checks (D53,
connections; built M4.10)Type checkers read task calls as their values (D57,
python-api; built M4.2a)Parse warnings stay in dags check (D68,
ui-cli; built M4.2c)An unmapped task limit produces a parse warning (D90,
python-api; built M4.4)Invalid group dependencies name where they were written (D97,
python-api; built M4.3c)Connections use optional clients and worker-side checks and tests (D174,
connections; built M4.7c)
Replaced¶
D366 (dropped): A fake for API calls in local runs was dropped
Where in code¶
crates/schedr-agent/src/agent.rs(D117, D174)crates/schedr-agent/src/connection_jobs.rs::check(D174)crates/schedr-config/src/roots.rs::only(D117)crates/schedr-master/src/dispatch.rs::set_connections(D174)crates/schedr-master/src/limits.rs(D90)crates/schedr-model/src/connection.rs::ConnectionDef(D53)python/schedr/_build.py::hint_unmapped_per_run(D90)python/schedr/_build.py::make_group_dependencies(D97)python/schedr/connections.py::TwoWayConnection(D53)python/schedr/outcomes.py::Data(D57)python/schedr/testing.py::TaskResult(D73)python/schedr/testing.py::__getitem__(D85)
Open¶
None.
Details and edge cases, with the reasons; read them before changing this:
archive/PROJECT.md: Native API, Python, Sensors and triggers, Testing DAGs