Further improvements to the upload experience. See commits inlined below.
cli: upload-pack events and spinners
Introduce a set of types for initialising and updating a set of spinners for upload-pack events. The spinners react to the events that are emitted from the upload-pack process in the worker.
Each set of spinners are for a given remote since the protocol may interact
with multiple remotes at the same time when announcing.
The spinners are lazy when first constructed and are only constructed once an upload-pack event is provided for a given remote.
The events expected for the spinners are: enumerating objects, counting objects, compressing objects, and the throughput of sending the bytes to the receiving end.
node: simplify upload-pack reader joining
The join method is equivalent to the custom loop that was written for joining
the reader thread in upload-pack.
node: reduce default upload-pack timeout
The default upload-pack timeout can be reduced by noticing the fact that if the stdout stream is still sending data, then the reader thread can stay alive.
This is achieved by keeping a timer that gets set everytime the upload-pack writer sends data. If the reader then runs into a timeout, it can check if this timer has elapsed the timeout as well, otherwise it can loop back and read again. This will either lead to waiting long enough that the EOF message is received, or both streams timeout.
From empirical testing, this can result in the timeout being exceeded but the EOF message not being received, if the pack data is large enough that the receiving side takes more time to write it to disk. However, this means that the upload should, in theory, have completed successfully either way.
The --timeout option is also used in the git-upload-pack process for good
measure.
modified radicle-cli/src/commands/init.rs
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-cli/src/terminal.rs
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle-cli/src/terminal/format.rs
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
added radicle-cli/src/terminal/upload_pack.rs
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified radicle-node/src/service.rs
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
modified radicle-node/src/worker.rs
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle-node/src/worker/channels.rs
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-node/src/worker/upload_pack.rs
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle/src/node/events/upload_pack.rs
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|