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
Lars Wirzenius
cf188b6713
feat: add cibtool log --jsonl option
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-13 08:56:08 +03:00
Lars Wirzenius
e171baf84f
fix: remove random unrelated words from option doc help text
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-13 08:31:47 +03:00
Lars Wirzenius
6596d9eced
ci: use new "custom" action and an external "dch" action
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-13 08:19:18 +03:00
Lars Wirzenius
e9b055705e
ci(.radicle/ambient.yaml): drop timing steps
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-13 08:10:03 +03:00
Lars Wirzenius
4cea4f3657
chore: drop unused type and import
...
Found by new toolchain.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-08 09:40:23 +03:00
Lars Wirzenius
66a374dd4b
fix(src/refs.rs): update lifetime annotations
...
Suggested by new clippy.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-08 09:39:47 +03:00
Lars Wirzenius
f6cab9bb57
ci: add date commands to help figure out where time is spent in CI
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-06 17:09:53 +03:00
Lars Wirzenius
6736324dd7
test: drop 0.18.0 from upgrade tests, add 0.19.1
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-06 16:27:06 +03:00
Lars Wirzenius
b177b78549
feat: add job COB ID to run information on per-repo report page
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-05 16:59:39 +03:00
Lars Wirzenius
9dee71a880
feat: cibtool run add --job option
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-05 16:59:02 +03:00
Lars Wirzenius
8ed719a53f
feat: store job ID in run value, if known
...
Add an optional `job_id` field to `Run`. This is backwards compatible,
because it's optional.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-05 16:59:02 +03:00
Lars Wirzenius
5bb6cc1a05
feat: if job COB already exists, return its ID
...
Also log that we re-used an existing job COB, for completeness.
Previously we failed if a job COB already existed. This made no sense
in hindsight.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-05 16:59:02 +03:00
Lars Wirzenius
5e32f7f3b4
doc(CONTRIBUTING.md): add
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-05 10:51:07 +03:00
Lars Wirzenius
5439018503
tests: add scenario to verify behavior when adapter fails
...
Verify behavior for both a successful and a failed CI run, but with an
adapter that returns non-zero.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-05 08:01:31 +03:00