Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 恢复路径解析调整#2754 #2767

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import com.tencent.bkrepo.common.mongo.util.Pages
import com.tencent.bkrepo.common.security.util.SecurityUtils
import com.tencent.bkrepo.job.RESTORE
import com.tencent.bkrepo.job.SEPARATE
import com.tencent.bkrepo.job.SEPARATION_TASK_COLLECTION_NAME
import com.tencent.bkrepo.job.separation.config.DataSeparationConfig
import com.tencent.bkrepo.job.separation.dao.SeparationFailedRecordDao
import com.tencent.bkrepo.job.separation.dao.SeparationTaskDao
Expand Down Expand Up @@ -100,10 +99,10 @@ class SeparationTaskServiceImpl(
projectId?.apply { criteria.and(TSeparationTask::projectId.name).isEqualTo(projectId) }
repoName?.apply { criteria.and(TSeparationTask::repoName.name).isEqualTo(repoName) }
val query = Query(criteria)
val dateRecords = mongoTemplate.findDistinct(
query, TSeparationTask::separationDate.name, SEPARATION_TASK_COLLECTION_NAME, LocalDateTime::class.java
)
result.addAll(dateRecords)
val dateRecords = mongoTemplate.find(query, TSeparationTask::class.java)
dateRecords.forEach {
result.add(it.separationDate)
}
return result
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import com.tencent.bkrepo.job.separation.pojo.query.NodeDetailInfo
import com.tencent.bkrepo.job.separation.service.RepoSpecialDataSeparator
import com.tencent.bkrepo.job.separation.util.SeparationUtils
import com.tencent.bkrepo.job.separation.util.SeparationUtils.getNodeCollectionName
import com.tencent.bkrepo.maven.util.MavenGAVCUtils.toMavenGAVC
import com.tencent.bkrepo.maven.util.MavenGAVCUtils.mavenGAVC
import com.tencent.bkrepo.maven.util.MavenStringUtils.formatSeparator
import com.tencent.bkrepo.maven.util.MavenUtil.extractGroupIdAndArtifactId
import com.tencent.bkrepo.maven.util.MavenUtil.extractPath
Expand Down Expand Up @@ -210,7 +210,7 @@ class MavenRepoSpecialDataSeparatorHandler(

override fun getRecoveryPackageVersionData(recoveryInfo: RecoveryNodeInfo): RecoveryVersionInfo {
with(recoveryInfo) {
val mavenGAVC = fullPath.toMavenGAVC()
val mavenGAVC = fullPath.mavenGAVC()
val version = mavenGAVC.version
val artifactId = mavenGAVC.artifactId
val groupId = mavenGAVC.groupId.formatSeparator("/", ".")
Expand Down
Loading