Commit Graph
60 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 909cc28e4e chore: update Cargo.lock
Run "cargo update".

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-01-03 15:47: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 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 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 84029fe19a chore: update radicle in Cargo.lock 2024-09-11 09:23:08 +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 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 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
Lars Wirzenius 96499aa1ba chore: bump version number
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-06-06 18:08:28 +03:00
Lars Wirzenius e16308414b chore: update dependency on radicle to 0.11.0
Small fixes to adapt to API changes in the radicle crate.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-06-06 14:39:45 +03:00
Michalis Zampetakis 8adca82fe3 Change the way that the broker perceives a patch
Instead of checking for changes in patch cob, check if push is at
`/refs/heads/patches/`.

Adds AnyPushRef filter.
2024-05-23 21:15:43 +03:00
Lars Wirzenius f837f29ce4 chore: update Cargo.lock 2024-05-20 17:30:49 +03:00
Lars Wirzenius 89beb82a5a chore: cargo update 2024-05-13 07:40:56 +03:00
Lars Wirzenius defea3a784 chore: add dependencies and update Cargo.lock
Prepare Cargo.toml for an upcoming change to add an integration and
acceptance testing suite. Update Cargo.lock as well. This commit
brings no functional changes.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-05-07 19:01:29 +03:00
Lars Wirzenius 9085ada0db chore: update to html-gen API changes
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-04-11 09:37:56 +03:00
Lars Wirzenius 5d7efc43fa chore: cargo update
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-04-03 09:37:46 +03:00
Lars Wirzenius 68fd1877e6 chore: depend on the radicle crate via crates.io
If nothing else, this is necessary for publishing the broker to
crates.io.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-31 11:22:36 +03:00
Lars Wirzenius 23be5b2133 feat! make list of CI runs in broker be persistent
This means they won't vanish when the broker is restarted.

BREAKING CHANGE: the configuration files MUST now have a field "db"
that is a path to the database file to use. The file will be created
if needed.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-06 19:36:26 +02:00
Lars Wirzenius f0cb3d2944 fix: call to create patch in test to use COB cache
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-04 19:01:41 +02:00
Lars Wirzenius 7861fdff9e fix: update Cargo.lock to drop radicle-native-ci
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-04 18:50:13 +02:00
Lars Wirzenius 443bf0b184 feat! generate HTML report pages
Instead of only a single JSON file, updated every so often, also
generate HTML pages that show CI broker status, and lists every
repository for which the broker has run CI.

This currently assumes the native CI adapter, but that can be fixed to
be more generic later.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
2024-03-04 16:43:51 +02:00