diff --git a/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRepositoryVersionService.kt b/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRepositoryVersionService.kt index 3a5d4b276a5..301ea480aac 100644 --- a/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRepositoryVersionService.kt +++ b/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRepositoryVersionService.kt @@ -107,17 +107,17 @@ class PipelineRepositoryVersionService( val pipelineVersionLock = PipelineVersionLock(redisOperation, pipelineId, version) try { pipelineVersionLock.lock() - val count = pipelineBuildDao.countBuildNumByVersion( - dslContext = dslContext, - projectId = projectId, - pipelineId = pipelineId, - version = version - ) - if (count > 0) { - throw ErrorCodeException( - errorCode = ProcessMessageCode.ERROR_PIPELINE_CAN_NOT_DELETE_WHEN_HAVE_BUILD_RECORD - ) - } +// val count = pipelineBuildDao.countBuildNumByVersion( +// dslContext = dslContext, +// projectId = projectId, +// pipelineId = pipelineId, +// version = version +// ) +// if (count > 0) { +// throw ErrorCodeException( +// errorCode = ProcessMessageCode.ERROR_PIPELINE_CAN_NOT_DELETE_WHEN_HAVE_BUILD_RECORD +// ) +// } dslContext.transaction { t -> val transactionContext = DSL.using(t) // #8161 软删除数据,前端无法查询到该版本 diff --git a/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/builds/PipelineBuildFacadeService.kt b/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/builds/PipelineBuildFacadeService.kt index 2c894ceda4f..fe5a20d5f86 100644 --- a/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/builds/PipelineBuildFacadeService.kt +++ b/src/backend/ci/core/process/biz-process/src/main/kotlin/com/tencent/devops/process/service/builds/PipelineBuildFacadeService.kt @@ -258,7 +258,7 @@ class PipelineBuildFacadeService( param.value = if (param.constant == true) { param.readOnly = true param.defaultValue - } else if (!param.required || !recommendVersionKey(param.id)) { + } else if (!param.required && !recommendVersionKey(param.id)) { param.defaultValue } else if (param.defaultValue is Boolean) { realValue?.toString()?.toBoolean()