Commit Graph
1779 Commits
Author SHA1 Message Date
Alexis Sellier f15afa84be cli: Add timing information to rad-sync 2024-03-19 17:27:18 +01:00
Alexis Sellier ddd4bde302 node: Make worker count configurable 2024-03-19 16:34:15 +01:00
Lars Wirzenius 6569449fff cli: add PATH to env vars in rad-debug
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-18 13:14:50 +01:00
Lars Wirzenius 5fce714ba5 cli: include path to rad binary in rad-debug
This relies on /proc/self/exe being a symlink to the binary, so this
may only work on Linux.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-18 13:14:01 +01:00
Alexis Sellier 5ae617abf0 helper: Don't sync if we aren't seeding 2024-03-18 13:04:48 +01:00
Alexis Sellier 623ef278d0 helper: Add -o hints push option
Works even if you have hints disabled in config.
2024-03-18 12:57:32 +01:00
cloudhead 9cd1b0ec46 cli: Improve missing man page handling
Instead of saying "no manual entry", we output regular help.
2024-03-17 21:14:58 +01:00
cloudhead cf8f262cb2 man: Add rad-id.1 man page 2024-03-17 21:14:58 +01:00
cloudhead 74abd789c7 httpd: Fix private repo visibility
Make private repos invisible on all routes, including /raw endpoints
and Git clones.
2024-03-17 21:13:25 +01:00
cloudhead 62fa8c25c8 scripts: Delete old install script 2024-03-15 16:53:09 +01:00
cloudhead 15efae2a74 docs: Use POSIX-compliant install command 2024-03-15 10:36:22 +01:00
cloudhead 752656fbfa cli: Fix output of rad auth
The `rad help` command was not the right one.
2024-03-15 10:20:28 +01:00
cloudhead 54aacc9619 ci: Add version file to binary release
This commit also upgrades deprecated actions.
2024-03-13 12:36:03 +01:00
cloudhead d7c88f12ab radicle: Fix some doc comment issues 2024-03-12 16:13:08 +01:00
cloudhead de0b9ae44d cli: Don't highlight unknown languages
Previously, we'd show "Empty file".
2024-03-12 16:12:16 +01:00
cloudhead eb1ae13e68 cli: Use correct styling for revision id 2024-03-12 15:46:55 +01:00
Michael Raitza f0b8446515 cli: Handle message editor corner cases
1. Split on double newline fails when description is empty
2. Title must be a single line
2024-03-12 15:44:26 +01:00
Fintan Halpenny 3ad2b4431f fetch: only send changed wants and haves
This change limits the amount of `wants` and `haves` data that is sent
to the serving side of a fetch.

When a `RefsAt` announcement is sent, the fetching peer can calculate
the difference between the `rad/sigrefs` they're aware of -- if it
exists -- and the newly advertised `rad/sigrefs`. This means they can
efficiently ask for the `wants` and `haves` of references that have
changed -- saving some data sent over to the serving side.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-12 13:01:03 +01:00
cloudhead 0f0f9ff9b4 helper: Check for missing canonical head
Without the canonical head in the working copy, the next check will fail
with a cryptic error.
2024-03-12 12:56:45 +01:00
cloudhead 93ff59ae25 cli: Add rad version --json flag
This will be used to automatically populated metadata around releases
for the homepage.
2024-03-11 17:36:31 +01:00
cloudhead fa4b929a06 ci: Remove old deploy script, cleanup build 2024-03-11 16:54:52 +01:00
Lars Wirzenius 570a7eb141 build.rs: fix formatting
.radicle/native.yaml runs "cargo fmt --check" and that fails without
this change.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-11 13:29:37 +01:00
Fintan Halpenny 14ce5fe7b1 cli: show reviews on rad patch list
When running `rad patch list`, show the set of delegate reviews for
each patch, with the following meaning for the symbols:

- ✔: delegate has accepted the patch
- ✗: delegate has rejected the patch
- -: delegate has not made a verdict on the patch

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 13:22:14 +01:00
josibake ce1e1f71ae cli: Improve rad init wording
If the user passes a <path> argument to init, it is incorrect and a
bit confusing to reference the "current directory" or "this directory"
e.g. "run rad . in current directory" when the repo was not created in the
current directory and was created with a path argument instead.

Use the path provided by the user in help text, otherwise reference
the current directory.
2024-03-11 13:08:03 +01:00
Fintan Halpenny 18fc41c53f cli: error on no id update
If `rad id` is called with no arguments, or just `--title` and
`--description`, then it will fail because there were no changes made
to the identity.

Check if the `proposal` document is the same the `current` document,
and if so supply a hint and a better error.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 13:05:01 +01:00
Fintan Halpenny 864ca656c0 cli: add Unknown variant for NotificationKind
When the `rad inbox` command would come across a reference name that
it did not recognise as a `Cob` or `Branch`, then it would fail with
an `Unknown` error.

Instead, add an `Unknown` variant to `NotificationKind` which can be
displayed in the `inbox` CLI, by using the `--show-unknown`
flag. Otherwise, it will be skipped and the inbox will work as usual.

