Commit Graph

920 Commits

Author SHA1 Message Date
Fintan Halpenny 92a14b671f
cli: use Doc::canonical in rad inspect
A project may exist within storage without the local operator not
having a fork of the project.

Use Doc::canonical in rad inspect to retrieve the canonical identity
document for use during inspection.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-19 12:58:18 +02:00
Slack Coder 327ebd4d2a
cli: remove unused cli::git methods
The methods appear not to be called anywhere.
2023-04-19 12:56:02 +02:00
Slack Coder 82d190f64f
cli: fetch if commmit missing when `rad merge`ing
Reduce friction when merging patches by automatically fetching the
Patch's commit head if its missing.

The calls git directly due to difficulties fetch the revision
anonymously with existing method.  Its important to fetch the commit
anonymously to remove dependency on how the local 'git remote's are
configured.
2023-04-19 12:56:02 +02:00
Slack Coder 3e87e5f9eb
cli: reduce `rad ls` dependency
Fetch project information using the delegates fork of the project.  This
avoids expecting a user's fork to exist locally.

Delegate project information is expected to remain in sync.
2023-04-19 12:50:07 +02:00
Alexis Sellier 2598886018
node: Delete unsigned refs on fetch 2023-04-19 11:32:46 +02:00
Erik Kundt e13bf0b75b
tui: Move shortcuts to root widget 2023-04-19 10:40:05 +02:00
Erik Kundt 95b0029267
tui: Add dashboard widget 2023-04-19 10:40:05 +02:00
Erik Kundt 38c9f0a1c0
tui: Re-render only if message received
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-19 10:40:05 +02:00
Erik Kundt 1bde528a1b
tui: Add placeholder for issue browser
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-19 10:40:05 +02:00
Alexis Sellier f7799e1474
tui: Fix clippy warnings 2023-04-19 10:37:39 +02:00
Slack Coder d79e97cf3b
cli: Note '--version' output as API
Consider our command line version output part of our API via a function
comment.

Test the first two fields of the version output are the program name and
a semantic version.
2023-04-19 10:35:20 +02:00
Fintan Halpenny 256471fa5e
radicle: add test for removing review fields
Add a test case showing that when a review is made with a None value
to an already set field, it will remove the original value.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-19 10:34:01 +02:00
Erik Kundt 0381aa3281 tui: Add context bar to patch view page 2023-04-18 16:30:05 +02:00
Erik Kundt 0f52af8b2e tui: Implement patch view page
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:30:05 +02:00
Erik Kundt f0ef4efe6c tui: Implement view pages
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:23:55 +02:00
Erik Kundt 52222939ae tui: Introduce subscription module
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:23:55 +02:00
Erik Kundt 594b63197c tui: Fix incorrect component focus
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:55 +02:00
Erik Kundt a0695005f5 tui: Pass widget props to command handler
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt 8325eb69d7 tui: Implement patches workspace
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt 80c1e45a99 tui: Add ui wrapper for patches
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt 3ce1e1147a tui: Add module providing access to patch cob
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt 85fad7aee0 tui: Implement generic table component
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:21:54 +02:00
Erik Kundt ceb1f8e700 tui: Change content handling for labels
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:14:22 +02:00
Erik Kundt 708e202dcc tui: Restructure component modules
Signed-off-by: Erik Kundt <erik@zirkular.io>
2023-04-18 16:12:41 +02:00
Alexis Sellier 0d98b84861
node: Skip trusted peers that aren't local 2023-04-18 14:49:13 +02:00
Alexis Sellier b2f9ca61d5
tools: Add tool to set canonical refs
It's possible to delete these refs, or for old repos not to have them.
2023-04-17 22:10:20 +02:00
Alexis Sellier f41f092778
seed: Update default tracking policy for seed 2023-04-17 21:16:56 +02:00
Alexis Sellier 94bef61944
node: Return only remotes that were fetched from
Instead of returning the namespaces that we fetched with,
we return the remotes that were actually fetched from.

This can differ if some trusted peers were not available
on the remote node.

