Alexis Sellier
c673f5db68
node: Add some useful test utility functions
2023-02-12 21:03:28 +01:00
Alexis Sellier
7087288cfb
node: Implement inventory sync command
2023-02-12 20:57:33 +01:00
Alexis Sellier
2f1a18470e
node: Fix filter construction and policy code
2023-02-12 17:07:57 +01:00
Alexis Sellier
5f4c6edee4
node: Simulator logging improvements
2023-02-12 16:48:46 +01:00
Alexis Sellier
42b4d95f93
node: Improve output of `Session::fetch` function
2023-02-12 16:22:51 +01:00
Alexis Sellier
bd7c5a0daa
node: Add ability to have default tracking policy
...
When a specific tracking policy isn't found, we allow setting a default.
To preserve existing behavior, the default is `Block`, ie. if a node
isn't tracked explicitly, it is blocked.
However, this change allows for using `Track` as the default, which
is a way to track everything without having to know the entities in
advance.
2023-02-12 16:22:51 +01:00
xphoniex
bdc0ab9881
Update `radicle-git` and `radicle-surf`
...
Signed-off-by: xphoniex <dj.2dixx@gmail.com>
2023-02-10 22:14:50 +01:00
Alexis Sellier
488f043226
node: Properly reap git-daemon process
2023-02-10 12:57:04 +01:00
Slack Coder
02c07d7be1
cli: Test rad-clone is deterministic
...
The last commit of a newly cloned repository should remain untouched by
making `Node::project()` use a repository fixture instead of a randomly
generated one.
Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-09 16:49:52 +01:00
Alexis Sellier
69ac8be8fd
node: Update local routing table on announce
2023-02-08 21:28:49 +01:00
Alexis Sellier
f01735bef6
cli: Have `init` trigger routing table updates
...
Before this change, nodes had to be restarted to announce newly
initialized projects.
2023-02-08 16:29:42 +01:00
Alexis Sellier
c138cd062c
node: Give each peer its own inbox
...
Instead of a shared queue, each peer gets its own inbox.
2023-02-08 11:43:39 +01:00
Alexis Sellier
054655d79b
node: Log read buffer if not empty
2023-02-07 21:13:29 +01:00
Alexis Sellier
f66ecd4ece
node: Replication fixes
...
* Read git request line before starting daemon, so that we don't leave
git data in the socket read buffer in case of an error connecting to
the daemon.
* Send a response on the fetch channel even if we disconnect the remote.
* Don't send `done` packet if there's an error; it won't be expected.
2023-02-07 21:04:13 +01:00
Alexis Sellier
d59c422b9d
node: Send special `done` packet to end protocol
2023-02-07 10:47:35 +01:00
Alexis Sellier
f5f36191d9
node: Fix some connection-related logic
2023-02-07 10:47:35 +01:00
Alexis Sellier
7bdedd0ffd
node: Fix bug with persistent peer reconnect
...
We weren't updating the sessions map when a persistent peer
was re-attempted. It would then panic when `connected` was called,
because the state would be `Disconnected`.
2023-02-07 10:47:35 +01:00
Alexis Sellier
2ceb39553e
node: Remove redundant log
2023-02-07 10:47:35 +01:00
Alexis Sellier
037ff39894
node: Use JSON for control commands
2023-02-07 10:46:12 +01:00
Alexis Sellier
2649e9c6fe
cli: Add `rad-clone` test
2023-02-07 10:46:12 +01:00
Alexis Sellier
a8531eff36
node: Implement `seeds` control command
2023-02-07 10:46:12 +01:00
Alexis Sellier
b542ddcd6c
node: Create shared test environment
...
We move and combine some of the test code, so that the CLI tests and
node tests use shared code.
2023-02-07 10:46:12 +01:00
Alexis Sellier
45e31a5192
Communicate fetch results through control socket
...
This allows a CLI to report to the user what fetch requests were
fulfilled, and which ones failed.
2023-02-07 10:46:12 +01:00
Slack Coder
98f09130bb
node: Elaborate --help message
...
Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-04 20:03:31 +01:00
Fintan Halpenny
3f48c2c516
Rust 1.67
...
Rust 1.67 was announced[0]. Update the necessary files for running
1.67 and fix the clippy suggestions for string interpolation.
[0]: https://blog.rust-lang.org/2023/01/26/Rust-1.67.0.html
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-04 19:30:29 +01:00
Alexis Sellier
98f7fe1db8
node: Rename `GIT_RESET` env var
2023-01-30 18:23:24 +01:00
Alexis Sellier
c1a749e09e
node: Make git-daemon errors more apparent
2023-01-30 14:07:31 +01:00
Alexis Sellier
03b94c81a0
node: Make git daemon listen configurable
2023-01-30 13:47:09 +01:00
Alexis Sellier
498a5c4e4a
node: Handle `fetched` differently if initiated
2023-01-30 13:22:33 +01:00
Alexis Sellier
3aa105afda
node: Return error if remote errors
...
Instead of simply breaking out of the loop, log and return an error.
2023-01-30 13:15:33 +01:00
Alexis Sellier
0726c553da
node: Run git fetch without any user config
2023-01-30 12:35:08 +01:00
Alexis Sellier
a0910f7593
Cleanup old `fetch` code
...
We only use the old code in the simulator now.
2023-01-30 12:26:29 +01:00
Alexis Sellier
be77eebc3d
node: Only try to fetch from connected nodes
2023-01-30 11:20:33 +01:00
Alexis Sellier
ac23f45d9b
node: Cleanup working naming
2023-01-29 21:41:16 +01:00
Alexis Sellier
7d5347b74f
node: Document worker a little more
2023-01-29 21:34:40 +01:00
Alexis Sellier
b92dc59204
node: Turn off `--atomic` when not supported
2023-01-29 18:22:41 +01:00
Alexis Sellier
33d8c35189
node: Move some code to `Runtime::run`
2023-01-29 17:39:46 +01:00
Alexis Sellier
23cf44f4c7
node: Rename `client` module to `runtime`
2023-01-29 17:33:07 +01:00
Alexis Sellier
02be334144
node: Use `git-daemon` as backend
2023-01-29 17:26:01 +01:00
Alexis Sellier
d9e1055067
Improve logging
2023-01-28 23:58:16 +01:00
Alexis Sellier
deeb160c2d
node: Improve stderr logging for git process
2023-01-27 17:04:20 +01:00
Alexis Sellier
be95222fb5
node: Fix bug in upload-pack
...
We were not properly exiting one of the threads that was copying
data from the stream to the upload-pack process. This is a fix.
2023-01-27 15:09:17 +01:00
Alexis Sellier
026dfbde5d
node: Improve logging output
2023-01-26 18:15:27 +01:00
Alexis Sellier
405c00b91d
Update all dependencies
...
Also moves `netservices` to `crates.io`
2023-01-25 20:38:54 +01:00
Alexis Sellier
798485dfb1
Remove "log" feature from netservices
2023-01-25 20:12:13 +01:00
Alexis Sellier
30e9d6103c
Cleanup `clone` code
...
Remove a bunch of different instances of it.
2023-01-25 17:51:49 +01:00
Alexis Sellier
cdc3c8a265
node: Try to cleanup socket file on exit
...
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-25 17:51:49 +01:00
Alexis Sellier
b4f44f39f2
Update `netservices` dependency
2023-01-25 15:35:24 +01:00
Alexis Sellier
963ad3c3d7
Get `rad clone` working correctly
2023-01-25 11:35:20 +01:00
Alexis Sellier
c888f40660
node: Respond to `announce-refs` control
2023-01-25 10:21:57 +01:00