Skip to content
Snippets Groups Projects
Commit ed03bf2a authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch...

Merge branch '462-bug-prevents-volume-computation-when-data-length-column-in-metadata-db-is-null' into 'dev'

Resolve "Bug prevents volume computation when data length column in Metadata DB is null"

See merge request !348
parents d6d2d5ec 321f6107
No related branches found
No related tags found
3 merge requests!356Dev,!350Dev,!348Resolve "Bug prevents volume computation when data length column in Metadata DB is null"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
author: Martin Weise 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) [: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 ...@@ -10,6 +10,8 @@ author: Martin Weise
#### Fixes #### 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 * Bug where the schema could not be created manually
in [#461](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/461). in [#461](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/461).
......
...@@ -393,6 +393,10 @@ release-helm: ...@@ -393,6 +393,10 @@ release-helm:
refs: refs:
- /^release-.*/ - /^release-.*/
when: manual when: manual
needs:
- build-helm
dependencies:
- build-helm
before_script: before_script:
- "docker logout ${CI_REGISTRY_URL}" - "docker logout ${CI_REGISTRY_URL}"
- "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}"
......
...@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import java.util.Objects;
@Log4j2 @Log4j2
@Configuration @Configuration
public class MetricsConfig { public class MetricsConfig {
...@@ -70,7 +72,12 @@ public class MetricsConfig { ...@@ -70,7 +72,12 @@ public class MetricsConfig {
if (tableRepository.findAll().isEmpty()) { if (tableRepository.findAll().isEmpty()) {
return 0; 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") .description("The total volume of available research data")
.strongReference(true) .strongReference(true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment