about summary refs log tree commit diff
path: root/tvix/castore/src/directoryservice/grpc.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-04-12 r/7886 feat(tvix/castore/directory/grpc): instrument functionsFlorian Klink1-1/+3
Change-Id: I9cc0a6a32184773597556ab5f9250257aa18ca4e Reviewed-on: https://cl.tvl.fyi/c/depot/+/11399 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2024-03-28 r/7795 refactor(tvix/castore/*): drop utils.rs and grpc directorysvc testsFlorian Klink1-160/+3
This drops pretty much all of castore/utils.rs. There were only two things left in there, both a bit messy and only used for tests: Some `gen_*_service()` helper functions. These can be expressed by `from_addr("memory://")`. The other thing was some plumbing code to test the gRPC layer, by exposing a in-memory implementation via gRPC, and then connecting to that channel via a gRPC client again. Previous CLs moved the connection setup code to {directory,blob}service::tests::utils, close to where we exercise them, the new rstest-based tests. The tests interacting directly on the gRPC types are removed, all scenarios that were in there show now be covered through the rstest ones on the trait level. Change-Id: I450ccccf983b4c62145a25d81c36a40846664814 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11223 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2024-03-20 r/7756 refactor(tvix/castore): instrument DirectoryPutter impls consistentlyFlorian Klink1-1/+3
Log the entire span with "trace" level, not just its `ret` level. The level of the error value event defaults to ERROR, so we don't loose these. B3Digest implements Debug and Display the same way, so we can omit the `(Display)` part in `ret(Display)` for them. Change-Id: Id00d123a5798e5bdc9820dd97ae2b4d4eb5455f0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11218 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-03-20 r/7755 refactor(tvix/castore/directory): remove GRPCPutter::newFlorian Klink1-10/+3
This is no public API to construct this, there's exactly one caller, and it's perfectly fine to directly populate the struct there. Change-Id: Idae43a0162ee9bc687d21c550e0c9df33f12d263 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11217 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-01-21 r/7435 chore(tvix/store): Use BoxStream type aliasConnor Brewster1-3/+2
The BoxStream type alias is a more concise and easier to read than the full `Pin<Box<dyn Stream<Item = ...> + Send + ...>>` type. Change-Id: I5b7bccfd066ded5557e01f7895f4cf5c4a33bd44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10677 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Autosubmit: Connor Brewster <cbrewster@hey.com>
2024-01-01 r/7304 refactor(tvix/castore/directorysvc/grpc/wrapper): no Arc<_>Florian Klink1-3/+3
We can also drop the Clone requirement. Because the trait is async since some time, there's no need to clone before moving into an async closure, allowing us to simplify the code a bit. Change-Id: I9b0a0e10077d8c548d218207b908bfd92c5b8de0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10515 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
2023-12-16 r/7227 refactor(tvix/castore): drop is_closed() from impl DirectoryPutterFlorian Klink1-10/+32
This is only used in the gRPC version (GRPCPutter), during the test automation. So define it as a method there, behind #[cfg(test)], and remove from the trait. Change-Id: Idf170884e3a10be0e96c75d946d9c431171e5e88 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10340 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-12-13 r/7216 docs(tvix/castore/directorysvc): update commentFlorian Klink1-3/+3
This comment didn't make a lot of sense before. Change-Id: Ie057a133ca4b1a099ed3c885e32316b0d87c5eb0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10339 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
2023-11-15 r/7022 refactor(tvix/castore/tonic): make async, support wait-connect=?Florian Klink1-4/+10
This moves the sync `channel::from_url` to a async `tonic::channel_from_url`. It now allows connecting non-lazily if `wait- connect=1` is set in the URL params. Also, make the pingpong tests for blobsvc and directorysvc use the wait- connect=1 codepath. Change-Id: Ibeea33117c8121814627e7f6aba0e943ae2e92ca Reviewed-on: https://cl.tvl.fyi/c/depot/+/10030 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2023-11-15 r/7021 refactor(tvix/castore): remove DirectoryService::from_urlFlorian Klink1-14/+4
Make directoryservice::from_addr use the more specific constructors. Change-Id: I9fee2afed77692505988d631d9fe246d9843d25a Reviewed-on: https://cl.tvl.fyi/c/depot/+/10029 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2023-10-14 r/6802 refactor(tvix/*store): helper for channel creation from urlFlorian Klink1-44/+4
This moves the repetitive code to parse a URL and create a channel connected to it into `tvix_castore::channel::from_url`. Part of b/308 Change-Id: Idd342cd71cad5e78a9b258b38c1b227993e75310 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9707 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2023-10-14 r/6801 refactor(tvix/*store): reorganize from_urlFlorian Klink1-12/+9
Move the channel creation depending on the string-based URL into its own block. Change-Id: I546b769acd2296b548eb966b62c495f910266df5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9706 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2023-10-14 r/6800 refactor(tvix/*store): remove some grpc_client let bindingsFlorian Klink1-3/+5
We had to have these all while the traits where sync, and there was a lot of spawning and moving. Most of this can now be removed in favor of some inline `.clone()`. Change-Id: Id5466c32a403100bc3347866b3172e06a792e311 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9705 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2023-10-08 r/6744 test(tvix/castore): add uds pingpong test for directorysvcFlorian Klink1-2/+61
This was missing so far. Change-Id: Ic8c7781aa0e101342e8a7d94f206937b4163ebfa Reviewed-on: https://cl.tvl.fyi/c/depot/+/9570 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2023-10-08 r/6728 refactor(tvix/castore): use DuplexStream instead of unix socketFlorian Klink1-5/+2
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/6724 refactor(tvix/castore/directorysvc): factor out gRPC client genFlorian Klink1-172/+106
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-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 Klink1-0/+541
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>