Commit Graph
1000 Commits
Author SHA1 Message Date
Lars Wirzenius 9f238c4988 fix: don't wait for queue adder in cib
We should exit when the event processor exists. The adder might never
exit, if its connection to the node never breaks.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 13:48:33 +03:00
Lars Wirzenius 32562b7605 feat: log event gotten from queue
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 13:35:48 +03:00
Lars Wirzenius f4c14229c4 feat: log number of allowed broker events from node event
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 12:48:02 +03:00
Lars Wirzenius 5e662275b0 feat: adjust logging for usefulness, logspam
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 12:36:12 +03:00
Lars Wirzenius 6bd555f6d2 feat: reduce logspam about wait duration for report writing
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 12:29:05 +03:00
Lars Wirzenius e29dd23f75 feat: reduce logspam about wait duration for events
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 12:28:02 +03:00
Lars Wirzenius b46e9493a7 feat: reduce info level logspam
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 12:27:49 +03:00
Lars Wirzenius 11236e7c64 feat: tense for log message, drop to debug level
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 12:17:56 +03:00
Lars Wirzenius e85d4c7cfc feat: drop "wrote page" log messages to debug level
Reduces logspam.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 12:16:30 +03:00
Lars Wirzenius 800b2ffb44 feat: log when events end and when pushing a shutdown event
All to make the node operator's life easier to understand what's
happening.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 12:10:15 +03:00
Lars Wirzenius 866d6a879f feat: log actions when processing an event at info level
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 11:56:43 +03:00
Lars Wirzenius 6e37586700 feat: log when looking for events to process, or waiting to pick
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 11:50:40 +03:00
Lars Wirzenius 0bbfebc80d refactor(src/pages.rs): use a Duration instead of plain integer
Also, log the duration until the next update, to help impatient node
operators to know what's going on.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 11:30:11 +03:00
Lars Wirzenius f713e4aa6a fix(cib): tell report page thread to run indefinitely
Previously, we told it to run once and waited for it to finish before
continuing. This makes sense for cibtool, but not for cib.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 11:25:43 +03:00
Lars Wirzenius cb9142ac8b feat: log when picking an event and starting a run
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 11:01:49 +03:00
Lars Wirzenius 3812aba1f7 feat: shorten log messages for events
Format them on one line, not on many lines. This makes logs easier to
skim.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 10:53:13 +03:00
Lars Wirzenius 6acd11d086 feat: reduce interval for when pages get updated
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 10:49:14 +03:00
Lars Wirzenius 3b882c43d0 feat: log when report pages are logged, and when not
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 10:47:40 +03:00
Lars Wirzenius 8d622c78ed feat: log what report HTML pages are written
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-18 10:42:30 +03:00
Lars Wirzenius 8da1598d2f docs(NEWS.md): update release notes for upcoming release
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 19:14:36 +03:00
Lars Wirzenius ab23fd0f8e fix(ci-broker.md): drop unused embedded file shutdown.json
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 18:49:23 +03:00
Lars Wirzenius a2f223c8a7 docs(README.md): fix list of binaries to be current
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 18:44:31 +03:00
Lars Wirzenius 2a281b209b ci: format the CI broker subplot as HTML in the doc directory
It will be published in CI, with the arch doc.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 18:37:11 +03:00
Lars Wirzenius f94ba6efae ci: deny all warnings when running clippy
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 18:32:38 +03:00
Lars Wirzenius 1d57cc1f2f chore: drop the "given an installed ci-broker" step
It's not used anywhere now that the binary name has changed to cib.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 18:11:55 +03:00
Lars Wirzenius 7c8919c507 chore(ci-broker.md): drop debugging output for environment
Problem should be fixed now: rad is found.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 17:41:00 +03:00
Lars Wirzenius 84eb898b71 fix(ci-broker.md): run set-rid with $PATH set correctly
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 17:24:52 +03:00
Lars Wirzenius 58e7b83d3b fix(ci-broker.md): set $PATH to have CI user's Radicle dir
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 17:17:57 +03:00
Lars Wirzenius b8fd97a493 debug(ci-broker.md): show all environment
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 17:11:03 +03:00
Lars Wirzenius 58738a01f0 debug(ci-broker.md): show $PATH when setting up node
I need a better way to debug things that fail in CI, but not on my
machine.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 17:06:14 +03:00
Lars Wirzenius 29c754245e fix(ci-broker.md): add ~/.radicle/bin to $PATH so rad is there
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 17:01:38 +03:00
Lars Wirzenius 3f755facf3 fix: extend wait time for when database is busy
Five seconds was too short for a slow machine, so make it sixty
seconds. Which might be too long, but if it turns out to be, I'll have
to make it configurable in some way.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 16:52:42 +03:00
Lars Wirzenius 294a04f951 fix: internal documentation link
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-17 16:32:38 +03:00
Lars Wirzenius ddbac4fd6e feat! drop "status" column from event queue
It's not currently used. It may be necessary to add this later, but
for now it's better to avoid having the cruft.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 20:44:43 +03:00
Lars Wirzenius fbb123d953 docs: add help for all subcommands and options
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 20:38:37 +03:00
Lars Wirzenius d421a6ef17 docs: make synthetic-events have a module comment
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 19:58:40 +03:00
Lars Wirzenius c1dc050819 docs: add documentation comments to cib and cibtool
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 19:58:25 +03:00
Lars Wirzenius ff33dcdb1e feat! drop barely-working helper programs
Their functionality can be added to cibtool, if there's a need.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 19:57:39 +03:00
Lars Wirzenius 7cb352fd4f tests: run cibtool concurrent counting test with RUST_LOG set
This helps debug problems when the test scenario fails.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 19:48:02 +03:00
Lars Wirzenius 84d868c919 refactor: use sqlite::Connection::set_busy_timeout
This replaces previous explicit loops we had. Had to increase the
timeout value to let tests pass with new code.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 19:46:57 +03:00
Lars Wirzenius 24ed10c6da fix: partial comment explaining Db::execute_valueless
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 17:39:12 +03:00
Lars Wirzenius 3303d7d873 fix: typo in error variant name
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 17:37:56 +03:00
Lars Wirzenius 8c055c1f3b refactor: use a typed Duration constant instead of integer
This makes it clearer what unit of time is being used.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-16 17:37:29 +03:00
Lars Wirzenius 0511e77702 fix: set node alias for reports
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-11 15:20:00 +03:00
Lars Wirzenius d1c3f1801d feat: cib reads and process events in one subcommand
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-11 12:45:33 +03:00
Lars Wirzenius 14e2eaec01 feat: treat end-of-events as end, not as an error
If there are no more events to be received from the node, treat that
as an "end of file" situation, instead of as an error. In other words,
do a normal shutdown and let a system manager restart the CI broker if
need be.

Still handle actual errors when receiving node events as errors.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-11 12:45:33 +03:00
Lars Wirzenius ad80772033 refactor: change code to produce HTML report to run in a thread
Run it once, for cibtool.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-11 12:45:33 +03:00
Lars Wirzenius 08706d1d4e docs(README.md): drop mention of list_runs binary
It's gone and replaced by "cibtool run list".

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-11 12:45:33 +03:00
Lars Wirzenius 8245df4722 fix(cibtool): use node alias in reports
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-11 12:45:22 +03:00
Lars Wirzenius bbf65cb29a refactor: add Db::get_all_runs
This is needed in a few places, and it's nominally more efficient to
get all runs with one SELECT, than first get all run ids and then each
run one by one.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-10 12:43:33 +03:00