diff --git a/.docs/changelog.md b/.docs/changelog.md index 075bde6045d82d339205069445e654e7a67aa19e..f2a35ee8f917b547a799eebfcb3d3e8c7a004617 100644 --- a/.docs/changelog.md +++ b/.docs/changelog.md @@ -2,7 +2,7 @@ author: Martin Weise --- -## v1.5.1 (2024-11-07) +## v1.5.1 (2024-11-09) [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.5.1) @@ -10,6 +10,8 @@ author: Martin Weise #### Fixes +* Bug where the data volume could not be calculated when the data length column in the Metadata Database is `null` + in [#462](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/462). * Bug where the schema could not be created manually in [#461](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/461). diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43c5094c9a322cb3291fe6fc01ff194b2c02289e..f6c11fbf88600106e1c1adf2c49e9c11308c46af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -393,6 +393,10 @@ release-helm: refs: - /^release-.*/ when: manual + needs: + - build-helm + dependencies: + - build-helm before_script: - "docker logout ${CI_REGISTRY_URL}" - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/MetricsConfig.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/MetricsConfig.java index 1b7578b4bcdb547eae2cc26690ef028c38367787..b86a97a4dc66bf4e265dc82438d1083bed3c4ebd 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/MetricsConfig.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/config/MetricsConfig.java @@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import java.util.Objects; + @Log4j2 @Configuration public class MetricsConfig { @@ -70,7 +72,12 @@ public class MetricsConfig { if (tableRepository.findAll().isEmpty()) { return 0; } - return tableRepository.findAll().stream().map(Table::getDataLength).mapToLong(d -> d).sum(); + return tableRepository.findAll() + .stream() + .map(Table::getDataLength) + .filter(Objects::nonNull) + .mapToLong(d -> d) + .sum(); }) .description("The total volume of available research data") .strongReference(true)