This patch changes separates the business logic of fetching from the process of
fetching itself. It does this through a sans-IO approach, where a Fetcher
provides the necessary state to help drive a fetch forward, without performing
any of the IO itself.
What the Fetcher cares about is:
- What nodes are going to be attempted to be fetched from
- In what order should they be attempted
- When should the fetching process be considered finished
The Fetcher is then used in radicle-cli to drive forward the sync::fetch
function, allowing it to only care about the IO.
This patch changes separates the business logic of fetching from the process of
fetching itself. It does this through a sans-IO approach, where a Fetcher
provides the necessary state to help drive a fetch forward, without performing
any of the IO itself.
What the Fetcher cares about is:
- What nodes are going to be attempted to be fetched from
- In what order should they be attempted
- When should the fetching process be considered finished
The Fetcher is then used in radicle-cli to drive forward the sync::fetch
function, allowing it to only care about the IO.
Changes:
- Fix to initialising private network for fetcher – I’m wondering if this might be a different fetcher that you don’t add other nodes to
- Change the output to be more explicit of what the targets are – there’s a weird bug in the spinner logic, I think if the output is not uniform then it does not clear correctly.
- Extract the logic of the spinner into a
FetcherSpinnerto clean up thefetchfunction more
- Some reviewing and small changes.
- Use derived implementation of
Ord, which is equivalent to the one explicitly implemented before. - Pipe through the spinner to
connect. - Print status dial/fetch after the overall progress to prevent flashing.
- Explicate which target was met.
Changes:
- Incorporate feedback
- Rework output of the spinner
- Move information of the number of candidates to the info message before spinner
- Yellow colouring for warnings
- Ordering of candidate nodes is purely chosen by the caller
- Ensure that local node is never chosen
- Ensure that nodes are unique by checking fetch results
- Ensure that replicas can never be larger than number of candidates
Changes:
- Introduce min/max bounds for replication factor – required refactoring SyncSettings
- Fix up documentation
- TargetMissed split into a warning and error variant, depending on replication factor bounds
WIP: incorporate lorenz feedback
- Change copy
- Move module doc string into fetch module
Review, reword help, change semantics of min/max as discussed. Stuck right in the middle.
WIP: fix next_node to exhaust candidates
WIP: rework Replicas
Replicas aims for a min and tries for a max, if configured to do so
Also adding testing to the Fetcher
Using Lorenz’s help change to improve the rad sync help doc
Last few edits and fixing the CLI tests
TODO: clean up the change list
Changes:
- Changes are cleaned up and consolidated
- Copy of CLI output should be near, if not already, in its final form
- CLI tests are all passing – note that one is skipped to be resolved in the
next patch, regarding
rad clone
Changes:
- Fixed typo in rad-clone.md
See fixup commits for changes
Changes:
- Consolidating fixup commits
Rebased