Skip to content

Commit

Permalink
feat:保存流水线时,校验是否有子流水线循环依赖 TencentBlueKing#10479
Browse files Browse the repository at this point in the history
  • Loading branch information
hejieehe committed Nov 25, 2024
1 parent 6b8f9d7 commit 021a537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,8 @@ data class SubPipelineRef(
fun subRefKey() = "$subProjectId|$subPipelineId"

// 链路打印
fun chainKey() = "$projectId|$pipelineId|$taskSeq"
fun chainKey() = "$projectId|$pipelineId|$stageId-$containerId-$taskSeq"

// 插件下标
fun relSeq() = "$stageId-$containerId-$taskSeq"
}
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class SubPipelineCheckService @Autowired constructor(
val editUrl = pipelineEditUrl(projectId, pipelineId)
ProcessMessageCode.BK_SUB_PIPELINE_CIRCULAR_DEPENDENCY_ERROR_MESSAGE to arrayOf(
editUrl,
"${subPipelineRef.pipelineName} [${subPipelineRef.taskSeq}]"
"${subPipelineRef.pipelineName} [${subPipelineRef.relSeq()}]"
)
}
// [其他流水线_1] -> [其他流水线_2]
Expand All @@ -320,7 +320,7 @@ class SubPipelineCheckService @Autowired constructor(
val editUrl = pipelineEditUrl(projectId, pipelineId)
ProcessMessageCode.BK_OTHER_SUB_PIPELINE_CIRCULAR_DEPENDENCY_ERROR_MESSAGE to arrayOf(
editUrl,
"${subPipelineRef.pipelineName} [${subPipelineRef.taskSeq}]",
"${subPipelineRef.pipelineName} [${subPipelineRef.relSeq()}]",
editUrlBase,
parentPipelineRef.pipelineName.ifBlank { subPipelineRef.pipelineName }
)
Expand Down

0 comments on commit 021a537

Please sign in to comment.