From 07e0cb1b0a8d1b0ce6140284aceeea91bcd0672a Mon Sep 17 00:00:00 2001 From: Yureka Date: Fri, 27 Sep 2024 21:48:26 +0200 Subject: feat(tvix/build): add refscanning interface This provides a generic interface to let the builder search for needles in the output, as described in the notes at `docs/src/build/index.md`. Change-Id: Ic2c5bd563e9aa2e766c157f2b13cdb19aede12f8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12531 Autosubmit: yuka Tested-by: BuildkiteCI Reviewed-by: flokli Reviewed-by: Brian Olsen --- tvix/build/protos/build.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tvix/build/protos/build.proto') diff --git a/tvix/build/protos/build.proto b/tvix/build/protos/build.proto index 7a3c49db4873..1d6f8690c58c 100644 --- a/tvix/build/protos/build.proto +++ b/tvix/build/protos/build.proto @@ -144,6 +144,12 @@ message BuildRequest { bytes contents = 2; } + // If this is an non-empty list, all paths in `outputs` are scanned for these. + // For Nix, `refscan_needles` would be populated with the nixbase32 hash parts of + // every input store path and output store path. The latter is necessary to scan + // for references between multi-output derivations. + repeated string refscan_needles = 10; + // TODO: allow describing something like "preferLocal", to influence composition? } @@ -156,6 +162,14 @@ message Build { // They are sorted by their names. repeated tvix.castore.v1.Node outputs = 2; + message OutputNeedles { + // The numbers are indexing into `refscan_needles` originally specified in the BuildRequest. + repeated uint64 needles = 1; + } + + // Contains the same number of elements as the `outputs` field. + repeated OutputNeedles outputs_needles = 3; + // TODO: where did this run, how long, logs, … } -- cgit 1.4.1