Commit graph

3010 commits

Author SHA1 Message Date
sterni
3bf6612a70 chore(3p/sources): Bump channels & overlays (2025-03-02)
* //tvix/*-go: regenerate protobuf files

* //tvix/boot:

  - Explicitly set compression method of mkBinaryCache which has
    made this configurable and (at the same time) changed the default.

  - Adjust to change of extension of the nar files from .nar.xz to
    plain .xz.

Change-Id: Ie79ea8e0ac8fe04ae01f5558bffca93e9314f56d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13174
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2025-03-02 13:01:34 +00:00
Florian Klink
1d4626d166 chore(tvix): bump thiserror to 2.x
Change-Id: I6fca86af1ef8d4da37b01701ef9de1983eedce49
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13190
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2025-03-02 11:35:44 +00:00
Ilan Joselevich
9e491c9164 chore(tvix): Use latest release of reqwest-{middleware,tracing}
Change-Id: I3b3859321b0540c8ff1094d4a77b0fae6a3fb1fc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13185
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
2025-02-27 17:01:29 +00:00
Marijan Petričević
a2e78b62ff refactor(tvix/castore): factor out castore related ServiceUrls utils
Change-Id: Ib4cef49a9519ebf88a05035a7261badd312135f0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13156
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2025-02-25 13:28:09 +00:00
Florian Klink
0bbeed166d chore(tvix/docs/theme): drop vendored highlight.js
These days highlight.js in mdbook includes syntax highlighting for Nix
out of the box, there's no more need to ship our own variant of it.

Change-Id: Idd453c2efe97707ae861de9fa08c9dab71ea7876
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13178
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: adisbladis <adisbladis@gmail.com>
Tested-by: BuildkiteCI
2025-02-25 13:04:25 +00:00
Bob van der Linden
43e5c0ff0e feat(tvix/castore): ingest_entries: error on unexpected end of stream
Currently ingest_entries panics. This makes it hard to use
ingest_entries in parallel with other processes. When another process
runs into an error and wants to return so, while ingest_entries has
already started and has no entries yet, we're forced to panic.

With this change ingest_entries will return an error when there are no
entries, thus allowing the user to handle the errors as they please.

Change-Id: I78b85bf18f52af8c157d6bedad6019fd4398250a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13146
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Bob van der Linden <bobvanderlinden@gmail.com>
Reviewed-by: Bob van der Linden <bobvanderlinden@gmail.com>
Tested-by: BuildkiteCI
2025-02-25 01:19:55 +00:00
Florian Klink
661fe698a1 chore(tvix/tracing): bump to opentelemetry 0.28
According to https://github.com/open-telemetry/opentelemetry-rust/issues/1395#issuecomment-2612865575,
we can now remove the spawn_blocking calls and channel logic for
flushing / shutdown.

Change-Id: I0fabc1fe0968a736e7d44dfde41f4a6adac5e272
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13154
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
2025-02-22 10:09:51 +00:00
Florian Klink
9d5a556533 fix(nix-compat/nix_daemon): fix outdated comment
We're not saying 2.3 here anymore in all cases, but use the version
specified in the `nix_version` function argument.

Change-Id: I86c34f97eea4141b8431de7c6a784750d6b7c2cb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13166
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Brian Olsen <me@griff.name>
2025-02-21 11:15:46 +00:00
Florian Klink
5847cbf464 feat(tvix): add //tvix:shell-integration
This provides a shell containing the necessary packages to run the
integration tests too.

//tvix:shell stays the same.

Change-Id: Iac7977cbb7dc085da698993be9baca662d09ff5f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13164
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2025-02-21 07:41:18 +00:00
Florian Klink
22d68b3100 feat(tvix/store/pathinfoservice/bigtable): stream rows
Instead of collecting all rows into a Vec, use the stream_rows function,
and massage Ok values into the right shape.

This avoids collecting everything into memory.

Change-Id: I2f03434c7e1e25ee8395c69685b16100aec36f89
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13163
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2025-02-21 07:41:18 +00:00
Florian Klink
299d957df7 refactor(tvix/castore): use structured logging for directory digest
See https://cl.tvl.fyi/c/depot/+/13155/comment/7bb9b399_e29d929a/

Change-Id: I641e5c630fb7afdc41fb7e4dc79115697f702b27
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13159
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2025-02-20 03:17:49 +00:00
Marijan Petričević
22854c75f3 refactor(tvix/castore): don't require Arc'd DirectoryService
Since cl/12661 this doesn't need to be Arc'd.