Previously, if that was the case, it would cause errors
since the remotes were looked up and that lookup failed.
2023-04-17 18:58:56 +02:00
Alexis Sellier bb07e25571
node: Emit event when refs are synced
This will help us give the user feedback when he pushes.
2023-04-17 16:18:34 +02:00
Alexis Sellier 4b2bc365ef
node: Better differentiate fetch results
We use an enum to separate initiator vs. responder results.
2023-04-17 16:18:34 +02:00
Alexis Sellier 636d9e55ee
ci: Remove `ci.yaml`
We are no longer relying on GitHub CI.
2023-04-17 15:58:55 +02:00
Alexis Sellier 51b372ecad
node: Share channel type between modules
Shares the `Channels` type between the `wire::protocol` and
`worker` modules.
2023-04-17 15:56:24 +02:00
Alexis Sellier d0e24bd0ce
node: Simplify worker data piping 2023-04-17 15:55:31 +02:00
Alexis Sellier c99497eb21
Update `netservices` to 0.2.2
This includes a small change in how the EOF is sent as well.
2023-04-17 15:53:31 +02:00
Alexis Sellier cb79ebef76
Fix storage documentation
The link was invalid.
2023-04-17 12:08:47 +02:00
Alexis Sellier a8f0329391
node: Downgrade some logs to `trace` level
These logs were a bit noisy and don't help much.
2023-04-17 11:21:22 +02:00
Alexis Sellier 0e7ffcc916
node: Properly validate signed refs on fetch
With this change, we not only verify the signed refs before
the repository "transfer", but also validate that all refs in the
repo are signed and there is no discrepancy with the signed refs
file.
2023-04-15 00:17:17 +02:00
Alexis Sellier d9dd28b347
scripts: Add `delete-remote-refs.sh`
Useful for deleting refs of a corrupted remote.
2023-04-15 00:15:02 +02:00
Alexis Sellier 56e41fadd9
node: Update `netservices` and `io-reactor`
This fixes hanging issues we were experiencing.
2023-04-14 23:30:18 +02:00
Alexis Sellier 9729a23559
node: Use `StagedRepository` to know what to do
To know whether or not we're cloning, use `StagedRepository` instead
of checking manually.
2023-04-14 13:56:52 +02:00
Alexis Sellier 3e05939d14
node: Don't fail fetch for existing repositories
If `git-fetch` returns a non-zero code on exit, we keep going in the
case of an existing repository.

The reason is that `git-fetch` will return an error code if any ref
is rejected during the fetch. But this can happen if someone
pushes conflicting `rad/sigrefs` branches for example, and the node
already has a copy of that branch.
2023-04-14 13:56:16 +02:00
Alexis Sellier 18616a16bd
node: Match error by value
There wasn't a good reason to use a reference. This also allows us
to explicitly drop the session.
2023-04-14 13:55:47 +02:00
Alexis Sellier 17651e259d
node: Don't panic if peer disconnected 2023-04-14 13:55:32 +02:00
Alexis Sellier 8c92282578
node: Fix some error messages
A "block" policy doesn't necessarily mean an active block.
2023-04-14 13:55:22 +02:00
Alexis Sellier 992878fab4
cli: Update `rad untrack` command
This command was using very old code that needed updating.
2023-04-14 13:54:33 +02:00
Alexis Sellier eecea67ffd
cob: Deduplicate change parents 2023-04-14 13:54:27 +02:00
Alexis Sellier 97f076e3cf
Include dependencies for certain COB actions
We ensure that for example, the given commits are fetched before the
revision or merge actions in a patch.
2023-04-14 13:22:10 +02:00
Alexis Sellier 489370dcbd
cob: Add ability to add more parents to change
This allows change commits to have more than one parent that isn't
part of the DAG.

We can use this to create dependencies towards git objects such as
commits, in the case of patch actions.
2023-04-14 13:22:10 +02:00
Alexis Sellier bda5d6f080
node: Tunnel git data without parsing packet-lines
Instead of parsing the worker requests and responses, which was causing issues
around packfile transmission, we use threads and pass the bytes
transparently.
2023-04-14 13:16:32 +02:00
Alexis Sellier a05de1fbf3
node: Test fetch with large repository
This is for stress-testing the replication.
2023-04-14 13:15:52 +02:00