-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Kadyapam edited this page May 30, 2026
·
16 revisions
Shared tool registry for the NoETL Rust runtime. Hosts the concrete Tool implementations the CLI and worker dispatch through, plus the supporting auth resolver, template engine, and result envelope types.
The execution layer of the Rust runtime split:
-
noetl-tools (this crate) — concrete tool implementations. Each tool ships a
ToolConfigschema, an asyncexecute()method, and aToolResultenvelope. - noetl-executor — shared utilities + types the CLI and worker call into (template rendering, condition evaluation, capability validation, event envelope, tool dispatch bridge).
- noetl-worker — NATS pull consumer.
-
noetl (cli) — local-mode runner + workspace member for
noetl-executor.
The CLI and worker both depend on noetl-tools directly (alongside noetl-executor). The dispatch flow:
noetl CLI's tree walker worker's NATS pull loop
│ │
└─── noetl-executor ─────────┘
│
└─── noetl-tools::ToolRegistry
│
├── RhaiTool ┐
├── ShellTool │
├── HttpTool │
├── DuckdbTool ├── concrete tool kinds
├── PostgresTool │
├── SnowflakeTool │
├── TransferTool │
├── PythonTool │
└── ScriptTool ┘
| Tool | Source | Purpose |
|---|---|---|
RhaiTool |
tools::rhai |
Embedded Rhai scripting; HTTP helpers, sleep, get_gcp_token, log/print/parse_json. |
ShellTool |
tools::shell |
Spawn shell commands; capture stdout/stderr/exit_code. |
HttpTool |
tools::http |
Direct reqwest calls; JSON / form / binary bodies; GCP ADC bearer auth. |
DuckdbTool |
tools::duckdb |
In-process DuckDB query execution; SELECT returns {columns, rows, row_count}; non-SELECT returns {affected_rows}. |
PostgresTool |
tools::postgres |
Connection-pooled PG; same envelope shape as DuckDB. |
SnowflakeTool |
tools::snowflake |
Snowflake-specific connection params (account / warehouse / database / schema). |
TransferTool |
tools::transfer |
Database-to-database transfer (snowflake / postgres / http source → snowflake / postgres / duckdb target). Modes: append / replace / upsert. |
PythonTool |
tools::python |
Spawn Python subprocesses (script execution). |
ScriptTool |
tools::script |
Generic script-as-string execution. |
| Module | Purpose |
|---|---|
registry |
ToolRegistry, Tool trait, ToolConfig, AuthConfig + AuthType enum. |
context |
ExecutionContext — per-execution variable + secret + worker-id state. execution_id: i64 mirrors Python noetl.event.execution_id. |
auth |
AuthResolver + concrete providers. GcpAuth uses the gcp_auth crate; supports workload identity on GKE + gcloud fallback on dev hosts. |
template |
TemplateEngine — {{ workload.x }} substitution; render_value(json, ctx) for nested templates. |
result |
ToolResult + ToolStatus (Success / Error / Timeout). |
error |
ToolError enum covering all tool-side failures. |
arrow_codec |
Apache Arrow encode/decode (R-2 data plane). |
- Tool kinds overview — per-tool config schema + result envelope reference.
-
Consumers — who calls into this crate and how (CLI tree walker via
noetl-executor::tools_bridge, worker vianoetl-executor::dispatch_via_registry).
Currently pinned to 2.8.x by both noetl-executor and noetl-worker. Crate-internal version (v1.1.0 git tag) is independent of the crates.io release line.
-
noetl/cli wiki — executor-crate-architecture — how the CLI's bridge layer maps the YAML
Toolenum onto this registry. - noetl/worker wiki — noetl-executor-adoption — how the worker dispatches through the registry from NATS commands.
- § H.4 — data plane (Arrow + object_store)