Change-Id: I3c14c45df7815867ddea6f461e81649772648962
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13155
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2025-02-20 03:17:24 +00:00
Florian Klink
3491a7e679 refactor(tvix/castore): use "blake3" for Display impl
make the Display impl of B3Digest use the `blake3-` prefix rather than
`b3:`, which is more close to the SRI hashes we use in NixHash.

Also use Span::current().record() to record the `blob.digest` field (and
only when the digest has the right lenght). It doesn't make sense to
brand it as blake3 before anyways, and allows us to get rid of the
manual implementation.

Change-Id: Iee349557ef4761807af1fb3942387de1942ab12b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13162
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2025-02-19 16:37:38 +00:00
Florian Klink
51ea9c7801 refactor(nix-compat/nixhash): use SRI hashes for Display
This is probably a nicer default, and also aligns more with Serialize.

Change-Id: I3a8f18607c305dbf9fb93a2e2dd02ad07cd99f24
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13161
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2025-02-19 16:28:06 +00:00
Vincent Ambo
6046ff9f25 chore(3p/sources): bump channels & overlays (2025-02-09)
Included changes:

* targeted primary NixOS channel back at `nixos-unstable`

* //3p/chicago95: disable new broken symlink check

* //tvix: omit unnecessary lifetime clippy recommends

* //users/sterni/blipqn: wait a bit for data to arrive in test so it
  succeeds under load.

* //fun/paroxysm: force pkg-config flag of pq-sys by adding a bogus
  dependency on it. Otherwise, pq-sys will try to use pg_config
  which does not work correctly in pkgs.libpq at the moment.

* //users/flokli/keyboards/dilemma: disable temporarily

Change-Id: I6d53bd7bca6886f3457e1f41505e97314f4cd191
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13119
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: aspen <root@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-02-18 15:07:10 +00:00
Florian Klink
1acf37c054 feat(tvix/boot/tests): reenable
This got disabled in 5f17df8548 without
much investigation.

After some more digging, I found the root cause -
173de320197ba97f2daf46b7d229055cd3732df4 in nixpkgs changed the files
produced by `mkBinaryCache` to use FileHash, not NarHash to name NAR
files.

While this is more correct and consistent with how it's produced by Nix,
it unfortunately means our uploads will now get rejected.
We didn't notice this, as curl (and rush) were not configured to bail
out - which now is the case again.

Deal with the change, by decompressing twice, once to get the NarHash
again, the second time to feed the data to curl.

Change-Id: Ic1deb470801250e7967083ac78cd46be39f3caa3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13122
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2025-02-17 07:49:39 +00:00
sterni
9c159d65ca fix(tvix/cli): don't apply overlays for expectedPath in eval tests
The TVL overlay can lead to diverging store paths, e.g. starting with
CL/13119, firefox depends on some FODs that in turn depend on Nix. Thus
the TVL overlay (with Nix 2.3) will come up with a different drvPath
than just using (import pkgs.path {}).

To fix this, just automatically use the same arguments to nixpkgs as
Tvix for expectedPath.

Change-Id: I77d39df9092442a49c8ee94b012dec046ff6a07e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13147
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2025-02-16 16:12:04 +00:00
Vincent Ambo
5f17df8548 chore(3p/sources): bump channels & overlays (2025-02-02)
Included changes/fixes:

* bumped all `wasm-bindgen` usages again
* regenerated protobuf files
* keycloak terraform provider has been migrated to new name
  This also included a state migration in the bucket, which I've already
  performed.
* tvix/boot: disable tests that are broken in CI
* users/aspen/yeren: avoid upgrading kernel to 6.12
  digimend depends on a fix: https://github.com/NixOS/nixpkgs/pull/378830/

Change-Id: I657dcf5c4d0d08f231bfe30e37c8062bfcfaaa32
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13098
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
2025-02-09 09:00:22 +00:00
sterni
dd5100acf5 chore: rewrite uses of cs.tvl.fyi to code.tvl.fyi
I've checked the new links manually.

- //web/tvl: changed the target path of links to the tvix docs since
  they were moved in r/2378.

- //users/aspen/resume: Tvix is no longer //third_party/nix.

Change-Id: I419bae1a46bdccc7baa7327215aa2368ffc0f01c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13043
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: fogti <fogti+devel@ytrizja.de>
Reviewed-by: tazjin <tazjin@tvl.su>
2025-01-30 02:19:06 +00:00
Luflosi
2c76d92a87 feat(tvix/nix-compat/narinfo): roundtrip missing References
We aim to produce bit-identical output when roundtripping.

