Skip to content

Commit ef8ac3b

Browse files
authored
Merge pull request #193 from xtreme1-io/hotfix-0.8.1
Bump version to v0.8.1
2 parents 7a5cf62 + 5f579b9 commit ef8ac3b

File tree

6 files changed

+24
-14
lines changed

6 files changed

+24
-14
lines changed

.ops/.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ include:
44

55
variables:
66
APP_NAME: "xtreme1"
7-
APP_VERSION: "0.8"
7+
APP_VERSION: "v0.8.1"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center">
22
<img width="386" alt="Xtreme1 logo" src="https://user-images.githubusercontent.com/84139543/190300943-98da7d5c-bd67-4074-a94f-b7405d29fb90.png">
33

4-
![](https://img.shields.io/badge/Release-v0.8-green)
4+
![](https://img.shields.io/badge/Release-v0.8.1-green)
55
![](https://img.shields.io/badge/License-Apache%202.0-blueviolet)
66
[![Twitter](https://img.shields.io/badge/Follow-Twitter-blue)](https://twitter.com/Xtreme1io)
77
[![Online](https://img.shields.io/badge/Xtreme1_Online-App-yellow)](https://app.basic.ai/#/login)
@@ -62,8 +62,8 @@ Image Data Curation (Visualizing & Debug) - [MobileNetV3](https://github.com/xi
6262
Download the latest release package and unzip it.
6363

6464
```bash
65-
wget https://github.com/xtreme1-io/xtreme1/releases/download/v0.8/xtreme1-v0.8.zip
66-
unzip -d xtreme1-v0.8 xtreme1-v0.8.zip
65+
wget https://github.com/xtreme1-io/xtreme1/releases/download/v0.8.1/xtreme1-v0.8.1.zip
66+
unzip -d xtreme1-v0.8.1 xtreme1-v0.8.1.zip
6767
```
6868

6969
## Start all services

backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN apt update && \
99
apt install -y iputils-ping curl wget netcat python3 python3-pip git
1010
RUN pip3 install --upgrade --force-reinstall git+https://github.com/xtreme1-io/xtreme1-sdk.git@d0cf4cc
1111
WORKDIR /app
12-
COPY --from=build /build/target/xtreme1-backend-0.8-SNAPSHOT.jar ./app.jar
12+
COPY --from=build /build/target/xtreme1-backend-0.8.1-SNAPSHOT.jar ./app.jar
1313
RUN mkdir -p config
1414
RUN wget 'https://github.com/xtreme1-io/asset/raw/main/datasets/xtreme1-lidar-fusion-trial.zip' -O xtreme1-lidar-fusion-trial.zip
1515
RUN wget 'https://github.com/xtreme1-io/asset/raw/main/datasets/xtreme1-image-trial.zip' -O xtreme1-image-trial.zip

backend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ cd backend
9292
mvn package
9393

9494
# Using local configuration to start application.
95-
java -Dspring.profiles.active=local -jar target/xtreme1-backend-0.8-SNAPSHOT.jar
95+
java -Dspring.profiles.active=local -jar target/xtreme1-backend-0.8.1-SNAPSHOT.jar
9696
```
9797

9898
Now you can access the backend service at `http://localhost:8080/`.

backend/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<groupId>ai.basic</groupId>
1515
<artifactId>xtreme1-backend</artifactId>
16-
<version>0.8-SNAPSHOT</version>
16+
<version>0.8.1-SNAPSHOT</version>
1717
<name>Xtreme1 Backend</name>
1818
<description></description>
1919

backend/src/main/java/ai/basic/x1/usecase/UploadDataUseCase.java

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ public void parseTextUploadFile(DataInfoUploadBO dataInfoUploadBO) {
304304
var rootPath = String.format("%s/%s", userId, datasetId);
305305
var errorBuilder = new StringBuilder();
306306
var dataInfoBOBuilder = DataInfoBO.builder().datasetId(datasetId)
307+
.parentId(Constants.DEFAULT_PARENT_ID)
307308
.type(ItemTypeEnum.SINGLE_DATA)
308309
.status(DataStatusEnum.VALID)
309310
.annotationStatus(DataAnnotationStatusEnum.NOT_ANNOTATED)
@@ -349,7 +350,7 @@ public void parseTextUploadFile(DataInfoUploadBO dataInfoUploadBO) {
349350
dataInfoBOList.add(dataInfoBO);
350351
});
351352
if (CollectionUtil.isNotEmpty(dataInfoBOList)) {
352-
insertBatch(dataInfoBOList, datasetId, errorBuilder);
353+
insertBatch(dataInfoBOList, datasetId, errorBuilder, Constants.DEFAULT_PARENT_ID);
353354
}
354355
} catch (Exception e) {
355356
log.error("Handle data error", e);
@@ -463,7 +464,15 @@ public void commonParseUploadFile(DataInfoUploadBO dataInfoUploadBO, BiConsumer<
463464
var dataAnnotationObjectBOBuilder = DataAnnotationObjectBO.builder()
464465
.datasetId(datasetId).createdBy(userId).createdAt(OffsetDateTime.now()).sourceId(sourceId);
465466
sceneFileList.forEach(sceneFile -> {
466-
var sceneId = this.saveScene(sceneFile, dataInfoUploadBO);
467+
Long sceneId;
468+
try {
469+
sceneId = this.saveScene(sceneFile, dataInfoUploadBO);
470+
} catch (DuplicateKeyException e) {
471+
log.error("The scene already exists,scene name is {}", sceneFile.getName());
472+
errorBuilder.append("Duplicate scene names:").append(sceneFile.getName()).append(";");
473+
return;
474+
}
475+
467476
var dataNameList = getDataNamesFunction.apply(sceneFile);
468477
if (CollectionUtil.isEmpty(dataNameList)) {
469478
log.error("The file in {} folder is empty", sceneFile);
@@ -498,7 +507,7 @@ public void commonParseUploadFile(DataInfoUploadBO dataInfoUploadBO, BiConsumer<
498507
}
499508
});
500509
if (CollectionUtil.isNotEmpty(dataInfoBOList)) {
501-
var resDataInfoList = this.insertBatch(dataInfoBOList, datasetId, errorBuilder);
510+
var resDataInfoList = this.insertBatch(dataInfoBOList, datasetId, errorBuilder, sceneId);
502511
this.saveBatchDataResult(resDataInfoList, dataAnnotationObjectBOList);
503512
}
504513
} catch (Exception e) {
@@ -1045,9 +1054,9 @@ public String getFilename(File file) {
10451054
*
10461055
* @param dataInfoBOList Collection of data details
10471056
*/
1048-
public List<DataInfoBO> insertBatch(List<DataInfoBO> dataInfoBOList, Long datasetId, StringBuilder errorBuilder) {
1057+
public List<DataInfoBO> insertBatch(List<DataInfoBO> dataInfoBOList, Long datasetId, StringBuilder errorBuilder, Long parentId) {
10491058
var names = dataInfoBOList.stream().map(DataInfoBO::getName).collect(Collectors.toList());
1050-
var existDataInfoList = this.findByNames(datasetId, names);
1059+
var existDataInfoList = this.findByNames(datasetId, parentId, names);
10511060
if (CollUtil.isNotEmpty(existDataInfoList)) {
10521061
var existNames = existDataInfoList.stream().map(DataInfoBO::getName).collect(Collectors.toList());
10531062
dataInfoBOList = dataInfoBOList.stream().filter(dataInfoBO -> !existNames.contains(dataInfoBO.getName())).collect(Collectors.toList());
@@ -1071,10 +1080,11 @@ public List<DataInfoBO> insertBatch(List<DataInfoBO> dataInfoBOList, Long datase
10711080
}
10721081
}
10731082

1074-
private List<DataInfoBO> findByNames(Long datasetId, List<String> names) {
1083+
private List<DataInfoBO> findByNames(Long datasetId, Long parentId, List<String> names) {
10751084
var dataInfoLambdaQueryWrapper = Wrappers.lambdaQuery(DataInfo.class);
10761085
dataInfoLambdaQueryWrapper.eq(DataInfo::getDatasetId, datasetId);
10771086
dataInfoLambdaQueryWrapper.in(DataInfo::getName, names);
1087+
dataInfoLambdaQueryWrapper.eq(DataInfo::getParentId, parentId);
10781088
return DefaultConverter.convert(dataInfoDAO.list(dataInfoLambdaQueryWrapper), DataInfoBO.class);
10791089
}
10801090

@@ -1145,4 +1155,4 @@ private void getLeafNodeList(List<Tree<String>> treeNodes, List<Tree<String>> le
11451155
}
11461156
});
11471157
}
1148-
}
1158+
}

0 commit comments

Comments
 (0)