From 7db58c039873178aaff58a3b67a63246bbae0f3e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:18:04 +0000 Subject: [PATCH 1/3] fix(deps): update dependency io.hypersistence:hypersistence-utils-hibernate-62 to v3.7.6 --- packages/server/build.gradle | 2 +- packages/server/gradle.lockfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/build.gradle b/packages/server/build.gradle index 4f7c880334..43fccb54e2 100644 --- a/packages/server/build.gradle +++ b/packages/server/build.gradle @@ -65,7 +65,7 @@ dependencies { implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' implementation 'io.grpc:grpc-all:1.52.1' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'io.hypersistence:hypersistence-utils-hibernate-62:3.7.5' + implementation 'io.hypersistence:hypersistence-utils-hibernate-62:3.7.6' implementation 'javax.inject:javax.inject:1' implementation 'org.apache.commons:commons-csv:1.10.0' implementation 'org.apache.commons:commons-fileupload2-jakarta:2.0.0-M1' diff --git a/packages/server/gradle.lockfile b/packages/server/gradle.lockfile index ad8ffd7300..0f46a50eee 100644 --- a/packages/server/gradle.lockfile +++ b/packages/server/gradle.lockfile @@ -103,7 +103,7 @@ io.grpc:grpc-stub:1.55.1=aotCompileClasspath,aotTestCompileClasspath,nativeImage io.grpc:grpc-testing:1.52.1=aotCompileClasspath,aotTestCompileClasspath,compileClasspath,nativeImageClasspath,nativeImageTestClasspath,processAotClasspath,processTestAotClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.grpc:grpc-xds:1.52.1=aotCompileClasspath,aotTestCompileClasspath,compileClasspath,nativeImageClasspath,nativeImageTestClasspath,processAotClasspath,processTestAotClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.hypersistence:hypersistence-tsid:2.1.1=aotCompileClasspath,aotTestCompileClasspath,compileClasspath,nativeImageClasspath,nativeImageTestClasspath,processAotClasspath,processTestAotClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath -io.hypersistence:hypersistence-utils-hibernate-62:3.7.5=aotCompileClasspath,aotTestCompileClasspath,compileClasspath,nativeImageClasspath,nativeImageTestClasspath,processAotClasspath,processTestAotClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath +io.hypersistence:hypersistence-utils-hibernate-62:3.7.6=aotCompileClasspath,aotTestCompileClasspath,compileClasspath,nativeImageClasspath,nativeImageTestClasspath,processAotClasspath,processTestAotClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.lettuce:lettuce-core:6.2.6.RELEASE=aotCompileClasspath,aotTestCompileClasspath,compileClasspath,nativeImageClasspath,nativeImageTestClasspath,processAotClasspath,processTestAotClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.micrometer:micrometer-commons:1.11.5=aotCompileClasspath,aotTestCompileClasspath,compileClasspath,nativeImageClasspath,nativeImageTestClasspath,processAotClasspath,processTestAotClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath io.micrometer:micrometer-core:1.11.5=aotCompileClasspath,aotTestCompileClasspath,compileClasspath,nativeImageClasspath,nativeImageTestClasspath,processAotClasspath,processTestAotClasspath,productionRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath From b71ff4a96b59bf100d0c834d7caeda784673a029 Mon Sep 17 00:00:00 2001 From: kbirk Date: Wed, 12 Jun 2024 13:27:36 -0400 Subject: [PATCH 2/3] Test fix --- .../hmiserver/service/data/DatasetService.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/DatasetService.java b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/DatasetService.java index 211711ce95..add8d0a621 100644 --- a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/DatasetService.java +++ b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/DatasetService.java @@ -1,7 +1,5 @@ package software.uncharted.terarium.hmiserver.service.data; -import com.fasterxml.jackson.databind.ObjectMapper; -import io.micrometer.observation.annotation.Observed; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -11,11 +9,16 @@ import java.util.List; import java.util.Optional; import java.util.UUID; -import lombok.extern.slf4j.Slf4j; + import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVRecord; import org.springframework.stereotype.Service; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import io.micrometer.observation.annotation.Observed; +import lombok.extern.slf4j.Slf4j; import software.uncharted.terarium.hmiserver.configuration.Config; import software.uncharted.terarium.hmiserver.configuration.ElasticsearchConfiguration; import software.uncharted.terarium.hmiserver.models.dataservice.dataset.Dataset; @@ -134,8 +137,6 @@ public Dataset extractColumnsFromFiles(final Dataset dataset) throws IOException @Observed(name = "function_profile") private Dataset extractColumnsForFreshCreate(final Dataset dataset) throws IOException { - dataset.setColumns(new ArrayList<>()); - if (dataset.getFileNames() != null || dataset.getFileNames().isEmpty()) { // no file names to extract columns from return dataset; @@ -165,8 +166,8 @@ public void addDatasetColumns(final Dataset dataset, final String fileName, fina dataset.setColumns(new ArrayList<>()); } for (final String header : headers) { - final DatasetColumn column = - new DatasetColumn().setName(header).setFileName(fileName).setAnnotations(new ArrayList<>()); + final DatasetColumn column = new DatasetColumn().setName(header).setFileName(fileName) + .setAnnotations(new ArrayList<>()); column.setDataset(dataset); dataset.getColumns().add(column); } From ec27f68e01ba8b55792fd869a27c1af86b26f384 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 17:28:17 +0000 Subject: [PATCH 3/3] chore: lint and format server codebase --- .../hmiserver/service/data/DatasetService.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/DatasetService.java b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/DatasetService.java index add8d0a621..9ccf2a1bdd 100644 --- a/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/DatasetService.java +++ b/packages/server/src/main/java/software/uncharted/terarium/hmiserver/service/data/DatasetService.java @@ -1,5 +1,7 @@ package software.uncharted.terarium.hmiserver.service.data; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.micrometer.observation.annotation.Observed; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -9,16 +11,11 @@ import java.util.List; import java.util.Optional; import java.util.UUID; - +import lombok.extern.slf4j.Slf4j; import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVParser; import org.apache.commons.csv.CSVRecord; import org.springframework.stereotype.Service; - -import com.fasterxml.jackson.databind.ObjectMapper; - -import io.micrometer.observation.annotation.Observed; -import lombok.extern.slf4j.Slf4j; import software.uncharted.terarium.hmiserver.configuration.Config; import software.uncharted.terarium.hmiserver.configuration.ElasticsearchConfiguration; import software.uncharted.terarium.hmiserver.models.dataservice.dataset.Dataset; @@ -166,8 +163,8 @@ public void addDatasetColumns(final Dataset dataset, final String fileName, fina dataset.setColumns(new ArrayList<>()); } for (final String header : headers) { - final DatasetColumn column = new DatasetColumn().setName(header).setFileName(fileName) - .setAnnotations(new ArrayList<>()); + final DatasetColumn column = + new DatasetColumn().setName(header).setFileName(fileName).setAnnotations(new ArrayList<>()); column.setDataset(dataset); dataset.getColumns().add(column); }