Commit Graph
801 Commits
Author SHA1 Message Date
Lars Wirzenius f9aad668be refactor: simplify report generation code 2025-10-07 10:23:23 +03:00
Lars Wirzenius c459b6763a feat: allow config file to set description in HTML report 2025-10-07 08:47:26 +03:00
Lars Wirzenius a73a1c7fe8 doc: add an overview document of Radicle CI 2025-10-06 18:26:57 +03:00
Lars Wirzenius 6aced1f715 feat: cibtool trigger --message option
This makes it easier to create a trigger message to give to a CI
adapter.
2025-09-26 13:17:49 +03:00
Lars Wirzenius 5039a086f1 fix: update NEWS.md entry for 0.21.0 release 2025-09-24 09:50:09 +03:00
Lars Wirzenius 1845c2bbec chore: prepare release 0.21.0 2025-09-24 09:28:37 +03:00
Lars Wirzenius 4f8865b771 fix(ci-broker.md): drop unused embedded file 2025-09-24 08:09:03 +03:00
Lars Wirzenius acd3dd068e test: add scenario that uses all event filters in config file
This makes it more obvious if we miss support for a filter.
2025-09-24 07:48:07 +03:00
Lars Wirzenius eb4d4a33e2 fix: add missing event filters for tag events
Add event filters TagCreated, TagUpdated, and TagDeleted. These were
supposed to already exist, but were never committed. They're in the
documentation, though, so it's quite surprising that they don't work.
2025-09-24 07:47:11 +03:00
Lars Wirzenius a2dec1a5b3 add all filters to config file so we verify they can be parsed 2025-09-24 07:27:02 +03:00
Lars Wirzenius aa70e645b3 chore: bump MSRV so it's correct
Verified with `cargo msrv verify`
2025-09-23 12:03:15 +03:00
Lars Wirzenius 44e5886368 fix: update Cargo.lock 2025-09-19 14:54:18 +03:00
Lars Wirzenius 0d4387abfc fix: version number 2025-09-19 14:52:51 +03:00
Lars Wirzenius 4c81808fa3 chore: prepare release 0.20.1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-19 14:42:46 +03:00
Lars Wirzenius aa5e1eb008 chore: upgrade dependencies, fix problems found
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-19 14:34:45 +03:00
Lars Wirzenius 3782dc2b7b feat: receive and render canonical ref update events
Cope with the fact that the node can now emit events for canonical
refs changing. This does NOT yet add a filter on canonical ref
updates. But at least the Ci broker shouldn't crash any more.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-19 08:41:27 +03:00
Lars Wirzenius 6f29315b46 tests(ci-broker.md): add scenario for JSON config file
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-19 08:10:37 +03:00
Defelo adde3f443c feat: optionally load config from json file 2025-09-19 07:48:36 +03:00
Lars Wirzenius 0c959144c2 fix: remove unnecessary parentheses
New Rust complains.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-19 07:40:44 +03:00
Lars Wirzenius a5849ecd31 fix: set permissions of pages files
Temporary files have 0600 permissions, so they can't be viewed via
a web browser. Oops.
2025-09-18 16:39:47 +03:00
Lars Wirzenius 62f1ded7e6 feat: when writing HTML report pages, write temp file and rename
This avoids creating an empty file if the disk is full.
2025-09-17 15:35:20 +03:00
Lars Wirzenius 4610dcfd3a feat: reduce report page auto-refresh interval to 1 minute
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-16 12:50:24 +03:00
Arnaud Bailly acba124206 doc: highlight the need to filter node ids 2025-09-15 12:04:01 +03:00
Arnaud Bailly f20fefe812 fix: link to 'Front page' from run report
Individual report pages are generated under `report_dir` from the cib
config, which is the directory which contains the summary `index.html`
page so there's no need to link to the parent.
2025-09-15 11:53:33 +03:00
Defelo 27587a80d8 fix: handle invalid json in node events
Previously, radicle-ci-broker crashed whenever it received an event
from radicle-node which it could not parse, for example because a
new event type has been added to radicle-node, but the radicle crate
radicle-ci-broker depended on didn't contain this new variant yet.
2025-09-15 09:18:59 +03:00
Lars Wirzenius 16e534d2fb chore: switch serde YAML parsing to serde-norway
serde-yaml was orphaned, so I switched to serde-yml, which is now
unmaintained and depends on libyml with a security issue. The new
replacement seems to be serde-norway.

