-
Notifications
You must be signed in to change notification settings - Fork 505
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:流水线查看和构建详情查看配置界面敏感字段展示优化 #11399
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # src/backend/ci/core/store/biz-store/src/main/kotlin/com/tencent/devops/store/atom/service/impl/OpAtomServiceImpl.kt # src/backend/ci/core/store/biz-store/src/main/kotlin/com/tencent/devops/store/common/service/impl/StoreReleaseServiceImpl.kt
val version = element.version | ||
val hashKey = if (version.contains(".*")) { | ||
var latestVersion: String? = null | ||
val atomVersionTestFlag = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
store的逻辑挪到store去实现,通过service接口调用,另外redis的key值以后避免跨微服务使用,这样以后利于redis拆分
val atomVersionTestFlag = | ||
redisOperation.hget("$ATOM_POST_VERSION_TEST_FLAG_KEY_PREFIX:$atomCode", version) | ||
// 项目下调试插件处理 | ||
if (projectTestAtomCodes.contains(atomCode) && (atomVersionTestFlag == "true")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
atomVersionTestFlag转成布尔值再使用比atomVersionTestFlag == "true"可读性更好
} else { | ||
version | ||
} | ||
val param = redisOperation.hget( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
调试项目下的插件版本(可能有测试版本)和一般的项目不一样,你这样缓存到redis有问题,这个逻辑根本不需要写,你通过com.tencent.devops.store.atom.service.impl.MarketAtomEnvServiceImpl#batchGetAtomRunInfos这个接口就可以拿到对应数据
val atomCode = atomRecord.atomCode | ||
val version = atomRecord.version | ||
var atomStatus = AtomStatusEnum.TESTING // 构建成功将插件状态置位测试状态 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么写死成测试状态了?
stage.containers.forEach { container -> | ||
container.elements.forEach { e -> | ||
elementSensitiveParamInfos?.let { | ||
pipelineInfoService.transferSensitiveParam(e, it) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确认这么转换会不会影响历史逻辑,有些逻辑需要使用参数的明文值
@@ -164,7 +169,8 @@ class PipelineBuildRecordService @Autowired constructor( | |||
buildInfo: BuildInfo, | |||
executeCount: Int?, | |||
refreshStatus: Boolean = true, | |||
queryDslContext: DSLContext? = null | |||
queryDslContext: DSLContext? = null, | |||
editPermission: Boolean? = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
editPermission这个参数调用链条太长了,其实只要不是异步调用,一般的请求完全都可以从header中就可以拿到用户信息去判断
@BkInterfaceI18n( | ||
keyPrefixNames = ["ATOM", "{data[*].atomCode}", "{data[*].version}", "releaseInfo"] | ||
) | ||
fun getTestAtoms( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个接口没地方调用,删掉
# Conflicts: # src/backend/ci/core/process/biz-base/src/main/kotlin/com/tencent/devops/process/engine/service/PipelineRepositoryService.kt # src/backend/ci/core/store/biz-store/src/main/kotlin/com/tencent/devops/store/atom/service/impl/OpAtomServiceImpl.kt
流水线查看和构建详情查看配置界面敏感字段展示优化
没有流水线编辑权限的用户查看的流水线编排敏感字段将会进行加密