summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-18feat: adjust logging to stderr via pretty_env_loggerHEADmainLars Wirzenius3-4/+8
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-18docs(README.md): updateLars Wirzenius1-0/+34
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-18docs: bring architecture document up to dateLars Wirzenius8-77/+134
Various updates to bring the text of the architecture document up to date with what has been implemented. Most of the speculative "we will probably do it like this" parts have been dropped. Various fixes have been made. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-18fix: make who in Whence variants optionalLars Wirzenius5-16/+49
This should allow us to deal with old run record in the database. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-18feat: show who made patch/commit CI is run forLars Wirzenius7-12/+51
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-15feat: add run count for each repo on front pageLars Wirzenius1-1/+2
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-15feat: refresh front page 300 seconds (5 min)Lars Wirzenius1-1/+1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-15feat: refersh front page every 10 secondsLars Wirzenius1-0/+7
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-12feat: add Request::try_from_str for testsLars Wirzenius1-0/+7
Specifically, radicle-native-ci tests. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-08Docs: Adds db section in main ReadmeMichalis Zampetakis1-0/+2
2024-03-06feat! make list of CI runs in broker be persistentLars Wirzenius10-13/+264
This means they won't vanish when the broker is restarted. BREAKING CHANGE: the configuration files MUST now have a field "db" that is a path to the database file to use. The file will be created if needed. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05tests: add Radicle native CI file to run CI on collaborating nodesLars Wirzenius1-0/+9
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05fix: serialize EventType to lowercaseLars Wirzenius1-0/+1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05refactor: reorder importsLars Wirzenius1-8/+12
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05feat: use an enum for event typesLars Wirzenius1-7/+17
Stringly typing isn't checked by the compiler. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05feat: add a RequestBuilder to create Request messagesLars Wirzenius4-60/+110
A builder interface is easier to use I find. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05fix(src/event.rs): remove unnecessary link target in doc commentLars Wirzenius1-1/+1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05fix: use node's own alias in report page titlesLars Wirzenius1-2/+4
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05chore: format codeLars Wirzenius1-2/+5
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05fix: avoid unnecessary return at the end of a functionLars Wirzenius1-2/+1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05fix: add "branch" to pattern matchLars Wirzenius1-0/+1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-05Adds branch name for push eventsMichalis Zampetakis3-2/+40
2024-03-04fix: call to create patch in test to use COB cacheLars Wirzenius2-110/+75
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-04fix: update Cargo.lock to drop radicle-native-ciLars Wirzenius1-18/+0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-04chore: drop unused dependency on radicle-native-ciLars Wirzenius1-3/+0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-04fix: link to run log from native CILars Wirzenius6-40/+26
We used to have two IDs for each CI run: one assigned by the broker and one by the adapter. The native CI adapter writes logs to a directory named by the id it chose itself: it doesn't know the on chosen by the broker. The broker was generating a report page that links to a run log using the broker-chosen id. Oops. Drop the id chosen by the broker, it doesn't serve any useful purpose anymore. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-04feat! generate HTML report pagesLars Wirzenius15-221/+889
Instead of only a single JSON file, updated every so often, also generate HTML pages that show CI broker status, and lists every repository for which the broker has run CI. This currently assumes the native CI adapter, but that can be fixed to be more generic later. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-20fix: update status page atomicallyLars Wirzenius1-2/+10
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-20feat: allow config file to set a status page update intervalLars Wirzenius2-5/+12
Default is now 10 seconds. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-19feat: update status page in a background threadLars Wirzenius6-92/+145
Previously, we updated the status page only when we got a new broker event, or after a CI run finished. This made it unsuitable as a "is the broker alive?" service. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-16fix: list formattingLars Wirzenius1-1/+3
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-16fix: formatting of listLars Wirzenius1-0/+2
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-16docs: clarify wordingLars Wirzenius1-1/+1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-15feat: update a status page, if configuredLars Wirzenius10-2/+233
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-12chore: add deb packagingLars Wirzenius10-46/+133
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-08fix: use git dependency on radicle, drop featuresLars Wirzenius4-21/+8
With this, importing radicle::prelude::RepoId works for me again. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-05fix: import RepoId from identity moduleLars Wirzenius1-1/+1
rust-analyzer gets confused for me when it's imported from prelude. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-05style: add note to errors.rs about module specific error typesLars Wirzenius1-0/+4
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02fix: if no adapter is available, print error message, don't give upLars Wirzenius1-9/+8
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02refactor(src/bin/ci-broker.rs): use new modules in main programLars Wirzenius1-64/+50
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/lib.rs): allow use of new modulesLars Wirzenius1-0/+5
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/error.rs): add errors from new modulesLars Wirzenius1-1/+24
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/broker.rs): capture CI broker business logicLars Wirzenius1-0/+166
Implement a type to capture the business logic of the CI broker in a way that is reasonable to test in isolation rather than as part of a full Radicle network. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/adapter.rs): run a CI adapterLars Wirzenius1-0/+418
Add module to represent a CI adapter and execute it. Add tests for a variety of test cases. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/run.rs): represent metadata about a CI runLars Wirzenius1-0/+83
This captures all the metadata about a CI run that the CI broker needs to know. It can also be updated piecemeal. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02tests(src/msg.rs): use test helpers from test.rsLars Wirzenius1-64/+54
This simplifies the test code somewhat. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/test.rs): add module with test helpersLars Wirzenius1-0/+93
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/msg.rs): add a Response constructor from string sliceLars Wirzenius1-0/+9
This will make it easier to process adapter output line by line. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/msg.rs): add helpers to get repo, commit from RequestLars Wirzenius1-0/+31
This relieves uses for a Request from having to unpack it with pattern matching. The helpers are much more convenient, when they are sufficient. Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-02-02feat(src/msg.rs): make RunResult implement EqLars Wirzenius1-1/+1
Signed-off-by: Lars Wirzenius <liw@liw.fi>