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:希望支持分支进行上架测试 #4780 #9539

Merged
merged 86 commits into from
Nov 24, 2023

Conversation

yjieliang
Copy link
Collaborator

@yjieliang yjieliang commented Oct 10, 2023

feat:希望支持分支进行上架测试 #4780
需对插件版本数据进行初始化处理
1、将所有T_ATOM表 LATEST_TEST_FLAG字段数据设置为false
UPDATE T_ATOM
SET LATEST_TEST_FLAG = b'0';

2、将最新构建的插件测试版本数据LATEST_TEST_FLAG字段设置为true
UPDATE T_ATOM t1
JOIN (
SELECT ATOM_CODE, MAX(UPDATE_TIME) AS max_update_time
FROM T_ATOM t2
WHERE ATOM_STATUS IN (4, 5)
GROUP BY ATOM_CODE
) t2 ON t1.ATOM_CODE = t2.ATOM_CODE AND t1.UPDATE_TIME = t2.max_update_time
SET t1.LATEST_TEST_FLAG = b'1';

@yjieliang yjieliang changed the title pref:插件国际化properties文件value值支持引入文件 #9366 feat:希望支持分支进行上架测试 #4780 Oct 10, 2023

@ApiOperation("根据插件版本ID获取插件版本进度")
@GET
@Path("/desk/atom/release/Ids/{atomId}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ids改成ids吧

@@ -260,6 +261,16 @@ class AtomDao : AtomBaseDao() {
}
}

fun getAtomTestVersion(dslContext: DSLContext, atomCode: String, versionPrefix: String): TAtomRecord? {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个方法名称有问题,不要写成专门查插件测试版本

@@ -512,14 +525,21 @@ class AtomDao : AtomBaseDao() {
delim = ".",
count = -1
)
val field = t.field(KEY_BRANCH_TEST_FLAG) as Field<Boolean>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

字段命名有问题,要体现是分支测试字段

@@ -713,7 +715,7 @@ abstract class AtomServiceImpl @Autowired constructor() : AtomService {
versionName = "$atomVersion ($atomStatusMsg)"
latestVersionName = "$latestVersionName ($atomStatusMsg)"
}
if (tmpVersionPrefix != versionPrefix) {
if (tmpVersionPrefix != versionPrefix && !(it[KEY_BRANCH_TEST_FLAG] as Boolean)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KEY_BRANCH_TEST_FLAG这个字段是非必填的,不一定有值吧

@@ -45,5 +45,7 @@ data class StoreI18nConfig(
@ApiModelProperty("map字段在db中key的前缀")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

storeI18nConfig公共的文件为什么放在插件的路径下

@yjieliang yjieliang closed this Nov 21, 2023
@yjieliang yjieliang reopened this Nov 21, 2023
Copy link
Collaborator

@carlyin0801 carlyin0801 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@carlyin0801 carlyin0801 requested a review from JamiKX1 November 23, 2023 11:36
Copy link
Collaborator

@JamiKX1 JamiKX1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -544,8 +550,8 @@ class QualityIndicatorService @Autowired constructor(
fun serviceRefreshIndicator(elementType: String, metadataMap: Map<String /* dataId */, String /* id */>): Int {
logger.info("QUALITY|refreshIndicator elementType: $elementType")
val data = indicatorDao.listByElementType(dslContext, elementType, IndicatorType.MARKET)
val testData = data?.filter { isTestIndicator(it) } ?: listOf()
val prodData = data?.filter { !isTestIndicator(it) } ?: listOf()
val testData = data?.filter { isTestIndicator(IN_READY_TEST, it) } ?: listOf()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有测试同时多条分支上架测试插件的场景吗,这里把测试的指标数据刷到正式,如果有多个分支的测试插件对应多组测试的指标,过滤条件是不是还仅是IN_READY_TEST

@bkci-bot bkci-bot merged commit 247ddeb into TencentBlueKing:master Nov 24, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants