diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java index 8140280..6868bf0 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java @@ -738,17 +738,18 @@ public class ModelsServiceImpl implements ModelsService { modelDependency.setMeta(meta); modelDependency1Dao.insert(modelDependency); + // 配置远程S3地址 + String s3Path = "management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName; + dvcUtils.dvcRemoteAdd(rootPath, s3Path); + dvcUtils.dvcConfigS3Credentials(rootPath, endpoint); + dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId); + dvcUtils.dvcConfigS3Credentials3(rootPath, secretAccessKey); + // dvc 跟踪 + dvcUtils.dvcAdd(rootPath, "model"); + dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName); + CompletableFuture.supplyAsync(() -> { try { - // 配置远程S3地址 - String s3Path = "management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName; - dvcUtils.dvcRemoteAdd(rootPath, s3Path); - dvcUtils.dvcConfigS3Credentials(rootPath, endpoint); - dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId); - dvcUtils.dvcConfigS3Credentials3(rootPath, secretAccessKey); - // dvc 跟踪 - dvcUtils.dvcAdd(rootPath, "model"); - dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName); //dvc push 到远程S3 dvcUtils.dvcPush(rootPath); } catch (Exception e) { @@ -756,9 +757,8 @@ public class ModelsServiceImpl implements ModelsService { } return null; }); - return "新增模型版本成功"; } - return null; + return "新增模型版本成功"; } @@ -871,7 +871,7 @@ public class ModelsServiceImpl implements ModelsService { String modelTagName = modelsVo.getModelTag(); String modelTypeName = modelsVo.getModelType(); - String url = gitendpoint + "/api/projects.json?user_id=" + userId + "&sort_by=praises_count"; + String url = gitendpoint + "/api/projects.json"; String name = modelsVo.getName(); if (StringUtils.isNotEmpty(name)) { diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java index e4f6a94..2ce6cd0 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java @@ -214,17 +214,18 @@ public class NewDatasetServiceImpl implements NewDatasetService { addDatasetSourceToDataVo(datasetVo); YamlUtils.generateYamlFile(JsonUtils.objectToMap(datasetVo), localPath, "dataset"); + //dvc数据跟踪 + // 配置远程S3地址 + dvcUtils.dvcRemoteAdd(localPath, s3Path); + dvcUtils.dvcConfigS3Credentials(localPath, endpoint); + dvcUtils.dvcConfigS3Credentials2(localPath, accessKeyId); + dvcUtils.dvcConfigS3Credentials3(localPath, secretAccessKey); + // dvc 跟踪 + dvcUtils.dvcAdd(localPath, "dataset"); + dvcUtils.pushNewBranchToRemote(localPath, gitLinkUsername, gitLinkPassword, branchName); + CompletableFuture.supplyAsync(() -> { try { - //dvc数据跟踪 - // 配置远程S3地址 - dvcUtils.dvcRemoteAdd(localPath, s3Path); - dvcUtils.dvcConfigS3Credentials(localPath, endpoint); - dvcUtils.dvcConfigS3Credentials2(localPath, accessKeyId); - dvcUtils.dvcConfigS3Credentials3(localPath, secretAccessKey); - // dvc 跟踪 - dvcUtils.dvcAdd(localPath, "dataset"); - dvcUtils.pushNewBranchToRemote(localPath, gitLinkUsername, gitLinkPassword, branchName); //dvc push 到远程S3 dvcUtils.dvcPush(localPath); } catch (Exception e) { diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/GitProjectVo.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/GitProjectVo.java index a31a7cd..2f0ad0f 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/GitProjectVo.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/vo/GitProjectVo.java @@ -25,8 +25,9 @@ public class GitProjectVo implements Serializable { @ApiModelProperty(value = "项目标识", required = true) private String repositoryName; -// @ApiModelProperty(value = "项目分类ID", required = false) -// private int projectCategoryId; + @ApiModelProperty(value = "项目分类ID", required = false) + private int projectCategoryId; + // // @ApiModelProperty(value = "项目语言ID", required = false) // private int projectLanguageId;