Change-Id: Iffc9dbd100f5239c948ee02c11b7735fda30bbc9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13025
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Lukas Zirpel <luflosi@luflosi.de>
2025-01-19 13:52:09 +00:00
Luflosi
860b374a54 feat(tvix/nix-compat/narinfo): roundtrip special compression algorithms
Roundtrip `Compression: none` and the default compression algorithm (`Compression:` missing).
We aim to produce bit-identical output when roundtripping.

Change-Id: I9db00db4b15b71f33f34ff3308a8e12d7deec5f4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13004
Autosubmit: Lukas Zirpel <luflosi@luflosi.de>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2025-01-19 10:22:48 +00:00
Vincent Ambo
c49297d9ad chore(3p/sources): bump channels & overlays (2025-01-12)
This (temporarily) bumps the nixpkgs channel to nixos-unstable-small, because it
has an update I really want, and also to stress-test the new builders.

Included fixes:

* disabled tests in niri to avoid a flaky test; this is fixed upstream already,
  but the change is still percolating through
* regenerated Go protobufs

Change-Id: Ia09fdc38f620fe8301c2111b0e4c142f37df2dd5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12991
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2025-01-15 11:57:22 +00:00
Vincent Ambo
c7fa114295 docs(tvix): mention channels separately
Returns the original (pre community split) channel into a more prominent
position, and explicitly mentions that #tvix-dev is for the community
centered around the new store model.

This relates to b/431, and is part of the transition setup while we
figure out how to organise the project split.

Change-Id: I0d8c5e86c914f51db222b054d51038e2023281d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12950
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: tazjin <tazjin@tvl.su>
2025-01-04 14:53:24 +00:00
edef
07d2781d5b feat(tvix/nix-compat/narinfo): roundtrip unknown-deriver
We aim to produce bit-identical output when roundtripping, and this
applies to legacy formats as well.

Change-Id: Iaec7d6bb5c5e305ec5e1b78c6968226dee9a0d90
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12943
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2025-01-02 09:02:15 +00:00
edef
bee52c2579 feat(tvix/nix-compat/narinfo): don't allocate error field names
We know these names statically, so we can just use &'static str.

Change-Id: I81cb7ecc4d7553f57baca74464c120a143586fe6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12941
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2025-01-02 07:45:26 +00:00
Vincent Ambo
54f72afcda chore(3p/sources): bump channels & overlays (2024-12-31)
Last one of the year! С наступающим)

Fixes:

* users/wpcarro: remove use-package from emacs packages (it has been built-in
  for a while now)
* users/sterni: the same thing
* users/aspen: remove `coz`, forwardport `gdmap` from stable
* users/flokli: dropped corneish_zen firmware from CI
  This firmware depends on a non-reproducible FOD which, when updated, causes
  build failures. We have worked around this repeatedly, but it needs to be
  fixed properly.
* tvix: regenerate Go protobufs
* tvix: address new clippy lints
* tvix/{castore,store,build}-go: update grpc/protobuf libraries
* tvix/eval: formatting fixes
* 3p/overlays/tvl: work around GCC 14 -Werrors

Change-Id: Ice5948ca7780192fb7d2abc6a48971fb875f03c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12933
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2025-01-01 17:35:13 +00:00
Florian Klink
bd73dff0bf fix(nix-compat): support Deriver: unknown-deriver NARInfos
According to c60715e937,
these were produced by a legacy tool and should be considered as if
Deriver was not passed at all.

See: https://github.com/kalbasit/ncps/issues/171
Reported-In: https://github.com/nix-community/go-nix/pull/128
Change-Id: If285a11c3275cb3c857c68782bd13473c46f04bf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12940
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2025-01-01 16:10:48 +00:00
Florian Klink
1713709ab4 chore(tvix): update crate dependencies
Change-Id: Ia48b1774e52d8197e93e9a6444857470a7895926
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12932
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2025-01-01 13:27:56 +00:00
sterni
bd4da5f444 fix(tvix/eval): don't mark locals as used in resolve_local
resolve_local isn't exclusively used to compile variable access, so we
shouldn't automatically mark a local as used when it's called.
Specifically, the optimiser would call `is_user_defined`, causing locals
to be marked as used even when they weren't, erroneously silencing the
unused local variable warning.

For resolve_upvalue I've opted not to do the same, instead renaming the
function to make its behavior clearer. The reason for this is that
resolve_upvalue is only used in the code for the purpose of compiling
variable access and mark_used for upvalues would be needlessly
expensive, as it requires recursing through enclosing contexts.

