diff --git a/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRuntimeService.kt b/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRuntimeService.kt index c71b4cb58e1..50f62b8e885 100644 --- a/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRuntimeService.kt +++ b/src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRuntimeService.kt @@ -219,24 +219,8 @@ class PipelineRuntimeService @Autowired constructor( } } - /** - * 查询BuildInfo,根据是否为runtime运行时判断是否需要排除已删除的调试构建 - * @param projectId: 项目Id - * @param buildId: 构建Id - * @param queryDslContext: 事务上下文 - * @param runtime: 运行时调用,默认都可以查到完整构建中的查询 - */ - fun getBuildInfo( - projectId: String, - buildId: String, - queryDslContext: DSLContext? = null, - runtime: Boolean? = true - ): BuildInfo? { - return if (runtime == false) { - pipelineBuildDao.getUserBuildInfo(queryDslContext ?: dslContext, projectId, buildId) - } else { - pipelineBuildDao.getBuildInfo(queryDslContext ?: dslContext, projectId, buildId) - } + fun getBuildInfo(projectId: String, buildId: String, queryDslContext: DSLContext? = null): BuildInfo? { + return pipelineBuildDao.getBuildInfo(queryDslContext ?: dslContext, projectId, buildId) } fun getBuildInfo(projectId: String, pipelineId: String, buildId: String): BuildInfo? { 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 49cd464b47f..688205ba732 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 @@ -1556,8 +1556,7 @@ class PipelineBuildFacadeService( val buildInfo = pipelineRuntimeService.getBuildInfo( projectId = projectId, buildId = buildId, - queryDslContext = queryDslContext, - runtime = false + queryDslContext = queryDslContext ) ?: throw ErrorCodeException( statusCode = Response.Status.NOT_FOUND.statusCode, errorCode = ProcessMessageCode.ERROR_NO_BUILD_EXISTS_BY_ID,