Lars Wirzenius
f307ac433d
chore: prepare release 0.24.0
2025-12-09 15:54:05 +02:00
Lars Wirzenius
7a1320aa8c
ci: initialize Radicle node before running test suite
...
Unit tests need access to a Radicle node.
2025-12-05 16:35:46 +02:00
Lars Wirzenius
565892557b
feat: make announcing option for "cibool cob"
2025-12-05 16:14:09 +02:00
Lars Wirzenius
e541019e3a
feat: cache job COB ID lookup
2025-12-05 16:13:38 +02:00
Lars Wirzenius
21db3db163
feat: add "cibtool cob" to add runs to a job COB
2025-12-05 16:13:05 +02:00
Lars Wirzenius
c60c427eb9
feat: make INFO log messages for a typical CI run easier to follow
...
Drop several messages to DEBUG level, since they're really meant for
CI broker developer debugging. At INFO level they obscure the log
story.
Changed run id to be logged as a string, not debug.
Added broker run ID to run start and end messages, for clarity.:q
2025-12-01 13:19:06 +02:00
Lars Wirzenius
24c95c85db
feat: check at configuration load time that default adapter is set if needec
2025-11-28 16:57:19 +02:00
Lars Wirzenius
8413204baf
chore: drop depedency on anyhow
2025-11-28 16:37:51 +02:00
Lars Wirzenius
ac530cf29e
doc: explain limit on concurrency per repo
2025-11-28 16:09:09 +02:00
Lars Wirzenius
7d740a9f69
feat: log enitre filter decision as one message
...
To get the whole filter decision extract the line
from the log and run:
jq -r .fields.decision /tmp/x | jq .
2025-11-28 15:27:06 +02:00
Lars Wirzenius
1a329c791a
chore: drop unused dependency on ctor
2025-11-25 12:58:43 +02:00
Lars Wirzenius
d75150dd4e
chore: drop unused dependency sqlite3-sys
...
We depend on it indirectly, but don't use it directly, so drop it.
2025-11-25 12:54:43 +02:00
Lars Wirzenius
8fbe2d8c5c
chore: drop unused dependency valuable
2025-11-25 12:52:45 +02:00
Lars Wirzenius
25c9f0df22
chore: bump dependency on Subplot
...
We don't need the subplot-build dependency at all any more. It's being
deprecated upstream and we don't use it.
2025-11-25 12:28:17 +02:00
Lars Wirzenius
99fc34b747
tests: drop version 0.22.0 from upgrade tests
2025-11-25 11:01:38 +02:00
Lars Wirzenius
ef0a8aa1c3
tests: add version 0.23.0 to upgrade tests
2025-11-25 10:57:57 +02:00
Lars Wirzenius
460f08e661
chore: prepare release 0.23.0
2025-11-25 10:27:06 +02:00
Lars Wirzenius
e98f577b87
fix(src/filter.rs): log the correct filter for tag events
2025-11-25 09:07:21 +02:00
Lars Wirzenius
beaf6221c0
feat: terminate a CI run
2025-11-24 13:08:55 +02:00
Lars Wirzenius
c537e57dd6
feat: if the event queue a shutdown event, always pick it first
...
Rationale: we don't want to wait for a long time until shutdown starts.
2025-11-19 12:18:18 +02:00
Lars Wirzenius
5d8d60beee
doc: write document on how to implement a CI adapter
2025-11-17 15:51:58 +02:00
Lars Wirzenius
97762c6dde
tests: drop 0.21.0 from upgrade tests
2025-11-13 17:27:10 +02:00
Lars Wirzenius
20f36b07d0
tests: add v0.22.0 to upgrade tests
2025-11-13 17:24:24 +02:00
Lars Wirzenius
01bad3406e
chore: prepare for release 0.22.0
2025-11-12 15:47:39 +02:00
Lars Wirzenius
179ce402ca
doc: add AnyDelegate to list of filters
2025-11-12 14:41:27 +02:00
Lars Wirzenius
0a77f80d31
fix: typo in filename
2025-11-10 18:18:33 +02:00
Lars Wirzenius
0dc74cf8e7
doc: document how to add a new event filter
2025-11-10 17:31:17 +02:00
Lars Wirzenius
94fbd9f72f
feat: add the AnyDelegate filter
2025-11-10 17:13:15 +02:00
Lars Wirzenius
31543ca1db
chore: avoid 'cargo deny' complaints about advisories
...
Update Cargo.lock.
Some Unicode crates are unmaintained. There are no replacements, so
there's currently nothing we can do about it.
2025-10-29 13:42:01 +02:00
Lars Wirzenius
e8217e8c80
test(ci-broker.md): change shutdown scenario to verify cleanliness
2025-10-20 09:25:44 +03:00
Lars Wirzenius
92f309a75b
chore: drop unused doc/publish.sh
...
This was a remenant from an older era of Radicle CI.
2025-10-20 09:25:44 +03:00
Lars Wirzenius
91358ed2db
chore: drop unused src/pullqueue.rs
2025-10-20 09:14:07 +03:00
Lars Wirzenius
09d21f7624
feat! in ErgoError, hide types from dependencies
...
The should be no need for callers to know the specific type of source
errors, but exposing them can lead to trickier crate dependency
management, so we now hide them.
2025-10-20 09:03:47 +03:00
Lars Wirzenius
7995524107
docs(RELEASE.md): add "add new release to upgrade tests"
2025-10-16 18:17:14 +03:00
Lars Wirzenius
b9a8f9d586
tests: drop old releases, to speed up upgrade test
2025-10-16 18:15:45 +03:00
Lars Wirzenius
0c1d5ac76d
tests: add missing releasex to upgrade tests
2025-10-16 18:12:56 +03:00
Lars Wirzenius
dffe0883f5
ci: disble cargo_fmt for now
2025-10-14 17:20:28 +03:00
Lars Wirzenius
7ad346eb4a
chore: cargo fmt
2025-10-14 17:15:35 +03:00
Lars Wirzenius
7b865840e8
fix(src/queueproc.rs): logic for when to stop processing events
...
My previous refactor introduced bugs into the main loop of queue
processing, specifically how it decides to finish the loop. The
problem is that there are several factors and it's sufficiently
tricky that this was hard to get right.
The logic should now be simpler and more easily understood. We end the
loop once the queue is empty AND the channel notifying us of new
events in the queue haw been closed AND we're no longer running any
adapters.
2025-10-14 17:02:31 +03:00
Lars Wirzenius
59ef2c760c
feat(src/logger.rs): adjust logging functions for queue processing
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-10-14 17:01:53 +03:00
Lars Wirzenius
a17ab01ec5
fix(src/logger.rs): message for AdapterStdoutLine
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-10-14 16:32:30 +03:00
Lars Wirzenius
a2ff833fd7
feat: generic info logger, for debugging
...
This is meant to make debug logging easier. Do not use otherwise.
2025-10-14 16:32:30 +03:00
Lars Wirzenius
7ba599bbe2
tests(ci-broker.md): add scenario for empty queue
2025-10-14 16:10:45 +03:00
Lars Wirzenius
2044a69e57
build(Makefile): build subplot as HTML
2025-10-14 16:10:35 +03:00
Lars Wirzenius
6bcf814004
chore: format code
...
Because we now use edition 2024, the default formatting by rustfmt is
different. Update the formatting, without any other changes, by running
`cargo fmt`.
2025-10-10 09:02:09 +03:00
Lars Wirzenius
dd9347b8ac
refactor(src/queueproc.rs): simplify thread structure
...
Change the queue processing to spawn a new thread for each new event
to process (run adapters for).
Previously we had N long-lived threads, where N is set in the
configuration setting `concurrent_adapters`. This is awkward if we
want to reload configuration, which is an open feature request.
The new structure is also a lot simpler, which hopefully means it'll
be more reliable.
2025-10-10 08:48:24 +03:00
Lars Wirzenius
5379b676d5
doc(doc/userguide.md): add note about RAD_PASSPHRASE for node key
2025-10-08 08:40:16 +03:00
Lars Wirzenius
387207e4bf
doc(RELEASE.md): write down release process
...
This is what I've been doing. It may need optimization, but that's
easier once the process is written down.
2025-10-08 08:19:28 +03:00
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
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
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