Commit Graph
71 Commits
Author SHA1 Message Date
Fintan Halpenny 3edb0ed017 chore: rountrip property test for EventFilter
Introduce the use of the `qcheck` crate to generate examples of `EventFilter`,
so that a YAML roundtrip test can be added.
2025-01-30 15:00:54 +02:00
Lars Wirzenius 64e76a97a8 chore: prepare release 0.12.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-29 11:08:29 +02:00
Lars Wirzenius 14d7b5322b chore: prepare release 0.11.1
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-09 18:58:13 +02:00
Lars Wirzenius e9f51c5c93 chore: bump version in Cargo.toml/lock, debian/changelog
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-07 14:05:20 +02:00
Lars Wirzenius 11c002d9c5 chore: bump dependency on subplotlib, subplot-build
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-03 16:01:12 +02:00
Lars Wirzenius 01d60563ea chore: bump dedendency on serde-yml
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-03 15:59:31 +02:00
Lars Wirzenius 52dba0ca85 chore: bump dependency on duration-str
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-03 15:56:30 +02:00
Lars Wirzenius 69b6db769e chore: bump dependency on anyhow
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-03 15:54:55 +02:00
Lars Wirzenius 6dc8f8e202 chore: prepare release 0.10.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-12-05 08:47:12 +02:00
Lars Wirzenius 2e2236aea7 fix: use node id from ref name as originating node id
Change CI event creation to set the `from_node` field to the node id
in the Git ref being updated. Previously we set it to the `remote`
field in the node event, but that is id of the node from which our
local node got the `RefsUpdated` event, not the node where the change
was originally made.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-12-05 08:20:04 +02:00
Lars Wirzenius 46651b7fa5 chore: bump dependency on radicle to 0.14.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-12-05 08:20:04 +02:00
Lars Wirzenius cf395350ea feat: use the tracing crate for structured logging
Switch from the "slog" family of crates for structured logging to the
"tracing" family. There should be no significant changes to the log
messages, so I don't consider this to be a breaking change.

The benefit of this change is that it opens up the possibility to add
extra fields to the log messages as JSON values, instead of strings
that contain the values as JSON.

With slog we currently have this message::

  {"msg":"broker database: /home/_rad/ci-broker.db"}

With slog or tracing we can change this to:

  {"msg":"open database", "filename": "/home/_rad/ci-broker.db"}

With tracing we can have this:

  {"msg":"open database","db":{"type":"sqlite","filename":"/home/_rad/ci-broker.db","size":12765}}

which would be, formatted prettily

  {
    "msg": "open database",
    "db": {
      "type": "sqlite",
      "filename": "/home/_rad/ci-broker.db",
      "size": 12765
    }
  }

Such extra fields can then be easily queried or otherwise processed
with programs, much more easily than having such programs parse text
fields as JSON before they can be processed.

Doing this with slog is supposed to be possible, but I have failed to
get it to work. The slog and tracing families of libraries seem
otherwise similar for our purposes.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-11-26 18:57:25 +02:00
Lars Wirzenius 70f1ba7de5 chore: prepare release 0.9.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-11-21 10:19:56 +02:00
Lars Wirzenius 4caab2118c feat: generate RSS feeds for all, failed CI runs
This is primarily a stop-gap measure so I can have some notification
of CI runs, without having to manually check the report page. It may
also be useful for other people, who do not use Radicle themselves,
but are interested in CI runs on Radicle nodes.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-11-13 18:06:19 +02:00
Lars Wirzenius 43c076c22e feat: generate sample adapter messages with cibtool
This is meant only for generating documentation, but might be useful
for others.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-11-13 09:45:29 +02:00
Lars Wirzenius 869b451728 chore: prepare release 0.8.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-11-08 10:17:11 +02:00
Lars Wirzenius 55e1e7dba5 feat: add optional max_run_time field to configuration file
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-11-06 18:52:30 +02:00
Lars Wirzenius 535b159290 chore: update release 0.7.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-10-14 11:11:07 +03:00
Lars Wirzenius e2a5d91d47 fix: allow log level trace and debug in release builds
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-09-23 09:15:50 +03:00
Lars Wirzenius 13d37ce087 chore: prepare release 0.6.3
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-09-16 11:40:34 +03:00
Lars Wirzenius f2b86a4c01 chore: prepare release 0.6.2
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-09-10 13:59:11 +03:00
Lars Wirzenius 3f426a71f5 chore: release 0.6.1 with updated dependencies
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-09-02 14:02:09 +03:00
Lars Wirzenius dd677bfd2a chore: bump dependencies on Radicle crates
To get this to work, I had to remove Cargo.lock and let it be
re-created:

rm Cargo.lock && cargo add radicle@0.13.0 radicle-git-ext@0.8.0 radicle-surf@0.22.0

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-09-02 13:55:23 +03:00
Lars Wirzenius 5532037180 chore: prepare release 0.6.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-09-02 10:54:28 +03:00
Lars Wirzenius c7cbcb0071 chore: update dependency on Subplot to 0.11.0
Also change required Rust version to be 1.80. This matches heartwood,
but is also necessary for Subplot dependencies.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-08-26 10:45:36 +03:00
Lars Wirzenius 968207a5f1 chore: prepare release 0.5.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-08-26 09:31:57 +03:00
Lars Wirzenius 85414e8673 feat: switch to structured logging only
Replace all use of log and env-logger crates with structured logging
using slog and slog-json.

Change the recently introduced logger module to use the slog-scope
crate. This avoids having to pass a reference to logger::Logging to
every place that needs to do any logging.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-08-23 10:03:49 +03:00
Lars Wirzenius 2a40a12a9d Merge branch 'logging' 2024-08-20 09:56:12 +03:00
Lars Wirzenius 81a9a7b3b0 chore: prepare release 0.4.0
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-08-19 12:45:14 +03:00
Lars Wirzenius 402d58eea0 feat: start adding structured logging to cib
This is the smallest useful change to add structured logging. It adds
little useful logging, but builds a foundation for adding more useful
logging later, and for converging existing log messages to structured
one later.

Add some acceptance criteria for structured logging so that we do not
accidentally change the log messages we really, really care about.

Add dependencies on the slog and slog-json crates, which exist
precisely for structured logging.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-08-14 18:48:26 +03:00
Lars Wirzenius a80ab49d7d chore: bump dependency on html-page crate 2024-08-08 17:53:40 +03:00
Lars Wirzenius 8ee42c7cc2 chore: switch from serde-yaml to serde-yml
serde-yml is maintainted, serde-yaml isn't.
2024-08-08 17:52: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 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 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 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 d4e4091509 add dep on env_logger
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-07-03 18:01:13 +03:00
Lars Wirzenius 1386c94189 feat: rewrite database abstraction
Add a "counter" table, to enable a rudimentary concurrency test. Used
this to verify that multiple processes can safely update the same
database. Multi-process concurrency can result in temporary, short
lived lock conflicts in transactions: deal with this by re-trying for
a short duration.

Add a persistent event queue. Add methods to the Db type to deal with
counters and event queue.

Add a new error type to allow Db methods to return errors that do not
come from SQLite.

Restructure the internals a bit to make them easier for me to follow.
2024-07-02 19:55:35 +03:00