about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-19 r/7738 chore(users/flokli/ipu6-softisp): refresh libcamera patchesFlorian Klink33-3652/+3858
Refresh them with the patches from https://patchwork.libcamera.org/cover/19663/. This is still based off v0.2.0. Change-Id: I875fd64e3bb71a95c92af1108a23d27c0f3494e0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11179 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: flokli <flokli@flokli.de>
2024-03-19 r/7737 feat(users/flokli/ipu6-softisp): test pipewire & wireplumberFlorian Klink1-0/+7
This ensures we also test building pipewire. Change-Id: I7527ca2e4259f26fecd453f5da5d91bbd3862bb3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11178 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-03-19 r/7736 fix(tvix/eval): propagate errs from key comparison in genericClosuresterni3-7/+17
The accompanying test case shows that we need to bubble up the catchable error from the equality check if one is created. Change-Id: Ic9929a57aa7653c8aa5a72d1711cf3264798c731 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11159 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
2024-03-19 r/7735 fix(tvix/eval): don't force lambda arg in map, mapAttrs & genListsterni8-4/+38
It is pretty pointless to force the function argument if we are going to use a suspended call later since forcing the function may fail in ways that are not covered by Catchables (non-recoverable errors, infinite recursions). From this, it kind of seems as if using #[catch] is never correct and should be replaced by #[lazy]. Also we should probably try to come up with more test cases for stuff where laziness gets us out of the jam as an equivalent to the catchable tests for nonrecoverable errors. Fixes b/386. Change-Id: Ia926df4ac1b440ec430403ab7b40924a0c97221b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11153 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org>
2024-03-18 r/7734 chore(3p/sources): bump channels & overlays (2024-03-17)Vincent Ambo6-1073/+1993
In hope that iwlwifi works again on this commit, and I don't actually have to debug it. Includes following changes: * users/aspen: home-manager is shuffling around pinentry options again * users/flokli: rebase ipu6-softisp patches to Linux 6.8 make cl/11097 a separate patch * ops/modules: remove unused (and now broken) v4l2loopback module Co-Authored-By: Florian Klink <flokli@flokli.de> Change-Id: I763f1f075778f2ed8db7803f87248c9dabde4213 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11174 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: aspen <root@gws.fyi> Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2024-03-18 r/7733 refactor(tvix/store/import): use B3Digest in log_nodeFlorian Klink1-5/+3
Change-Id: I2347bbae8e7d4e19eeed4a3fb13729d0a94feedd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11195 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-03-18 r/7732 refactor(tvix/store/pathinfo/nix_http): NixHash to display NARHashFlorian Klink1-3/+5
This will give us the sha256: prefix, and hashes we're more used to, in that context. Change-Id: I72e42fe685e365ba9baa7cd81001387d239fa7c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11194 Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-03-18 r/7731 refactor(tvix/store/nar): use B3Digest in RenderErrorFlorian Klink1-5/+4
Ensure consistent formatting of blake3 digests. It looks like we don't actually construct these error types anywhere, so no code needs to be refactored to it currently, but still good to be consistent. Change-Id: I49dc8a7f3cb4245ac06b9a6a44b72060434a3d32 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11193 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2024-03-18 r/7730 refactor(tvix/castore/blobsvc): use B3Digest Display implFlorian Klink2-10/+2
We don't need to use BASE64 here on our own, B3Digest has a Display impl. This will also make sure the `b3:` digest is present in field values. Change-Id: I0ce6ee0f7e7e99fb9b16872953a1b742e99be291 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11192 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2024-03-18 r/7729 feat(tvix/boot): make VM cmdline and asserted VM output configurableFlorian Klink1-2/+8
This can be used in the future to boot proper NixOS VMs, which want a init= in their cmdline. Change-Id: Iad4a25d5081f3a6af1c7f62f15853f3afaae4a0c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11190 Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-03-18 r/7728 fix(tvix/boot/tests): disable otlpFlorian Klink2-3/+8
We don't have a OTLP collector inside the Nix build, this removes some noise from the log about not being able to reach it. Change-Id: I058839c8f214821b536306c8c30e1a8e7192153b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11189 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-03-18 r/7727 feat(tvix/boot): support seeding closures via nar-bridgeFlorian Klink1-42/+99
This updates the parameters mkBootTest can be called with. It now accepts a `path`, and then either importPathName needs to be set, or isClosure needs to be set to true. The former activates the existing functionality, tvix-store import is used to import contents as a NAR-addressed store path. The latter uploads the path as a closure (so including its references, and keeping the store paths intact) to tvix-store. We use nar-bridge, and the HTTP interface it provides to do this. As `nix copy` can't be used inside a Nix build, we use `pkgs.mkBinaryCache` to come up with the .narinfo and .nar files that would be in a binary cache, and then use a bit of GNU Parallel and bash to upload store paths ourselves. Change-Id: Icfa5c0af0c22ab5418686947aa2c060f5987b873 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11188 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2024-03-18 r/7726 docs(tvix/boot): document we could use a smaller kernel here.Florian Klink1-0/+2
We currently use a pretty big kernel to boot the tvix VMs, with a lot of drivers. It can probably be slimmed down significantly, at least on the hardware driver and filesystem front. Change-Id: I4c7f73fb2dafbf2bcdec8057d2b14a9b0e9b3275 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11187 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
2024-03-18 r/7725 feat(tvix/boot/tests): make urls and paths configurableFlorian Klink1-16/+39
Fork off a long-living tvix-store daemon in the background, and have both the import, as well as the virtiofs invocation connect to that one, rather than use the underlying storage directly. This also opens up the potential to have other things seed the store (like nar-bridge). Change-Id: Ie13aedaf7ab31e5ebe78a7be42f144af3920fa9c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11186 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-03-18 r/7724 feat(tvix/blobservice/object_store) more loggingFlorian Klink1-1/+3
Have derive_{blob,chunk}_path emit trace-level events for both the values they're called with, as well as the return value. With RUST_LOG in place, it doesn't get lost in other unrelated noise. Change-Id: Id2451e3657324eff482841eb26a22d19e22bde30 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11136 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2024-03-18 r/7723 feat(tvix/store): support RUST_LOG env varFlorian Klink4-20/+153
This allows selectively increasing the log level for only parts of the stack. For example, the following RUST_LOG env var enables "tracing" level logging for `tvix_store` and `tvix_castore`, while keeping it at "info" for the rest of the stack: export RUST_LOG='info,tvix_store=trace,tvix_castore=trace' It only affects logs, not traces (if enabled). Change-Id: Ib936bd132a405f216e75c843db83fbd71d20a18a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11182 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-03-18 r/7722 feat(tvix/castore/blobsvc/grpc): read data in chunksFlorian Klink1-26/+54
Whenever this encounters an open_read(), it'll first check for more granular chunking. If there's more granular chunking data available, a ChunkedReader is constructed (which supports seeking backwards). This currently is still a bit stupid, and doesn't compose, as `ChunkedReader` uses `self` as the `BlobService` to ask for the individual chunks. In store composition future, we might want to compose this differently, essentially constructing `ChunkedReader` with another `BlobService` representing the entire hierarchy, so there's a chance to locally cache things, and do less requests. Change-Id: I22e0df4d6245f666d083b4f0b7114d3ac41d1dce Reviewed-on: https://cl.tvl.fyi/c/depot/+/11185 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-03-18 r/7721 feat(tvix/nar-bridge): support listening on unix socketsFlorian Klink1-2/+16
This simply checks for the address to contain slashes, and if so, opens a unix socket, rather than a tcp one. We'll use this in //tvix/boot tests to simplify waiting for nar-bridge to be up. Change-Id: I7184f548d57142b1c5f698a1f0c30343489373a5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11184 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-03-18 r/7720 refactor(tvix/castore/src/blobservice): remove useless else caseFlorian Klink1-4/+3
Change-Id: I09000371a1d8ff212ab46050d1a480509c6ffe70 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11183 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2024-03-17 r/7719 feat(tvix/castore): impl Debug for B3DigestFlorian Klink1-1/+7
Use the same format as Display, b3: followed by the base64 representation. This makes the debug implementation of everything containing a b3 digest much nicer to read. Change-Id: I3ca3154d0b6fb07781c8f9c83ece3ff1a6957902 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11181 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2024-03-17 r/7718 fix(3p/overlays): upgrade tpm2-pkcs11, but add unmerged patchVincent Ambo3-109/+37
Instead of pinning to an old version, move forward but with a fix for the critical bug that's been preventing me from upgrading. The project seems to be unmaintained upstream, but I took the fix from the open pull requests. Change-Id: I85c8f780b1e363bac4060dd89b1930a6e59ce2a3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11145 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de>
2024-03-17 r/7717 chore(3p/sources): Bump channels & overlayssterni9-23/+25
- agenix has not been updated (https://github.com/ryantm/agenix/pull/241). - //tvix: regenerate protobuf files - //tvix:clippy: work around https://github.com/rust-lang/rust-clippy/issues/12281 which exclusively causes false positives in our code at the moment. Change-Id: I38d2f4c0e6d1abc92be360b06f58e6d40e7732a3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11127 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
2024-03-17 r/7716 feat(users/Profpatsch/whatcd-resolver): render anon json+ld objsProfpatsch1-42/+66
Some json+ld objects cannot be expanded any further, they are missing the `@id` tag. Now we also render them as objects. Change-Id: I1c8f26f3c34e69420c349e66a3ce5a36dc55a1ea Reviewed-on: https://cl.tvl.fyi/c/depot/+/11173 Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-17 r/7715 feat(users/Profpatsch/whatcd-resolver): add autorefreshProfpatsch4-9/+82
Adds a little polling mechanism that compares against an ID that is generated anew every time the server is restarted. Works well together with shortcuttable. Change-Id: Icc6745b599e43881c14349794feaf5794cfe6777 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11172 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-17 r/7714 feat(users/Profpatsch/whatcd-resolver): add services & readmeProfpatsch7-1/+61
Gives a story for running both jaeger and the reverse proxy, and the program proper. `postgres` is still run from the client. Adds a little readme. Change-Id: I11185028541c0214e152fd76c9c72b7e2eb11122 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11171 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-17 r/7713 feat(users/Profpatsch): add nix-run, nix-run-bin, nix-evalProfpatsch1-0/+159
Change-Id: I76f6fa4866c5792c4b9babe2c3a16401162ad833 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11170 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-16 r/7712 feat(users/Profpatsch/my-prelude): update librariesProfpatsch7-146/+514
The latest and greatest! Change-Id: I34c0e9f41b3b3cc727d9ea89c7ce6a43271b3170 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11169 Autosubmit: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7711 feat(users/Profpatsch): add shortcuttableProfpatsch1-0/+172
Initial mockup for a tool which restarts its subprocess on SIGHUP, and stops everything on SIGTERM and SIGINT. Change-Id: Ie5260d73c2663d1821eb6623e2bc61d16f6c92cd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11168 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-16 r/7710 feat(users/Profpatsch/execline): add setsidProfpatsch1-0/+22
Small wrapper around `setsid(2)` that does not exist in the execline-style tooling. Is probably gonna fail iff our process is a session leader already, but I haven’t tried that out yet. Change-Id: I1a820f1c6d65ddc29c30995bfd56a760a9d6b341 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11167 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7709 feat(users/Profpatsch/whatcd-resolver): log json+ld fetchingProfpatsch4-71/+98
This traces the target of a json+ld fetch. We also simplify the telemetry stuff by using a pseudo-class `MonadOtel` everywhere. I wonder if we can get rid of passing the span to `assertM`, because it’s kind of an antipattern to be honest. Change-Id: I1448d643c909a29684fa1ae54037177ba2c20639 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11166 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7708 refactor(users/Profpatsch/whatcd-resolver): move AppT & Html outProfpatsch5-172/+212
These functions are just general setup and html helpers, the main file is getting a bit long otherwise. Change-Id: I194e9f7f4caa4ce204d510c885dcf5af63d0e76e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11165 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-16 r/7707 chore(users/Profpatsch): remove more really dumb hlintsProfpatsch1-0/+2
Change-Id: Id7ca7e5716aba619bfe178c5c0831f2aa16c0257 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11163 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2024-03-16 r/7706 chore(third_party/haskell): pa-label: 0.1.0.1 -> 0.1.1.0Profpatsch3-32/+3
chore(users/Profpatsch/whatcd-resolver): use more from Label New label version contains these helpers. Change-Id: I3ef2ae9b92f2c798842ae001588b2c6d9f3ab971 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11162 Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7705 chore(tvix): bump tonic to 0.11.0Florian Klink6-168/+1152
This bumps tonic and surrounding crates to 0.11.x. We added support for tonic 0.11.x into tokio-listener (https://github.com/vi/tokio-listener/pull/4), so that's bumped as well. Change-Id: Icfade5894403228299836fefb21b2f9ae59dbebb Reviewed-on: https://cl.tvl.fyi/c/depot/+/11156 Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-03-16 r/7704 fix(tvix/eval): builtins.unsafeGetAttrPos returns path as a stringsterni1-1/+1
Change-Id: Ia1058a5ea687f413fbb62365da199032bdbd3fd2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11155 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org>
2024-03-16 r/7703 chore(users/Profpatsch): fix cabal.project & hie.yamlProfpatsch2-6/+0
Change-Id: I39bebe6ce2bde85d26a68b017c0e6d872e9b9705 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11161 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7702 fix(users/Profpatsch/httzip): fix PATHProfpatsch1-2/+2
Change-Id: I6f27a947fe609f7d6ce004ce5aaae76b32dbe4fc Reviewed-on: https://cl.tvl.fyi/c/depot/+/11160 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI Autosubmit: Profpatsch <mail@profpatsch.de>
2024-03-16 r/7701 fix(tvix): don't emit rerun-if-changedFlorian Klink3-6/+6
`build.rs` emits rerun-if-changed statements for all proto files, as well as all include paths we pass it. Unfortunately, due to protobufs include path rules, we need to specify the path to the depot root itself as an include path, at least when building impurely with `cargo`. This causes cargo to essentially always rebuild, as it also puts its own temporary files in there. Unfortunately, tonic-build does not chase down to individual .proto files that are included. Disable emitting these `rerun-if-changed` statements for now. This could cause cargo to not rebuild protos every time, causing stale data until the next local `cargo clean`, but considering the protos change not that frequently, and it'll immediately surface if trying to build via Nix (either locally or in CI), it's a good-enough compromise. Change-Id: Ifd279a2216222ef3fc0e70c5a2fe6f87997f562e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11157 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2024-03-15 r/7700 docs(tvix): fix some docstringsFlorian Klink4-5/+5
Change-Id: Ife599387d0472cd746b992bd6755a2fb6a0e0dc4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11158 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2024-03-15 r/7699 fix(depotfmt): only exclude *imported* tvix testsVincent Ambo91-272/+412
When we added the Nix language test suite in cl/6126, we excluded the whole tvix tests folder from Nix formatting. This is unintentional, as we probably want *our* tests to be formatted correctly. Change-Id: I2b66d79e30fae17e75d5a1f8c44e279886091c5f Reviewed-on: https://cl.tvl.fyi/c/depot/+/11154 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2024-03-15 r/7698 chore: move protoCheck into extraStep of //nix/bufChecksterni2-15/+23
Resolves b/385. I have a feeling bufCheck should be moved to //tools as well. Change-Id: I2a2b63d135a2f8bcc982aa1138ff3213c6012f20 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11152 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2024-03-15 r/7697 feat(nix-compat/wire): add read_bytes[_unchecked]Florian Klink2-0/+133
This introduces a version reading sized byte packets. Both read_bytes, accepting a range of allowed sizes, as well as read_bytes_unchecked, which doesn't care, are added, including tests. Co-Authored-By: picnoir <picnoir@alternativebit.fr> Change-Id: I9fc1c61eb561105e649eecca832af28badfdaaa8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11150 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr> Tested-by: BuildkiteCI
2024-03-15 r/7696 docs(nix-compat/wire): update docstringsFlorian Klink1-5/+4
These are not streams, but AsyncRead and AsyncWrite. Change-Id: I7d988fa0490800b72862f4f0fcac3dceac70ec26 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11149 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr>
2024-03-15 r/7695 feat(nix-compat/wire): add low-level wire format primitives codeFlorian Klink6-4/+157
This brings some initial Nix wire format parsing code, used in the nix daemon protocol, remote store/builder protocol, as well as the NAR format itself (note we already have more specialized code for the last one). Thanks to embr, this code already exists, in https://codeberg.org/gorgon/gorgon/src/branch/main/nix-daemon/src/wire.rs, and we can vendor it into here, as EUPL is compatible with GPL (in that direction). The code uses the tokio::io Reader and Writer traits, not the ones from the `futures` crate, as they provide some more convenient `read_u64_le` functions. More application-specific parsing code, as well as code to read strings, or bytes are left out for now, as we want to be be more restrictive w.r.t allowed max sizes, and need to parse bytes, not strings. The code slightly diverges, as we have clippy looped into CI. `Ok(…?)` can be turned into just the inner expression, and some .and_then can be expressed in a simpler fashion. Change-Id: Ie3adcb485e9d66786673b1962a08d4e5df3781d9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11148 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr>
2024-03-14 r/7694 refactor(nix-compat/derivation): emphasize aterm_bytesFlorian Klink1-12/+13
derivation_or_fod_hash constructs ATerm bytes and feeds them to sha256. input_derivations being slightly modified is an implementation detail, so move the BTreeMap construction inline, and have aterm_bytes in a let binding (and feed it to the hash function directly while constructing it). This makes it a bit more understandable what's going on. Change-Id: I2f5cfbd1c964fd39ac731ca39e76cfc168f4c7d7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11147 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: John Ericson <git@johnericson.me>
2024-03-14 r/7693 refactor(nix-compat/store_path): add from_name_and_digest_fixedFlorian Klink2-5/+17
Allow constructing a StorePath with a fixed-size digest. Change-Id: Id7d0b0152f6c55660a8973a02c84afa9188ce3ba Reviewed-on: https://cl.tvl.fyi/c/depot/+/11144 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: John Ericson <git@johnericson.me> Tested-by: BuildkiteCI
2024-03-14 r/7692 refactor(nix-compat/store_path/utils): move helper function inFlorian Klink1-8/+7
This is only used inside this function, in 2 of the match cases. Change-Id: Ib361f5ee0e3b203802f7d05b9a7f332d14bbcf80 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11143 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: John Ericson <git@johnericson.me> Tested-by: BuildkiteCI
2024-03-14 r/7691 refactor(nix-compat/store_path): take [u8;32] for outer fingerprintFlorian Klink5-51/+46
The outer fingerprint used for store path calculation is always a sha256 digest. This includes both input and output-addressed store paths. We used a NixHash here, which can also represent other hash types, and that had a bunch of annoyances: - Whenever we had the bytes, we had to wrap them in a NixHash::Sha256(). - Things like AtermWriteable had to be implemented on NixHash, even though we then had an assertion it was only called in the NixHash::Sha256 case. Change-Id: Ic895503d9b071800d2e52ae057666f44bd0ab9d6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11142 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: John Ericson <git@johnericson.me> Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr>
2024-03-14 r/7690 feat(ops/terraform/deploy-nixos): support argstr mapFlorian Klink1-3/+3
This allows setting argstr to a map of keys and values. We use jq to construct "--argstr k v" arguments, which are passed to nix-instantiate. Change-Id: I720a597ca2276364bc7005c156064d938f143041 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11141 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su>
2024-03-14 r/7689 refactor(ops/terraform/deploy-nixos): downcase bash variablesFlorian Klink1-4/+5
These are not environment variables, so let's shout less. Change-Id: I3132844937ee78b7230a46afc0240e0225a99f3e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11140 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>