Lars Wirzenius
0b862ab0ed
refactor: add a ConfigError type for config.rs
...
It's more tidy if every module has its own error type, to avoid
unnecessary coupling and tangling between modules.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-29 16:37:52 +02:00
Lars Wirzenius
f31ac159e0
refactor: combine event.rs and filter.rs
...
The division of concerns between the two was artificial and unclear.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-29 16:18:13 +02:00
Lars Wirzenius
de92f988b3
chore: drop src/bin/node-events.rs
...
filter-events.rs is almost identical, but a little bit more flexible.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-29 15:29:51 +02:00
Lars Wirzenius
e43dfc9a98
chore: drop unused dummy-adapter.rs
...
I doesn't even work well as an example, as it's too simplistic.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-29 15:27:02 +02:00
Lars Wirzenius
a6da02f852
refactor: move message related errors from error.rs to msg.rs
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-26 17:16:27 +02:00
Lars Wirzenius
833be8d0cc
docs: add documentation comments for everything in msg.src
...
FIXMEs mostly now.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-26 15:33:13 +02:00
Lars Wirzenius
fe08cb9248
fix: use `` to prevent placeholder from being interpreted as HTML
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-26 15:06:54 +02:00
jchrist
c3d223d7fc
feat(adapter): enrich adapter run context
...
Include context information to the adapter(s) about the trigger, distinguishing a trigger for a patch and a trigger for a push (possibly to a patch), according to the architecture.
Specifically, add push information for git pushes, including commit(s) and author.
For patches, add information about the specific patch that was updated, its revisions, along with the latest revision and the commits it includes.
2024-01-25 08:54:16 +02:00
Lars Wirzenius
c7a2572e80
fix: adapt to radicle's Id->RepoId rename
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-23 17:21:21 +02:00
Lars Wirzenius
a3a8a222a6
chore: add rust-toolchain
2024-01-23 17:08:26 +02:00
Lars Wirzenius
da51901b85
fix: use std:io:Error for error type from node event subscription
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-15 12:08:57 +02:00
Lars Wirzenius
c73447a745
fix: type of errors returned from node::subscribe
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-01-12 15:39:58 +02:00
Lars Wirzenius
4ffa6115e7
chore: drop useless example file
2024-01-02 08:30:18 +02:00
Michalis Zampetakis
e11a62ead1
Fix some letter casing in doc/architecture.md
2023-12-22 13:28:35 +02:00
Lars Wirzenius
0c6ce32472
Merge branch 'patch/df4563f'
2023-12-18 20:07:39 +02:00
Yorgos Saslis
a00212538b
enriches broker request payload to enable complex workflows in external CI
...
Signed-off-by: Yorgos Saslis <yorgo@proton.me >
2023-12-18 19:42:39 +02:00
Yorgos Saslis
93654fa547
fixes config path
...
Signed-off-by: Yorgos Saslis <yorgo@proton.me >
2023-12-18 19:42:38 +02:00
Lars Wirzenius
77860a8c28
docs: explain about the config file and filters in README
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-18 19:41:01 +02:00
Lars Wirzenius
b2862d2290
refactor(ci-broker): drop unused imports and other useless code
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-18 19:30:47 +02:00
Lars Wirzenius
43d1a0851b
refactor(filter-events): drop unused imports and other useless code
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-18 19:30:25 +02:00
Lars Wirzenius
6c5012453e
refactor: move config stuff into src/config.rs
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-18 19:19:39 +02:00
Lars Wirzenius
a4047dc968
feat: more flexible filtering
...
Add filters on a specific branch, any patch, a specific branch, and
allow combining filters with AND, OR, NOT, and document the motivation
for each of these in requirements.md.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-18 18:58:36 +02:00
Lars Wirzenius
176235883e
feat: add helper program to show events after filtering
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-18 18:58:36 +02:00
Lars Wirzenius
c7153deb3f
fix: rename binary to broker-messages
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-18 16:54:13 +02:00
Lars Wirzenius
acfa963774
feat: add3d program to write out examples of JSON messages
...
These may change, so having code seems better than copy-pasting them
into static documentation.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-18 16:52:21 +02:00
Lars Wirzenius
b4fb1e347b
This is a combination of 2 commits.
...
feat: read configuration from a file
The configuration file specifies what adapters are available, and
environment variables to set for each, and the node event filtering
that is applied.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 20:18:21 +02:00
Lars Wirzenius
7b31ac5c46
chore: make Request and Response cloneable
...
This helps native CI have better error messages.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 17:20:51 +02:00
Lars Wirzenius
f37948149b
refactor: error types
...
Have a top level error type that users of the library can import. Then
have a per-module error type so that errors returned by that module
can be as specific and precise as they can be.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 16:28:44 +02:00
Lars Wirzenius
af03df8517
chore: drop anyhow in favor of just thiserror
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 16:11:33 +02:00
Lars Wirzenius
f31ff2718f
fix: use the canonical names for Id, Oid
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 13:35:02 +02:00
Lars Wirzenius
0014c6a4dd
fix: handle all cases for RunResult
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 13:29:12 +02:00
Lars Wirzenius
e2f352d68e
fix: make enums non-exhaustive, add an error result
...
A non-exhaustive enum allows us to add new variants later, but not
break existing code. The compiler will check that code using current
the current version of the enum is written in such a way that it won't
break if a new variant is added.
Also add a new variant `RunResult::Error` to handle cases where a CI
run fails, but due to reasons probably unrelated to the software under
test. For example, network failure during a run.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 13:10:27 +02:00
Lars Wirzenius
53281dee84
fix: re-export types for repository and commit IDs
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 12:22:25 +02:00
Lars Wirzenius
46e3afad6b
chore: "cargo update" to update Cargo.lock
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 11:39:43 +02:00
Lars Wirzenius
a9baf73eb6
chore: set radicle to use a git repository instead of file path
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-14 11:34:25 +02:00
Lars Wirzenius
0ca17e15b9
docs: add a README placeholder
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-06 17:51:13 +02:00
Lars Wirzenius
87b93de078
feat: add start of CI broker, and helper programs
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-06 17:49:56 +02:00
Lars Wirzenius
cd86193927
docs: add initial architecture document and diagrams
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-06 13:17:14 +02:00
Lars Wirzenius
2bd8b98528
docs: add initial requirements document
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2023-12-05 13:50:27 +02:00