While refactoring, the `TypedId` type is used for the `Cob` variant to
simplify some of its uses.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 12:57:53 +01:00
Fintan Halpenny 71d4cb0128 radicle: TypedId improvements
- Add `Serialize` implementation
- Add `is_identity` method

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 12:57:53 +01:00
Fintan Halpenny 2fe0cca6d9 cli: ref_update should take a ref
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 12:57:53 +01:00
Sebastian Martinez 98bb91680d httpd: Update stats to count all repos
Instead of filtering private repos for a total count, we should count
all repos.
2024-03-11 12:38:00 +01:00
Sebastian Martinez 955c942c18 httpd: Improve alias use in tests 2024-03-11 12:31:28 +01:00
Sebastian Martinez 088549a333 httpd: Add support for submodules 2024-03-11 12:27:27 +01:00
Sebastian Martinez bdd1b238fc Bump radicle-surf to 0.19.0 2024-03-11 12:27:27 +01:00
cloudhead 3d7ae89a83 httpd: Fix tests 2024-03-11 12:24:30 +01:00
Fintan Halpenny 7ddb1119a5 cli: show revision on rad patch checkout
Help the user know which revision they currently have checked out when
running `rad patch checkout`.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:56:11 +01:00
Sebastian Martinez 325289d28f httpd: Insert test node into node db in test::profile fn
To allow the `AliasStore` to retrieve an alias from the node db, we need
to insert it manually into the database in the `profile` function, else
we won't find any Aliases there.
2024-03-11 11:52:46 +01:00
Fintan Halpenny b1435629f9 fetch: re-work transport::done signal call
The protocol requires that the fetcher signals to the remote that it
is done with the fetching process, so that the remote can exit out of
its upload-pack process.

The first change is that the `done` signal can happen before the
validation, since nothing else needs to be fetched.

The second change is that the fetcher does not care if the remote
responds to this signal since it has the data required for validation
and applying the changes to its refdb. Thus, if an error is
encountered then it is logged, but the rest of the process proceeds as
normal.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:42:15 +01:00
Fintan Halpenny c02ff1e47e fetch: log handshake error
When performing a handshake, the error source is hidden in the error
variant and never shown.

To get insight as to what the error was, it is logged when it is
encounterd.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:34:49 +01:00
Fintan Halpenny 6efd0d97a5 fetch: add logging for stages
Log when different stages of the fetch have completed, while also
providing the elapsed time, in seconds.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:34:17 +01:00
Fintan Halpenny 4b268adf49 node: downgrade log statements
Announcement are logged at the debug level and are very frequent. This
causes a lot of noisy logging in a node.

Downgrade the log levels for these messages from debug to trace.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:28:38 +01:00
Fintan Halpenny 68339d86b9 node: increase timeouts
For larger fetches, a timeout for the channels and socket control are
required. Bump the timeout from 9s to 30s.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:28:38 +01:00
Fintan Halpenny 4d50f79f1c node: remove unused timeout
The timeout was never being used, so it is being removed for the time
being.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:28:38 +01:00
Fintan Halpenny 87d1cb50a0 fetch: allow fetch of annotated tags
If an ancestry check of an annotated tag was triggered then the fetch
from that peer would fail. This is due to `graph_ahead_behind` only
working for commit-ish objects.

To allow for annotated tags, and other object that peel to commits,
the check now peels the two objects to commits before getting their
`Oid`s. The call to `graph_ahead_behind` can take these two `Oid`s
instead.

A test for annotated tags is included as part of the `examples/git`
suite in the CLI tests.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-11 11:13:26 +01:00
Sebastian Martinez 9950182ee0 cli: Remove rad-web from help
Due to it not being stable, and eventually the auth flow to be
rewritten, it should be removed.
2024-03-11 11:06:32 +01:00
cloudhead b917c1b411 cli: Rename rad ls --seeds flag
Rename to `--seeded` as per our discussion in Zulip.
2024-03-11 10:46:09 +01:00
cloudhead d1e2e3b61e cli: Fix some tests 2024-03-09 14:01:30 +01:00
Zlatan Todoric acf71fceaa cli: Update help output 2024-03-09 13:51:30 +01:00
Rūdolfs Ošiņš 428fa0b0f2 docs: Add hint about how to open a patch to man page 2024-03-09 13:48:31 +01:00
Fintan Halpenny cac6c0aad7 cli: add name to rad seed output
If the name is available to show for the repository -- it may not be
if it hasn't been replicated yet -- then add it to the output of the
`rad seed` command.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-09 13:45:35 +01:00
Fintan Halpenny bb4ed84b95 node: duplicate fetching logic respects RefsAt
Two concurrent fetches can occur from the same peer, while also being
for a different set of references. This was seen in the
`test_outdated_sigrefs` test. Alice would have an ongoing fetch from
Eve, and concurrently, Eve will create a new issue -- thus creating a
new `RefsAt` message -- and Alice would attempt to fetch this.

The previous logic would only check that Alice is fetching from Eve
and ignore the new updates -- meaning the test could fail. However, if
the `RefsAt` are checked then the other fetch can be recognised as
new, and queue it.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-09 13:43:08 +01:00
Christopher Fredén 13d5b4f620 cli: fix issue command asking for passphrase
Only require `signer` when doing a write operation.
2024-03-09 00:03:24 +01:00