You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a gradient cache upload command (and supporting backend HTTP endpoint) to push local Nix store paths to a Gradient cache the user is authenticated against.
Scope
Backend: new POST /api/v1/caches/{cache}/nars endpoint accepting NAR bytes + narinfo metadata. Writes cached_path + cached_path_signature rows, signs server-side, stores blob in nar_storage. Authenticated; requires cache-edit (or a more specific cache-write) permission.
CLI: gradient cache upload <store-path...> — resolves store paths locally (via harmonia LocalNixStore), dumps NAR, computes refs/hashes, POSTs to the backend.
Shared ingest logic between this path and the existing worker proto NarPush / NarUploaded flow lifted into gradient_core::cache::ingest (or similar) so both stay DRY.
Docs, OpenAPI, tests.
We also want a --full-closure option that uploads a full store paths closure
Notes
Substituter parallel: harmonia exposes PUT /<hash>.narinfo and PUT /nar/<file>.nar.zst. Keep our endpoint shape close to that idiom but JSON-first.
Split out from #260.
Add a
gradient cache uploadcommand (and supporting backend HTTP endpoint) to push local Nix store paths to a Gradient cache the user is authenticated against.Scope
POST /api/v1/caches/{cache}/narsendpoint accepting NAR bytes + narinfo metadata. Writescached_path+cached_path_signaturerows, signs server-side, stores blob innar_storage. Authenticated; requires cache-edit (or a more specific cache-write) permission.gradient cache upload <store-path...>— resolves store paths locally (via harmoniaLocalNixStore), dumps NAR, computes refs/hashes, POSTs to the backend.NarPush/NarUploadedflow lifted intogradient_core::cache::ingest(or similar) so both stay DRY.Notes
PUT /<hash>.narinfoandPUT /nar/<file>.nar.zst. Keep our endpoint shape close to that idiom but JSON-first.