Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
feat: log a warning if report directory does not exist
Merged liw opened 1 year ago

Signed-off-by: Lars Wirzenius liw@liw.fi

chore: prepare release 0.15.0

Signed-off-by: Lars Wirzenius liw@liw.fi

6 files changed +39 -4 33b4b65b 19575f49
modified Cargo.lock
@@ -1945,7 +1945,7 @@ dependencies = [

[[package]]
name = "radicle-ci-broker"
-
version = "0.14.0"
+
version = "0.15.0"
dependencies = [
 "anyhow",
 "clap",
modified Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "radicle-ci-broker"
-
version = "0.14.0"
+
version = "0.15.0"
edition = "2021"
rust-version = "1.80"
authors = ["Lars Wirzenius <liw@liw.fi", "cloudhead <cloudhead@radicle.xyz>"]
modified NEWS.md
@@ -4,6 +4,21 @@ This file summarizes the user-visible changes to `radicle-ci-broker`
between releases.


+
## Version 0.15.0, released 2025-03-25
+

+
* Fix a fatal problem when the CI broker is run with the report
+
  directory not existing (`report_dir` setting in the configuration
+
  file). Now, if the directory doesn't exist, the reports are not
+
  generated, but `cib` won't misbehave. There will be a log message at
+
  the warning level: "HTML report directory does not exist". If the
+
  directory is created later, while `cib` is running, reports will be
+
  written there.
+

+
* Related to the above, there are some improvements to log messages
+
  related to this. The log messages for worker threads starting and
+
  ending are now at info level, except if threads end in failure, at
+
  error level.
+

## Version 0.14.0, released 2025-03-24

Bug fixes:
modified debian/changelog
@@ -1,3 +1,9 @@
+
radicle-ci-broker (0.15.0-1) unstable; urgency=medium
+

+
  * New release.
+

+
 -- Lars Wirzenius <liw@liw.fi>  Tue, 25 Mar 2025 08:33:48 +0200
+

radicle-ci-broker (0.14.0-1) unstable; urgency=medium

  * New release.
modified src/logger.rs
@@ -138,6 +138,7 @@ enum Id {
    PagesEnd,
    PagesInterval,
    PagesNoDirSet,
+
    PagesDirDoesNotExist,
    PagesStart,

    QueueAddEnd,
@@ -583,6 +584,15 @@ pub fn pages_directory_unset() {
    );
}

+
pub fn pages_directory_does_not_exist(report_dir: &Path) {
+
    warn!(
+
        msg_id = ?Id::PagesDirDoesNotExist,
+
        kind = %Kind::Debug,
+
        ?report_dir,
+
        "HTML report directory does not exist"
+
    );
+
}
+

pub fn pages_interval(interval: Duration) {
    trace!(
        msg_id = ?Id::PagesInterval,
modified src/pages.rs
@@ -762,8 +762,12 @@ impl StatusPage {
        db: Db,
        once: bool,
    ) -> JoinHandle<Result<(), PageError>> {
-
        if self.dirname.is_none() {
-
            logger::pages_directory_unset();
+
        match &self.dirname {
+
            None => logger::pages_directory_unset(),
+
            Some(report_dir) if !report_dir.exists() => {
+
                logger::pages_directory_does_not_exist(report_dir)
+
            }
+
            Some(_) => (),
        }

        self.node_alias = profile.config.alias().to_string();