Lars Wirzenius
aa6eed00a9
refactor(src/broker.rs): handle one more panic as an error in tests
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 16:25:37 +03:00
Lars Wirzenius
cd071e0957
refactor(src/broker.rs): handle more panics as errors in tests
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 16:23:07 +03:00
Lars Wirzenius
6737686d76
refactor(src/broker.rs): handle errors without panic, in tests
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 16:18:51 +03:00
Lars Wirzenius
f0fcfa94eb
refactor(src/adapter.rs): avoid panic in tests, return error instead
...
This makes it easier to grep for ".unwrap(".
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 16:13:34 +03:00
Lars Wirzenius
962e78482c
feat(src/bin/cibtool.rs): handle errors without panic
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 14:52:43 +03:00
Lars Wirzenius
15ae4148c9
refactor(build.rs): handle errors without panic
...
This has no real difference to the user, just makes it easier to find
uses of .expect with grep.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 14:15:08 +03:00
Lars Wirzenius
1e736c46ea
feat(src/db.rs): handle time formatting errors without panic
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 14:15:08 +03:00
Lars Wirzenius
1bf620feca
feat(src/db.rs): handle JSON encoding errors without panic
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 14:15:08 +03:00
Lars Wirzenius
573bc76a20
feat(src/broker.rs): handle time formatting errors without panic
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 14:15:03 +03:00
Lars Wirzenius
07ed0639e7
refactor(src/events.rs)): uses ? in tests instead of expect
...
Change the tests to look more like production code. In addition, have
fewer places where .expect is used, to make it easier to find them by
a simple grep.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 13:48:13 +03:00
Lars Wirzenius
cf66efb550
feat: handle JSON encoding errors as errors, without panic
...
They should never happens, but just in case.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 13:48:13 +03:00
Lars Wirzenius
2104c1a671
feat(src/pages.rs): add error variant for Mutex::lock failing
...
This means we do not panic if the locking fails. Instead we return an
error that will hopefully be logged and thus visible to the user in a
way that is easier to deal with than a panic
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:57:16 +03:00
Lars Wirzenius
4acabd5f55
chore: bump dependency on tempfile to current version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:21:50 +03:00
Lars Wirzenius
5c44b43e6c
chore: bump dependency on uuid to current version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:20:07 +03:00
Lars Wirzenius
33f7301347
chore: bump dependency on time to current version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:18:48 +03:00
Lars Wirzenius
37b23f0fe4
chore: bump version thiserror to current
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:17:28 +03:00
Lars Wirzenius
90240a5cfd
chore: bump dependencies on serde, serde_json to current versions
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:15:37 +03:00
Lars Wirzenius
1b5700c0c5
chore: bump dependency on regex to current version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:13:58 +03:00
Lars Wirzenius
1a8abc5990
chore: bump dependency on log to current version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:10:31 +03:00
Lars Wirzenius
a3ba1cac59
chore: bump dependency on env_logger to current version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:08:18 +03:00
Lars Wirzenius
49fd17fd29
chore: bump dependency on clap to current version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:06:41 +03:00
Lars Wirzenius
01c666547f
chore: bump dependency on anyhow to current version
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:05:20 +03:00
Lars Wirzenius
2d4bf57936
chore: depend on current release version of Subplot
...
Depend on subplot-build and subplotlib 0.10.0, drop dependency on
fehler, add dependency on culpa, and bump MSRV to 1.77 to match
radicle and be sufficiently new for Subplot.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 12:02:24 +03:00
Lars Wirzenius
912347a564
chore: bump dependency on radicle to 0.12.0
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-29 11:55:47 +03:00
Lars Wirzenius
5f24cf53fc
fix: if adapter does not provide a run id, invent one
...
This is arguably not a proper fix, but the best I can do late on
Friday. The proper fix would not use the run ID as a key.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-26 18:34:49 +03:00
Lars Wirzenius
fe0a86bf83
docs(README.md): add section to show how to run with cargo run
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-25 11:00:25 +03:00
Lars Wirzenius
bbaa1c27c6
fix: handle run id not being set without unwrap
...
This makes it easier to grep for unsafe unwraps.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:51:07 +03:00
Lars Wirzenius
5fe771bd57
refactor: unpack options without .unwrap
...
The unwrap was safe, as we checked the options were not None, but
writing the code without .unwrap means it's easier to grep the code
for unwraps that are not safe.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:51:07 +03:00
Lars Wirzenius
0b433336fc
fix: handle error from statement reset without panic
...
Return an error instead.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:51:07 +03:00
Lars Wirzenius
42b1265a43
fix: handle error from reading SQL column value without panicing
...
Return an error instead.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:51:07 +03:00
Lars Wirzenius
ba999b9719
fix: handle SQLite bind errors instead of panicing
...
Return an error instead.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:51:07 +03:00
Lars Wirzenius
a123034ead
fix: make sure the conversion to milliseconds is safe
...
Make sure the milliseconds fit into a usize, and then the conversion
can't fail.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:51:07 +03:00
Lars Wirzenius
a059a0fb08
feat: add an easier way to trigger a CI run.
...
This duplicates the functionality of "cibtool event add", but is a
little easier to use.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:47:10 +03:00
Lars Wirzenius
128622370b
feat: add --version option to cib, cibtool
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:28:34 +03:00
Lars Wirzenius
2be7b8b0e0
chore(Cargo.toml): order dependencies in alphabetical order
...
This makes it easier to find things. Also, "cargo add" will add new
ones in the right place now.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:13:51 +03:00
Lars Wirzenius
a3953e4b95
refactor: use env_logger instead of pretty_env_logger
...
As of right now, env_logger has last been updated five months ago,
pretty_env_logger a year ago. We need env_logger in our dependency
graph anyway, so it seems sensible to drop pretty_env_logger.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 13:11:42 +03:00
Lars Wirzenius
b7e71f380b
fix: typo in method name
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-22 12:54:27 +03:00
Lars Wirzenius
7a1f7a7a1a
feat! "cibtool run list" output changes
...
The default output now only lists the run id. With the --json option,
more information about each run is returned, as JSON.
This is a breaking change because the output content and format of the
command changes.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-19 17:01:29 +03:00
Lars Wirzenius
34f7fcf869
feat(src/db.rs): Db::get_all_runs returns runs in timestamp order
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-19 16:46:45 +03:00
Lars Wirzenius
285047d5a5
chore: bump version to 0.3.0, for release
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 17:55:13 +03:00
Lars Wirzenius
b3042b85ff
fix(ci-broker.md): typo
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 16:11:03 +03:00
Lars Wirzenius
95de0878de
docs: use want/why/who for acceptance criteria
...
The old terminology clashed with what Subplot conventionally uses for
acceptance criteria. Use "Want instead of "Requirement", "Why"
instead of "Justification", and "Who" instead of "Stakeholder". The
new terms are also less jargon-y and hopefully easier to understand,
as well as shorter.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 16:09:09 +03:00
Lars Wirzenius
d69be6f457
feat: log at info level when no allowed broker events from node one
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 15:17:42 +03:00
Lars Wirzenius
01cf7394a9
fix: no allowed broker events is not an end-of-file situation
...
If we get a node event that results in some broker events, but the
filter allows none of those, that's not a reason to assume there will
be no more node events in the future. Instead, don't return an empty
list of broker events, but wait for a new node event.
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 15:08:07 +03:00
Lars Wirzenius
d36e68768a
feat: log when run finishes
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 14:36:00 +03:00
Lars Wirzenius
cf5e61cc07
feat: reduce logspam
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 14:22:28 +03:00
Lars Wirzenius
eb923962bb
feat: adjust logging of incoming events, again
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 14:13:29 +03:00
Lars Wirzenius
4300fe3459
feat: tweak logging of incoming events, for debugging
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 13:59:40 +03:00
Lars Wirzenius
c3a4c5f7aa
feat: log the event we get from the node
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 13:56:57 +03:00
Lars Wirzenius
c2b083ae42
feat: reduce logspam at info level
...
Signed-off-by: Lars Wirzenius <liw@liw.fi >
2024-07-18 13:56:19 +03:00