about summary refs log tree commit diff
path: root/tvix/castore/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-08 r/6740 refactor(tvix/castore): simplify test_valid_unix_path_ping_pongFlorian Klink1-65/+47
We don't need to spawn two tokio runtimes anymore, and can do the URL parsing at once, too. Change-Id: I38ab96978cb7f8c31ded2726262e0b1366655094 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9566 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
2023-10-08 r/6735 refactor(tvix/castore): move tests to grpc client, rm tonic-mockFlorian Klink3-35/+63
Similar to gen_directorysvc_grpc_client, introduce a gen_blobsvc_grpc_client function that provides a gRPC client connected to a blobservice. The test is update to use that client to test against, rather than the server trait, removing the last usage of tonic_mock, so it's removed as well. Fixes b/243. Change-Id: If746e8600588da247eb53a63b70fe72f139e9e77 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9564 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
2023-10-08 r/6729 docs(tvix/castore): remove TODOFlorian Klink1-1/+0
This probably was about passing around directory_putter at some point, which we do, so whatever this meant, it's not actionable anymore. Change-Id: I1b4e0cdd2119bf2b2a9cf06d186a3b476b0ff367 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9573 Reviewed-by: Linus Heckemann <git@sphalerite.org> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-10-08 r/6728 refactor(tvix/castore): use DuplexStream instead of unix socketFlorian Klink3-76/+47
We can use DuplexStream to create to bidirectional pairs, which avoids manually waiting for unix sockets to pop up and connect, and creating temporary directoires to create the unix sockets in. Turns out, we also don't actually need to spawn the server in a separate runtime, it works just fine these days. This might be due to all the sync barriers in between being gone. Change-Id: I6b79823bc6209cbcb343b7a498c64a2ba6e0aee7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9562 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-10-08 r/6725 refactor(tvix/castore): move gRPC directorysvc tests off tonic_mockFlorian Klink1-74/+90
The tests were using the gRPC Service/Server interface, not the gRPC clients. Use our new gen_directorysvc_grpc_client() function to spin up a server in a separate thread, and test via that client, rather than *just* the server implementation. This is more correct, because we're now really exercising the gRPC stack, and some of the stream implementations are also only implemented on the client. Change-Id: I99434a2399856a44c9e6988d0b720f7a429d0ad1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9560 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-10-08 r/6724 refactor(tvix/castore/directorysvc): factor out gRPC client genFlorian Klink2-173/+178
Move this code into a helper function, which we'll use in other places in a bit. Change-Id: Icae6f6dd2d4b2fa86fd2b836ddd7a4ca0e0354e7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9559 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2023-10-05 r/6704 refactor(tvix/castore): move magic number to B3_LEN constFlorian Klink2-5/+7
… and export it. Change-Id: I47d2dc2f5a8174da65c614b43801d648506e2d73 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9544 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu> Autosubmit: flokli <flokli@flokli.de>
2023-10-04 r/6689 fix(tvix/castore): explicitly name lifetimes in process_entryedef1-3/+3
Otherwise this produces absolutely inscrutable errors: note: hidden type `[async fn body@castore/src/import.rs:63:1: 63:94]` captures lifetime '_#24r Change-Id: If5d9626c9edf400de5bcec038bcaa5a3117561f0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9506 Tested-by: BuildkiteCI Autosubmit: edef <edef@edef.eu> Reviewed-by: flokli <flokli@flokli.de>
2023-09-26 r/6660 chore(tvix/[ca]store): allow building without tonic-reflectionFlorian Klink1-1/+1
- rename the feature to `tonic-reflection` in both tvix-store and tvix- castore. - set it to disabled in tvix-castore by default - enable it in tvix-store, and pull in tvix-castore with the feature enabled. Change-Id: Ie22833d85569502cae55812f6eeb17a9c15b9e2c Reviewed-on: https://cl.tvl.fyi/c/depot/+/9472 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-09-22 r/6630 chore(tvix/castore): remove dependency on anyhowFlorian Klink1-3/+1
We don't use this here, except in a test, where we don't really use it either. Change-Id: Ia6c45fccf663fe328942b1e1a2cd1c3a1b7f9ae5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9376 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2023-09-22 r/6629 refactor(tvix): move castore into tvix-castore crateFlorian Klink30-0/+4785
This splits the pure content-addressed layers from tvix-store into a `castore` crate, and only leaves PathInfo related things, as well as the CLI entrypoint in the tvix-store crate. Notable changes: - `fixtures` and `utils` had to be moved out of the `test` cfg, so they can be imported from tvix-store. - Some ad-hoc fixtures in the test were moved to proper fixtures in the same step. - The protos are now created by a (more static) recipe in the protos/ directory. The (now two) golang targets are commented out, as it's not possible to update them properly in the same CL. This will be done by a followup CL once this is merged (and whitby deployed) Bug: https://b.tvl.fyi/issues/301 Change-Id: I8d675d4bf1fb697eb7d479747c1b1e3635718107 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9370 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>