Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/dwarves

crates/nornir-warehouse-embed/Cargo.toml

[package]
name = "nornir-warehouse-embed"
version = "0.2.0"
edition = "2021"
description = "Backend-(2) native embed adapter: a THIN tonic gRPC client for nornir-server's `Telemetry.SubmitTestResults` write RPC that ships a finished build's `nornir-build-thing` build-info rows into nornir's unified warehouse (test_results) so a dwarves build shows up in the 🧪 Test viz — WITHOUT linking the `nornir` crate (that would be a dependency cycle). A `NornirWarehouseSink` impl of `nornir_build_thing::BuildInfoSink`. The reusable `<guest>-embed` shape (nornir-funnel-embed is the template)."
license = "MIT OR Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/dwarves"
# PUBLISHABLE: this is a REAL (optional) dependency of the published `dwarves`
# crate (features `warehouse` / `funnel-action`). cargo publish does not honour
# `publish = false` for a dependency of a published crate — it would fail-stop the
# `dwarves` upload with "no matching package named nornir-warehouse-embed". Its
# only path dep (nornir-build-thing) is live on crates.io, so this crate
# publishes cleanly on its own.
publish = true

[features]
# `testkit` — expose a reusable MOCK `Warehouse` gRPC server (`testkit::spawn_mock_warehouse`)
# so a CONSUMER's test (e.g. modgunn's gRPC-read test) drives the read path against
# a canned server WITHOUT twinning its own tonic mock (L5). The mock's server
# bindings are already generated unconditionally (`build_server(true)`), so this
# only adds a thin struct; OFF by default. This crate's own tests get it via
# `cfg(test)` regardless of the feature.
testkit = []

[dependencies]
# The build-info row + sink seam we ship (BuildInfoSink / BuildInfoRow /
# BuildProvenance). SAME path-dep as the dwarves crate, so the `BuildInfoSink`
# trait our sink impls is the exact type dwarves' RealRunner emits into.
nornir-build-thing = { version = "0.2.0", path = "../../../edda/crates/nornir-build-thing" }
anyhow = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Thin gRPC client (+ a server binding so the integration test can stand up a
# mock Telemetry server). Mirrors nornir-funnel-embed's tonic pins.
tonic = { version = "0.14", default-features = false, features = ["router", "transport", "codegen"] }
prost = "0.14"
tonic-prost = "0.14"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros", "net", "time", "sync"] }
# The server-STREAMING half of `Warehouse.ScanVectors`: `Stream` for the response type
# the tonic trait names, and `iter` for the mock. Same crate + version nornir's server
# stream handlers use, so the two ends of the stream are typed by one dependency.
tokio-stream = "0.1"
# The ONE client-side `authorization: Bearer <token>` builder (Law #1) — consumed,
# never twinned as a per-site `format!("Bearer …").parse()` stamp.
nornir-service = { path = "../../../edda/crates/nornir-service", version = "0.1.12" }
# The bench run/result ENVELOPE (`BenchRun`/`BenchResult`/`TestOutcome`) the
# `Bench.Submit` leg ships. The DEFAULT (envelope-only) build — not the `runner`
# feature: this crate transports a finished measurement, it never spawns one.
# Same crate the forge verb and the warehouse both hold, so the shape crossing
# the wire is the shape both ends already have.
nornir-bench = { version = "0.2.0", path = "../../../edda/crates/nornir-bench" }

[build-dependencies]
tonic-prost-build = { version = "0.14" }
protox = "0.9"

[dev-dependencies]
tempfile = "3"
# SELF-dep with `testkit` ON, so this crate's INTEGRATION tests (tests/*.rs) can see
# `testkit`. The feature comment above used to claim "this crate's own tests get it via
# `cfg(test)` regardless of the feature" — true for UNIT tests, false for integration
# ones: a tests/ binary links the lib as an ordinary external consumer, compiled WITHOUT
# `cfg(test)`. `tests/bench_submit.rs` therefore failed to build, and its 3 tests had
# never run. This is the canonical cargo fix for a feature-gated testkit.
nornir-warehouse-embed = { path = ".", features = ["testkit"] }