May be worth thinking about not using YAML in the future.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-15 09:05:38 +03:00
Lars Wirzenius d981727b8d chore: prepare release 0.20.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-09 18:20:27 +03:00
Lars Wirzenius 845a86c04f feat: say run timed out on report page if that happened
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-09 12:27:52 +03:00
Lars Wirzenius 6959f65fcc refactor(src/adapter.rs): reduce code duplication in tests
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-09 12:27:17 +03:00
Lars Wirzenius 1ca695f4d2 fix: expected result in test case
wrong result used to be returned by code, test case was always wrong

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-09 12:27:17 +03:00
Lars Wirzenius d49fd6cb2d fix: when adapter times out, return correct error variant
We need to handle "run failed for an intrinsic reason" differently
from "run didn't finish in time".

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-09 12:27:17 +03:00
Lars Wirzenius ce9def4927 chore: update Cargo.lock
This avoids
RUSTSEC-2025-0055 (https://rustsec.org/advisories/RUSTSEC-2025-0055).

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-09 08:04:53 +03:00
Lars Wirzenius 7f97303e17 chore: drop unused timeout related logger functions
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-01 14:01:29 +03:00
Lars Wirzenius 27317200c1 fix: max_run_time setting in cib
The cib configuration setting max_run_time didn't always work, because
its implementation only killed the adapter, not any child processes of
the adapter. We fix this by running the adapter in its own process
group, and killing the whole group if the time runs out.

In addition, the timeoutcmd.rs module (and the ChildProcess type) is
simplified, by making the deadline mandatory. It is no longer possible
to run an adapter without a timeout. This makes sense, as it'd not be
useful to allow an adapter to run indefinitely. The old behavior can
be simulated by setting a very long timeout, such as a year.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-09-01 11:49:56 +03:00
Lars Wirzenius b3898f653f fix: make reading child output not block forever, if there is none
Spawn a thread that sleeps until timeout, then notifies the
RealtimeLines condition variable, which wakes up the reader thread and
lets it eventually finish.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-19 17:17:03 +03:00
Lars Wirzenius 3f98488107 build(Makefile): limit duration of test runs
Sometimes I accidentally make a test that never finishes and uses all
the CPU and memory available. Killing that manually can be impossible,
because switching focus to the right terminal requires more CPU and
memory than the kernel can spare.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-19 17:14:58 +03:00
Lars Wirzenius ac9261bb8e fix: make RealtimeLines::line honor the max duration setting
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-18 19:02:53 +03:00
Lars Wirzenius 04cc070cc5 add unit test to expose RealtimeLines not timing out
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-18 18:31:23 +03:00
Lars Wirzenius 96c3b53309 chore: tidy up and minimize .cargo/deny.toml
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-18 17:37:56 +03:00
Lars Wirzenius e0ffdbcee4 chore: move deny.toml to .cargo
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-18 17:37:45 +03:00
Lars Wirzenius 7a27e0c01a feat: add cibtool trigger --all option
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-15 16:06:32 +03:00
Lars Wirzenius 7c3af34ac1 refactor: use ergo module for run commands
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 17:59:13 +03:00
Lars Wirzenius cfb6998057 refactor: use ergo in event commands
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 17:49:18 +03:00
Lars Wirzenius 1855817e21 refactor: use ergo module in trigger command
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 17:31:13 +03:00
Lars Wirzenius 4b232bd238 feat: add module radicle_ci_broker::ergo
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 17:31:13 +03:00
Lars Wirzenius 80db71a440 feat: cibtool trigger --patch option
Either `--commit` or `--patch` is now mandatory, undoing the
simplification in recent commits.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 14:10:46 +03:00
Lars Wirzenius a13b5a9868 feat: cibtool event add defaults to HEAD commit of chosen ref
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 10:31:42 +03:00
Lars Wirzenius 562465ef93 feat: cibtool event add defaults to default branch
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 10:22:15 +03:00
Lars Wirzenius 5950499587 feat: cibtool trigger uses default branch by default
Previously `main` was used by default.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 10:11:28 +03:00
Lars Wirzenius b84fffaf02 feat! make cibtool log read cib log output as well
Previously we only supported reading `cib` log output wrapped into
`journald` messages as JSON.

This is a breaking change because the command line syntax changes
slightly.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-08-13 09:40:40 +03:00