about summary refs log tree commit diff
path: root/web/cgit-tvl (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
7 hours r/8114 refactor(tvix/castore/directoryservice/memory): use tokio RwLockFlorian Klink1-3/+4
We don't want to block here, and this also means there's no poisoning to deal with. Change-Id: Ic375571970c48beace0005ae2c012135086a4d67 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11613 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
7 hours r/8113 refactor(tvix/castore/blobservice/memory): use parking_lot RwLockFlorian Klink5-31/+27
This one doesn't require us to deal with poisoning, is upgradeable and the right thing to use when locking access to data, not IO resources. Change-Id: I78634953a73404500d28f51f1d93a87e215c8149 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11612 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
7 hours r/8112 refactor(tvix/store/pathinfo/memory): tokio RwLock, improve list()Florian Klink1-14/+14
We don't want to use the std::sync::RwLock here, as it blocks. This also means we don't need to deal with the error cases anymore. The list() implementation is updated to use try_stream, which means we can now avoid collecting everything into a Vec before returning from it. Change-Id: I9057dcc410dc553e6b1be3f20d5ee830569e8218 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11611 Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
7 hours r/8111 docs(tvix/docs): async nar reader is doneFlorian Klink1-4/+1
Change-Id: I4e8fd03d521b7d30904f84a6afcf842f1505ec7b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11628 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
7 hours r/8110 docs(tvix/todo): add section on [ca]store errorsFlorian Klink1-0/+7
Change-Id: I832eed8abb62b7e13972ed58649a96e31b17f033 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11610 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
7 hours r/8109 docs(tvix/todo): update test suite sectionFlorian Klink1-4/+13
nix_oracle is quite misleading, and fooled me into thinking this validates all .exp files in the repo to match Nix output (which it doesn't, that's done by verify-lang-tests). Also, the whole test suite structure thing can use a bit more explanation. Change-Id: I2fadcc871843143270ad2ed9ac98de8287280e6f Reviewed-on: https://cl.tvl.fyi/c/depot/+/11609 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
8 hours r/8108 chore(tvix/narinfo2parquet): bump dependenciesFlorian Klink2-27/+135
Get rid of the RUSTSEC warnings. Also upgrade tokio to drop the Sized requirement, similar to cl/11608. Change-Id: Idc6fece23c79eb30fd1dfc5fe64fa2e4c08cd412 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11624 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
8 hours r/8107 chore(tvix): update dependenciesFlorian Klink2-57/+57
Get rid of the RUSTSEC warnings. Change-Id: I949f5173eb3e807f2de497f2eb94493f7a331e18 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11623 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
8 hours r/8106 feat(tvix/store): add LruPathInfoServiceFlorian Klink5-1/+341
This provides an implementation of PathInfoService storing PathInfo in memory up to a certain capacity, then evicting these that have been used the least recently. Change-Id: I9d738687caf4f181a957f72245f26b92832313cd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11622 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
8 hours r/8105 refactor(tvix/store/pathinfo/sled): drop {blob,directory}_serviceFlorian Klink2-31/+10
These are not used anymore. Change-Id: I9c348391c9600e9319f171faf3eda7175ebf7076 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11621 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
8 hours r/8104 refactor(tvix/store/pathinfo/memory): drop {blob,directory}_serviceFlorian Klink3-26/+6
These are not used anymore. Change-Id: I6c16b4d80ddaabcb75fec3ea3e32b923b7719485 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11620 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
9 hours r/8103 refactor(tvix/store): drop calculate_nar from PathInfoServiceFlorian Klink20-187/+241
This shouldn't be part of the PathInfoService trait. Pretty much none of the PathInfoServices do implement it, and requiring them to implement it means they also cannot make use of this calculation already being done by other PathInfoServices. Move it out into its own NarCalculationService trait, defined somewhere at tvix_store::nar, and have everyone who wants to trigger nar calculation use nar_calculation_service directly, which now is an additional field in TvixStoreIO for example. It being moved outside the PathInfoService trait doesn't prohibit specific implementations to implement it (like the GRPC client for the `PathInfoService` does. This is currently wired together in a bit of a hacky fashion - as of now, everything uses the naive implementation that traverses blob and directoryservice, rather than composing it properly. I want to leave that up to a later CL, dealing with other parts of store composition too. Change-Id: I18d07ea4301d4a07651b8218bc5fe95e4e307208 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11619 Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
9 hours r/8102 fix(tvix/store/pathinfo/sled): use spawn_blockingFlorian Klink1-22/+45
This does IO, which might take a longer amount of time than what we want to be blocking the normal executor. Use spawn_blocking instead. I didn't add it for the constructors, as we only call these once. Change-Id: I9a1063099bac9582ca9681043c58c1edc780c5ff Reviewed-on: https://cl.tvl.fyi/c/depot/+/11618 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
9 hours r/8101 fix(tvix/castore/directory/sled): use spawn_blockingFlorian Klink1-39/+60
This does IO, which might take a longer amount of time than what we want to be blocking the normal executor. Use spawn_blocking instead. I didn't add it for the constructors, as we only call these once. Change-Id: I96231fcff8d10abe90cafde25a099a2db6ea9414 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11617 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
9 hours r/8100 chore(tvix/castore/blob): remove sled implementationFlorian Klink5-202/+3
This never did any chunking, and sled (rightfully) performs really bad if values get too large. We switched the default to using the objectstore backend with the local filesystem a while ago, no need to keep this footgun around anymore. Change-Id: I2c12672f2ea6a22e40d0cbf9161560baddd73d4a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11616 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
9 hours r/8099 refactor(tvix/store/pathinfo/grpc): simplify pingpongFlorian Klink2-76/+7
We already have the same code in make_grpc_path_info_service_client. Change-Id: Ibcd60831af8a061a2c3bb2f960f52a43d06cf6fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/11615 Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
10 hours r/8098 fix(users/flokli/keyboards/*): fix flash commandFlorian Klink2-16/+20
`qmk flash` disappeared from the `qmk` command itself. See `qmk_cli/script_qmk.py`: ``` This program can be run from anywhere, with or without a qmk_firmware repository. If a qmk_firmware repository can be located we will use that to augment our available subcommands. ``` By pointing QMK_HOME to our firmware sources, we can make it re-appear. Change-Id: I5348fff546e864773063fb1f712bf2abd198972e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11627 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: flokli <flokli@flokli.de>
14 hours r/8097 feat(users/amjoseph): initAdam Joseph2-0/+25
Change-Id: Icfc73faa951b2ad041f2cecdae0614a3b6b82426 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11625 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: Adam Joseph <adam@westernsemico.com>
2 days r/8096 feat(tvix/cli): Use the same TvixStoreIO for the full runtimeAspen Smith1-16/+26
This specifically allows subsequent fetch calls in the REPL to avoid fetching the same path twice (because they share the same PathInfoService). Change-Id: Ieda089080174913a8c014f13d6852cac599a7e17 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11484 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: aspen <root@gws.fyi>
3 days r/8095 refactor(nix-compat/nar/reader): reuse prev_name allocationedef8-50/+73
We reuse the prev_name allocation for Entry, instead of allocating and returning a separate Vec. We encode the `prev_name: None` case as an empty vector, since we don't allow empty names anyway, and the sorting is equivalent. Change-Id: I975b37ff873805f5ff099bc82128706891052247 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11607 Reviewed-by: Brian Olsen <me@griff.name> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
3 days r/8094 feat(nix-compat/wire/bytes): read bytes into an existing bufferedef1-1/+60
For small bytestrings (like NAR names), we can read into a preallocated fixed-size buffer, instead of allocating a Vec every time. Change-Id: Id8da9e9cea99c814361230c0ec02606b731c79a3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11606 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
3 days r/8093 feat(tools/when): support more timestamps with better merging logicVincent Ambo1-15/+72
Adds a FieldSet type which defines which parts of a timestamp to merge into another in a new `mergeTime` function. With this two timestamps can be merged granularly, enabling more queries like `Sep 03 18:00` to return useful results (e.g., in this case, in the current year and location). Change-Id: I8db161608c5f68c8f9c61de8c6fa46067eced39b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11601 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
3 days r/8092 feat(tools/when): try to parse input as one segment firstVincent Ambo1-0/+8
Before getting clever about durations & stuff, try to parse the whole thing at once. This is useful for plain timestamps that contain spaces, like `2024-01-01 15:00:01` for example. Change-Id: I50b0ee8488c153b4e6db75abaea409d55c0b92d6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11600 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
3 days r/8091 feat(tazjin/nixos): install `when` everywhereVincent Ambo1-0/+1
Change-Id: I49f201250cbcbba98e0641c2868e1cb2230d6b3b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11599 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su>
3 days r/8090 feat(tools/when): simple time-conversion toolVincent Ambo2-0/+147
I often need unix timestamps, or have unix timestamps, or need timestamps at certain relative offsets etc. This adds a tool called `when` which can do all of this. It has basically no user interface, you just call it with a time query and it does it if it understands what you meant. This will get smarter over time as I find more uses. Example: ~> when yesterday 5PM Local: Mon 06 May 2024 at 17:00:00 MSK UTC: 2024-05-06T14:00:00Z UNIX: 1715004000 It supports all kinds of queries already, see the usage for details. Change-Id: I694ffef7608586acfb1ff8010ac0fac4d9951e2e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11598 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: tazjin <tazjin@tvl.su>
4 days r/8089 chore(tvix/tools/crunch-v2): upgrade tokioedef2-5/+20
This drops the Sized requirement on AsyncReadExt. Change-Id: I2a89c708922ca528cb493aefd0613f477f648e83 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11608 Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
4 days r/8088 refactor(nix-compat/wire/bytes): style fixesedef1-13/+10
Change-Id: I65c3c43df83e0c364a4b7f1f3054c5b676bd07d5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11605 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
4 days r/8087 fix(nix-compat/store_path): use Box<str>edef1-8/+5
We don't actually build up names in place here, so we don't need a capacity field. Saves 8 bytes. Change-Id: Icb01b45561e28fd525b726612f56d4640bc834c7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11604 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
4 days r/8086 feat(nix-compat/wire/bytes/reader): support buffered readingedef3-6/+195
If our underlying reader supports AsyncBufRead, then we can too. Change-Id: If4b948c983400ca591c1c475bbcf7dc00d562040 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11545 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
4 days r/8085 fix(nix-compat/wire/bytes/reader): always read trailer tag dataedef3-16/+73
Even if we have an aligned (or zero) size (and thus have no padding), we may still have a non-padding trailer. Since an exact read of only the user data bytes must always read the trailer bytes as well, this has to happen for aligned sizes too. For zero-sized trailers, we solve this by reading immediately, since no read is required of the user at all. user_len thus becomes a NonZeroU64, and the definition of "body data" is adjusted to always exclude the final block. Change-Id: I2c6bb51270fb22ad72a65076a3468673ab56ef68 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11597 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
4 days r/8084 fix(nix-compat/wire/bytes/reader): drop allow(dead_code)edef1-1/+0
We're using this in the NAR reader now. Change-Id: I28f17b1ccedd62ffcaf2fa32b517f16bcd036d94 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11603 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
4 days r/8083 refactor(nix-compat/wire/bytes/reader): drop prev_fillededef1-2/+1
We specifically structured the code this way to allow using `this.filled` as-is, so we should use it. Change-Id: I7e11bddceb4d5f37b1dd4c453a9d53b85fc1f6c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11602 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
5 days r/8082 refactor(tvix): remove usage of async-recursionConnor Brewster8-68/+19
Rust 1.77 supports async recursion as long as there is some form of indirection (ie. `Box::pin`). This removes the need to use the async-recursion crate. Change-Id: Ic9613ab7f32016f0103032a861edff92e2fb8b41 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11596 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
5 days r/8081 fix(tvix/store/pathinfo/nix_http): update error messageFlorian Klink1-1/+1
Autosubmit was too fast and submitted this before my push went through. Flagged in https://cl.tvl.fyi/c/depot/+/11580/comment/40a56824_7be73334/ Change-Id: I1f835ae60c2c6fd2db6654c1b1c71d90bee141af Reviewed-on: https://cl.tvl.fyi/c/depot/+/11595 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
5 days r/8080 feat(tvix/store): use async nar reader for ingest_narFlorian Klink7-351/+212
Rename read_nar to ingest_nar, and have it use the async nar reader version, and the ingest_entries machinery. This means we can now drop all code dealing with manually assembling castore nodes. Update our consumer, NixHTTPPathInfoService to use the new API. As we now accept an AsyncRead, we don't need to do any blocking here anymore, and can use the same async-compression crate as in the fetching logic (and support some more compression formats out of the box). Change-Id: I8646d20bd8603f8da47b5c84bc9e4ac236eb7f1a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11580 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
5 days r/8079 test(tvix-castore/import): add tests for ingest_entriesFlorian Klink1-3/+138
Change-Id: Ia7906533868fd948509419e0d64b64582575a7fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/11591 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
5 days r/8078 fix(tvix/castore/import): assert end of streamFlorian Klink1-0/+5
Once we break out with the root node, there may be no more elements in the stream. Change-Id: I6f5fc5662095aa2b2a56bcad506d25520d9ad00c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11592 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
5 days r/8077 fix(tvix/castore/import): deal with entry.path() not having a parentFlorian Klink1-7/+9
We got away with not properly dealing with this for the archive case, where everything is contained inside a toplevel dir, but NARs can encode a single file/symlink. Properly break if the IngestionEntry path has the ROOT as parent, and only create filling directories in the other case. Change-Id: Ib378d0d1040de7c3fe310912a0b0488c55afee83 Revi