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
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
Lars Wirzenius
a3d8d1aa20
build(Makefile): allow restricting what tests to run
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-05 07:33:08 +03:00
Lars Wirzenius
57d5f7f11d
packaging: tidy up Debian packaging
...
Add manual pages for cib and cibtool.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-08-04 09:34:14 +03:00
Lars Wirzenius
d8aaa03624
fix: match tag name pattern on entire tag name
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-31 08:47:53 +03:00
Lars Wirzenius
6909e4659b
feat: deprecate the status_update_interval_seconds config field
...
It has never actually been used.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-30 11:45:22 +03:00
Lars Wirzenius
5c10459d90
feat: configuration field filters is now optional
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-30 11:06:31 +03:00
Lars Wirzenius
9ab275dde7
feat: configuration field adapters is now optional
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-30 11:04:55 +03:00
Lars Wirzenius
883cae63a4
fix: improve error message for the node connection being broken
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-29 18:24:35 +03:00
Lars Wirzenius
022466a356
feat: log job COB problems, but do not propagate them
...
All callers of `cob::job_*` were ignoring the errors anyway, so
simplify things by not returning a `Result`.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-29 16:26:29 +03:00
Lars Wirzenius
d3681d23ca
fix: drop debug-prints left behind
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-29 09:32:01 +03:00
Lars Wirzenius
df22a8e11a
chore: prepare release 0.19.1
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-28 10:02:25 +03:00
Lars Wirzenius
6af9c661aa
feat: add a buffering feature to AdminLog
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-28 09:18:11 +03:00
Lars Wirzenius
1f85b1b9e0
test: test upgrade to v0.19.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-28 08:47:45 +03:00
Lars Wirzenius
dd4982e8a3
fix: typo in cibtool run show help text
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-28 07:19:54 +03:00
Lars Wirzenius
93dd7c49e2
chore: bump dependencies on radicle and radicle-job
...
No code changes needed.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-24 13:36:36 +03:00
Lars Wirzenius
bda46bb06a
fix(doc/architecture.md): fix typo
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-24 09:37:06 +03:00
Lars Wirzenius
2f56e46398
chore: prepare release 0.19.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-15 15:13:10 +03:00
Lars Wirzenius
9d218bd92f
doc(doc/userguide.md): document configuration file fields
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-15 12:37:41 +03:00
Lars Wirzenius
05283ad35d
fix(src/pages.rs): sort RSS feed items by time
...
Fix sorting of RSS feed entries so that sorting is by time stamp, not
RFS 2822 formatted date.
Bug report: "On the main RSS the entires are limited to 10, to select
the top 10 it is first sorted by the pub_date key
items.sort_by_key(|item| item.pub_date().map(|s| s.to_string()));.
However this date is formated with rfc 2822 so it's starting with the
day of the week "mon/tue/..." resulting in the sort making no sense,
when it should be sorting by latest first."
Found-by: Sean Borg
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-15 09:06:54 +03:00
Lars Wirzenius
4db74c77f2
fix: type in constant name
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-15 08:19:21 +03:00
Lars Wirzenius
e1a741e33a
feat: announce COB changes to other nodes
...
Add a function to `src/cob.rs` to announce changes to other nodes.
This is a separate commit as it's the most risky one so I want to make
it easy to revert.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-14 12:34:14 +03:00
Lars Wirzenius
c55375e130
feat: create and update job COBs when adapter runs
...
This works, but doesn't request the node to announce the COB changes
to other nodes, yet.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-14 12:33:57 +03:00
Lars Wirzenius
6a4c026075
feat: add module for creating or updating job COBs
...
This is a convenience wrapper around `radicle-job`.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-14 09:32:03 +03:00
Lars Wirzenius
ce5e5945de
chore: add dependency on radicle-job
...
Bump MSRV to 1.84, because `radicle-job` needs that.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-07-14 09:26:07 +03:00
Lars Wirzenius
d5f684b2ec
chore: inline variables to format strings
...
Found by new clippy.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-27 08:41:19 +03:00
Lars Wirzenius
073b652f7c
fix: serialize only the adapter config, not the adapter spec
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-12 16:59:41 +03:00
Lars Wirzenius
ccfa86101b
feat: log the filename and content of adapter config
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-12 15:48:22 +03:00
Lars Wirzenius
d1db5e96ac
feat: allow configuring adapters in the cib configuration file
...
This makes it easier to specify several adapters, with varying
configurations, by not having to put the configuration for each
specification in a separate file.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-12 14:44:39 +03:00
Lars Wirzenius
e8285d7582
build(Makefile): allow running only slow tests
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-12 08:29:03 +03:00
Lars Wirzenius
e61f38c726
chore: deny unused imports in cibtool commands
...
Drop the pragma that allows them. Drop any imports that aren't needed.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-09 15:23:49 +03:00
Lars Wirzenius
f32efd9166
test: add release 0.18.0 to upgrade tests
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-09 08:01:03 +03:00
Lars Wirzenius
246068c689
refactor: use custom type instead of boolean, for clarity
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-09 07:27:58 +03:00
Lars Wirzenius
9a45e3fcc8
refactor: use worker abstraction for queueproc
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-09 07:27:58 +03:00
Lars Wirzenius
a1de334746
refactor: use worker abstraction in pages
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-09 07:26:27 +03:00
Lars Wirzenius
663de6013f
refactor: use worker abstraction in queueadd
...
Also update `src/bin/cib.rs` to use new interface.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-09 07:26:27 +03:00
Lars Wirzenius
beb35a1b11
feat: add abstraction for worker threads
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-09 07:23:46 +03:00
Lars Wirzenius
6c505bb0bc
ci: build and publish subplot
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-06 11:25:05 +03:00
Lars Wirzenius
3b71380d86
chore: prepare release 0.18.0
...
No big changes.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-04 10:39:31 +03:00
Lars Wirzenius
5f8b73e9dc
feat: log lines adapter writes to its stdout
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-03 10:23:55 +03:00
Lars Wirzenius
abffecf17d
chore: update dependencies on radicle, radicle-crypto, fix problem
...
Drop now-unnecessary import from src/test.rs.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-03 10:23:35 +03:00
Lars Wirzenius
7f8ddca5a3
test: make upgrade tests pass despite warnings
...
For a reason I do not entirely understand, the upgrade test started
failing when I removed `rust-toolchain` from the **current** git, even
though old releases still have it. The failures are due to warnings.
Work around this by removing the `#![deny(...)]` and `#[deny(...)]`
lines from the source of the old releases.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-03 09:23:20 +03:00
Lars Wirzenius
43f2de4605
test: drop release 0.12 from upgrade tests
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-03 08:49:12 +03:00
Lars Wirzenius
6d94467d51
chore: drop rust-toolchain, fix problems found newer toolchain
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-06-03 08:43:34 +03:00
Lars Wirzenius
5f203cd2d7
feat: check that all adapters in triggers are defined
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-29 14:17:23 +03:00
Lars Wirzenius
b7dd71b27a
feat: improve logging in queueproc helper threads
...
This was useful for figuring out my actual problem, which was a
configuration issue.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-29 13:59:40 +03:00
Lars Wirzenius
9408939361
ci: publish deb
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-27 14:46:05 +03:00
Lars Wirzenius
2e3101a0db
feat: log exit code of every command that is run
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-26 14:56:48 +03:00
Lars Wirzenius
a90788296f
docs(doc/userguide.md): tweak Debian installation
...
Add note about `kvm` kernel module and Unix group.
Add step to create log directory.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-21 18:21:37 +03:00
Lars Wirzenius
4fd7d2a61b
fix: typo in Cargo.toml
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-19 17:48:09 +03:00
Lars Wirzenius
83aa0b0a0a
chore: prepare release version 0.17.1
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-19 17:45:23 +03:00
Lars Wirzenius
b93695ff43
fix: parse "concurrent_adapters" in config correctly
...
Oops. Brown paper bag moment.
This undoes the type mangling to ensure the field value is never zero,
in favor of doing run time logic. That should be done with types some
day, but today I need to get running.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-19 16:51:51 +03:00
Lars Wirzenius
46963aaa4f
chore: prepare release 0.17.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-19 12:33:49 +03:00
Lars Wirzenius
941343071d
Revert "docs(doc/install.md): oops, add the installation document to Git"
...
This reverts commit 5ae86e9103 .
The doc is part of the user guide already, no need to have it as a
separate file as well. It'll just get out of sync.
2025-05-19 11:24:54 +03:00
Lars Wirzenius
5ae86e9103
docs(doc/install.md): oops, add the installation document to Git
...
Had forgotten to add that. Bummer.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-19 10:56:52 +03:00
Lars Wirzenius
af581de269
test(ci-broker.md): add previous release to upgrade tests
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-19 10:36:35 +03:00
Lars Wirzenius
4e5dbdae20
docs(doc/userguide.md): add detailed installation guide for Debian
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-15 15:54:28 +03:00
Lars Wirzenius
78cf1269eb
build(Makefile): add
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2025-05-14 14:30:17 +03:00