Supersedes / alternative to cl/12708.

Change-Id: Ib4a4a9dfcecf710ab2766b03d0a0cc09245c2d0a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12869
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-12-31 21:30:31 +00:00
Florian Klink
9fa198f9ae chore(tvix): use bigtable_rs from crates.io
We don't need to use a git checkout here anymore.

Change-Id: I99641a4908f39799c8be6a1610ae458ca6fdc5ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12931
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
2024-12-30 11:38:25 +00:00
Florian Klink
06311444aa chore(tvix): simplify Cargo.toml
Use dotted keys where we'd else have maps with a single key.

Change-Id: I9389e0fedddad1cf65f870a3a68415a0defaa259
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12929
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-30 10:23:31 +00:00
Florian Klink
74f2e86fcd fix(tvix/shell): s/buf-language-server/buf/
'buf-language-server' was removed as its development has moved to the
'buf' package.

Change-Id: If1ef36ed54926644debc914817bf4afea8bf2264
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12928
Reviewed-by: lukegb <lukegb@tvl.fyi>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-29 18:06:03 +00:00
sterni
08981e63c6 chore(3p/sources): Bump channels & overlays (2024-12-02)
* //tools/nixery/popcount:
  replace removed buildGoPackage with buildGoModule.

* //users/aspen/system/system/modules:
  pkgs.nerdfonts has been removed. Instead we have a
  pkgs.nerd-fonts attribute set that contains all fonts
  as individual derivations.

* //users/tazjin/presentations:
  The ms package was removed from texlive for some reason
  in the latest release. Replace it with the packages it
  bundles (according to CTAN).

* //tvix/verify-lang-tests:
  Test on latest Nix release 2.25.2.

* //tvix/*-go:
  regenerate code from protobufs.

Change-Id: I19fcb3a0267f929f6e7388aa69ad99ac53b62236
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12859
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-12-29 15:02:22 +00:00
Florian Klink
661a80ac3b fix(tvix/nar-bridge): set FileSize to NarSize
Nix and Lix both report this quite wrong when showing progress, they
assume 0.00 MiB of download size:

```
these 3 derivations will be built:
  /nix/store/m6dkr67hk87lpcz9wv8f2mp2zrgsyfp9-nix-2.24.11.drv
  /nix/store/zcfi6vs0z18309asw8fpa9v3665av44v-niv-0.2.22.drv
  /nix/store/g4kvzrs1kk9i13vaa8q1r0y4hgsqsnlp-dev-env.drv
these 112 paths will be fetched (0.00 MiB download, 2649.76 MiB unpacked):
  /nix/store/3qzlg8h5qc1slypy99aafdcgkzj6974h-OneTuple-0.4.2
  /nix/store/pp4540rig52fnj66kz1kiaj1000ja9v0-QuickCheck-2.14.3
  /nix/store/416aqss6p59w6v92127hkz04v0bclx21-StateVar-1.2.2
  /nix/store/b5f93spm2cl9g6x73dnx7ns5irs739fz-aeson-2.1.2.1
  /nix/store/nqnx6k6y103rargdz2gai2rmi389zn6n-aeson-pretty-0.8.10
  /nix/store/11wc4s6a6qi98lxikacw746slhmj5dl7-ansi-terminal-1.0.2
  /nix/store/yy7j66av9lwh3lvbxp1zv7572wb4l7dj-ansi-terminal-types-0.11.5
  /nix/store/cn6m459cbacdwkvjllgy5hkzf045yc1g-appar-0.1.8
  […]
```

For now, set FileSize to NarSize - it's not more wrong than it was
before, Nix already supports content encoding for compression (via
curl).

Reported-On: https://git.lix.systems/lix-project/lix/issues/606
Change-Id: Ia53506ecf6678ad298f759c95a69feb441cbc26d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12919
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-27 12:04:41 +00:00
Florian Klink
6e4f067054 test(tvix/nar-bridge): add NARInfo handler tests
Change-Id: I245ab38c30bb27c941274b2621aecccb695dacd0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12918
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 12:04:09 +00:00
Florian Klink
30b631ea72 test(tvix/nar-bridge): start testing handlers
We currently only had some integration tests (as part of tvix-boot)
testing nar-bridge functionality as a smoketest, but with axum-test we
can test individual handlers and peek at the store afterwards, which is
much more granular.

This adds tests for the nar-specific request handlers.

