From ab969bf99be2877e0b2fda1824c95ae45a964408 Mon Sep 17 00:00:00 2001 From: James Maes Date: Thu, 15 Oct 2026 01:27:59 -0500 Subject: [PATCH] fix: the qbit metadata version comes from the build, not a hardcoded constant The producer read a literal version, so released artifacts reported a stale or -SNAPSHOT version. qbit-backups.properties (version=${project.version}) is Maven-filtered and the producer loads it; tests assert producer == bundle == artifact version. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + pom.xml | 5 +++ .../qbits/backups/BackupsQBitProducer.java | 33 ++++++++++++++++++- src/main/resources/qbit-backups.properties | 1 + .../backups/BackupsQBitProducerTest.java | 5 +++ 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/qbit-backups.properties diff --git a/CHANGELOG.md b/CHANGELOG.md index 51607ab..81ba497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to this project are documented here. The format follows Keep - Repository scaffold: `BackupsQBitConfig` and `BackupsQBitProducer` (table prefix `backups_`, permissions `backups.*`), build, CI and repository standard files. ### Changed +- Read the QBit metadata version from the Maven artifact version so release builds report their released version. - Target QQQ `4.1.0-RC.8` (job progress). - Persist controlled backup failure messages instead of untrusted provider exception text. - Pin QQQ to released 4.1.0-RC.7 and replace the temporary help loader with core HelpBundles registration. diff --git a/pom.xml b/pom.xml index e2097a6..7927a27 100644 --- a/pom.xml +++ b/pom.xml @@ -131,6 +131,7 @@ true help/*.yaml + qbit-backups.properties @@ -138,6 +139,7 @@ false help/*.yaml + qbit-backups.properties @@ -146,6 +148,9 @@ org.apache.maven.plugins maven-surefire-plugin + + ${project.version} + minioadmin diff --git a/src/main/java/com/kingsrook/qbits/backups/BackupsQBitProducer.java b/src/main/java/com/kingsrook/qbits/backups/BackupsQBitProducer.java index 95d2b94..e33aba8 100644 --- a/src/main/java/com/kingsrook/qbits/backups/BackupsQBitProducer.java +++ b/src/main/java/com/kingsrook/qbits/backups/BackupsQBitProducer.java @@ -17,6 +17,9 @@ package com.kingsrook.qbits.backups; +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; import com.kingsrook.qbits.backups.health.BackupsDestinationHealthChecks; import com.kingsrook.qbits.backups.health.BackupsSlaHealthCheck; import com.kingsrook.qqq.backend.core.health.HealthCategory; @@ -38,13 +41,41 @@ public class BackupsQBitProducer implements QBitMetaDataProducer