Commit Graph

614 Commits

Author SHA1 Message Date
Fintan Halpenny 6b674a38c1
cli: rad id example
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:50:52 +00:00
Fintan Halpenny b257f482cb
cli: rad id command
Introduces the `rad id` subcommand for interacting with the identity
proposal cob.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:50:52 +00:00
Fintan Halpenny 9535467ff5
radicle: identity proposal cob
In order to make identity changes where the threshold is higher than
1, it is necessary to gather signatures of delegates to surpass that
threshold.

To achieve this the Proposal cob is introduced for proposing changes
and gathering the signatures over those changes.

Once a quorum is reached the Proposal can be published, committing the
new identity document to storage.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:50:51 +00:00
Sebastian Martinez 881e9af219
httpd: Add `assignees` to `Issues::create`
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-13 13:47:15 +01:00
Fintan Halpenny 540c56cac6
radicle: sign blob hash instead of content
The signatures for Radicle identities were using the documents
content.

It is standard to use the hash of the content instead, since signing
and verification is faster on a smaller set of data.

Use the resulting Git blob's object id, i.e. `git hash-object`, as the
signing and verifying payload.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:30:44 +01:00
Fintan Halpenny 99c1e2ac52
radicle-cob: simplify trailers module
The macro in the trailers module existed since there were multiple
trailers before the refactoring, so it minimised boilerplate code.

After the refactoring of the code there was only one trailer
left. Remove the macro generation code and replace it with just the
necessary code for the ResourceCommitTrailer.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:30:08 +01:00
Adam Szkoda 602299734a
ci: Address deprecation warnings 2023-02-13 13:29:29 +01:00
Alexis Sellier 3ae826dee2
node: Add clone test with seed acting as relay 2023-02-13 10:30:04 +01:00
Alexis Sellier 3e7761740f
node: Rely on inventory announcement in `rad init` 2023-02-13 09:59:44 +01:00
Alexis Sellier b461950d59
Add `ReadStorage::contains` method 2023-02-12 21:04:55 +01:00
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 8c7c2242cc
cli: Announce fork in `rad clone`
This allows peers to know about its existence.
2023-02-12 17:11:43 +01:00
Alexis Sellier 2f1a18470e
node: Fix filter construction and policy code 2023-02-12 17:07:57 +01:00
Alexis Sellier 27d0c8f235
cli: Track projects we initialize 2023-02-12 16:48:46 +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
Adam Szkoda 93ba7f593c
cli: Fix a test failing on macos: rad_checkout 2023-02-10 15:01:06 +01:00
Alexis Sellier 488f043226
node: Properly reap git-daemon process 2023-02-10 12:57:04 +01:00
Alexis Sellier e1986e4570
cli: Add better error for test not found 2023-02-10 12:56:11 +01:00
Alexis Sellier b2dbf12862
cli: Fix `rad rm` command 2023-02-10 12:56:11 +01:00
Sebastian Martinez a57b33c785
httpd: Add `api::test::patch` request method
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-10 12:17:03 +01:00
Sebastian Martinez 5c491284dd
cli: Add `LANG` env var to tests
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-10 12:16:46 +01:00
Rūdolfs Ošiņš f1de61ad88
cli: Allow specifying protocol for `rad web`
This also adds an informative text instructing the user what clicking
the link does and improves the CLI argument names.

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-02-09 16:51:32 +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
Sebastian Martinez 0087a4b50c
radicle-httpd: Add DELETE to allowed methods
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-09 16:48:48 +01:00
Slack Coder ac812d7834
rad: Add comment `reply-to`
Allow replying to patch and issue comments using `rad comment --reply-to` option.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-09 16:42:47 +01:00
Alexis Sellier b108342fab
cli: Test clone failure for unknown repo 2023-02-08 21:28:59 +01:00
Alexis Sellier 69ac8be8fd
node: Update local routing table on announce 2023-02-08 21:28:49 +01:00
Alexis Sellier 9177e67de6
cli: Use same project for clone test 2023-02-08 20:21:35 +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
Rūdolfs Ošiņš 803d36f0f6
cli: Use localhost for rad web
Since sessionStorage and localStorage use protocol + host + port as scope,
we want to align this between the CLI and radicle-interface. Using
localhost has other benefits as well, because browsers treat it
differently when doing requests from the deployed app which is being
served via https.

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
2023-02-07 21:01:27 +01:00
Sebastian Martinez 1128842457
httpd: Add DELETE route to remove sessions
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-07 20:59:06 +01:00
Slack Coder ed9900b5ac
cli: Support patch commenting
Allow commenting on a patch as well an issue.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-07 11:16:59 +01:00
Adam Szkoda 2c3e7cc2c9
ci: Switch to maintained GitHub actions
Signed-off-by: Adam Szkoda <adaszko@gmail.com>
2023-02-07 11:13:01 +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 7d588fc7ab
cli: Rename "program" to "command" 2023-02-07 10:46:12 +01:00
Alexis Sellier c861244ab8
Fix bug with `announce-refs` result 2023-02-07 10:46:12 +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