Change-Id: I7f2345df89ac43b9b372ecc66f696e95e2fcad18
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12916
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
2024-12-27 12:03:06 +00:00
Florian Klink
4f9112f1cd refactor(tvix/nar-bridge): move narinfo_str gen to helper
Change-Id: I2d3b135f63f17adc540d63d3ecaef4fb555bca74
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12917
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 12:01:34 +00:00
Florian Klink
7c0c270932 refactor(tvix/store): expose fixtures, make NAR_CONTENTS const
Allow reusing CASTORE_NODE_* and NAR_CONTENTS_* from other crates.

Also, there's no need for NAR_CONTENTS_* to be Vecs of bytes, these can
just be [u8; _].

Change-Id: I435c08a9d20f6a68266d0c9a70bfc7fdb618ce42
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12915
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 12:01:03 +00:00
Florian Klink
6068d044b3 feat(tvix/nix-daemon): instrument for TvixDaemon
This makes it easier to see what's being communicated, by setting
`RUST_LOG=nix_daemon=debug`.

Change-Id: Ifcd89ff6c5c1727e97569e29d4f63993cc37ed8e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12884
Tested-by: BuildkiteCI
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
2024-12-15 18:14:10 +00:00
Ilan Joselevich
1cc4200b3e feat(tvix/boot/tests): Replace GNU parallel with rush
rush is like GNU parallel, but in Go, and most importantly, without
the annoying citation.

Change-Id: Id4737e6dee43037c1c2bc814738416410a603e07
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12887
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-12-10 10:17:15 +00:00
Florian Klink
b4ab3b45d7 docs(tvix/boot): update docstring
mkBootTest is not limited to only listing files, it can also be used (is
used) to boot init.

Change-Id: Iaa0d2b5bad3be856aa8a0172450efe166620ba41
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12882
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-12-09 22:11:50 +00:00
Florian Klink
12c9db5a9a refactor(tvix/nix-daemon): use if let Some(_) = …
This makes it a bit less verbose.

Change-Id: I41835f43628d7a10855b9d89816e8d20eb7546d2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12881
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: Domen Kožar <domen@cachix.org>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-12-09 14:51:49 +00:00
Florian Klink
adf9c47626 docs(nix-compat/nix_daemon): fix typo
Change-Id: I9bc9982faa0abc8212e15916a3435dd0cfd0e54d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12880
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Domen Kožar <domen@cachix.org>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-12-09 14:51:49 +00:00
Florian Klink
5b278cc6ab refactor(nix-compat/nix-daemon): s/result/results/
There's more than one result in there.

Change-Id: I5d519db51fda050ed293bfb52215a643882e0116
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12879
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-12-09 14:51:49 +00:00
Florian Klink
2879969f1b chore(tvix): bump tower-otel-http-metrics, enable axum feature
Move back to a proper release containing the opentelemetry bump. Also
enable the `axum` feature, which will give us a per-route accounting.

Change-Id: Icdf4dc73588ef45b6596b320c14d9f44946327b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12865
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-04 21:52:42 +00:00
Vova Kryachko
88d51c9c16 chore(tvix/nix-compat): basic daemon handler tests
This change adds tests for basic request/response handling as per nix
daemon STDERR_* protocol.

Change-Id: Ia6a1904e14955551b11f776b6ccb595fa8984513
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12852
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com>
2024-12-01 17:58:17 +00:00
Florian Klink
8d4a0ac008 refactor(tvix/glue): make user-agent more granular
Use the crate name in the user-agent, similar to tvix-[ca]store.

Change-Id: I10527fb1f29006dbfd8630d8bb1f00d7905efdd3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12851
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-29 08:09:50 +00:00
Florian Klink
9fabf8a1b5 feat(tvix/castore): set user-agent for object_store blob/directorysvc
Change-Id: I9fcebffb19174cba2e9001398419d3041266400c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12850
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
2024-11-29 08:09:50 +00:00
Florian Klink
fa305dea90 feat(tvix/store): set user-agent for NixHTTPPathInfoService
Change-Id: I8eb74c5a9457b88ab51bd88084591a4c7c5cdbcc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12849
Reviewed-by: Domen Kožar <domen@cachix.org>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-29 08:09:50 +00:00
Vova Kryachko
b59561b9b1 chore(tvix/glue): Fix fetchTarball for github urls.
GitHub does not allow downloads by clients without a User-Agent set.
This changes sets the client User-Agent to "tvix".

Change-Id: I829b37e63bcedb5ea785b55eff5b10175f5caaa6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12845
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-28 17:16:28 +00:00