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

perf: 提供根据特征数据查询任务信息的APIGW工具接口 #3398 #3424

Merged
merged 5 commits into from
Feb 17, 2025

Conversation

wuyzh39
Copy link
Collaborator

@wuyzh39 wuyzh39 commented Feb 14, 2025

No description provided.

@wuyzh39 wuyzh39 changed the title Issue 3398 perf: 提供根据特征数据查询任务信息的APIGW工具接口 #3398 Feb 14, 2025
Copy link
Collaborator

@liuliaozhong liuliaozhong left a comment

Choose a reason for hiding this comment

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

几个小问题处理下

* 业务ID
*/
@JsonProperty("bk_app_id")
private Long appId;
Copy link
Collaborator

Choose a reason for hiding this comment

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

appId是个兼容字段,接口返回统一命名成:bk_biz_id

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

1

import java.util.List;

@Data
public class EsbTaskLinkV3DTO {
Copy link
Collaborator

Choose a reason for hiding this comment

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

响应体包含scopeType、scopeId、appId属性,建议继承EsbAppScopeDTO.java

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

1

EsbTaskLinkV3DTO esbTaskLinkV3DTO = new EsbTaskLinkV3DTO();
esbTaskLinkV3DTO.setJobInstanceId(stepInstanceBase.getTaskInstanceId());
esbTaskLinkV3DTO.setStepInstanceId(stepInstanceBase.getId());
esbTaskLinkV3DTO.setAppId(stepInstanceBase.getAppId());
Copy link
Collaborator

Choose a reason for hiding this comment

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

appId是兼容字段,一般不返回(具体看是否开启了兼容特性)。资源信息赋值建议使用EsbDTOAppScopeMappingHelper.java工具类

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

1

| data | List<TaskLinkDTO> | Data returned by request |
| permission | object | Permission information |
| request_id | string | Request chain id |

Copy link
Collaborator

Choose a reason for hiding this comment

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

response部分,可以用公共片段引入,{% include '_generic_response.md.j2' %}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

模版中的reponse data字段类型为object,我想强调一下data的类型是List的

Copy link
Collaborator

Choose a reason for hiding this comment

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

好的

| data | List<TaskLinkDTO> | 请求返回的数据 |
| request_id | string | 请求ID |
| permission | object | 权限信息 |

Copy link
Collaborator

Choose a reason for hiding this comment

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

response部分,可以用公共片段引入,{% include '_generic_response.md.j2' %}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

同上

Copy link
Collaborator

Choose a reason for hiding this comment

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

好的

get:
operationId : system_query_gse_task
description : 根据step_id查询gse task id
tags : [ 'system' ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

在YAML语法中,表示列表方括号与内容之间不需要空格

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

1

get :
operationId : system_query_job_instance
description : 根据gse_task_id查询job任务
tags : [ 'system' ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

在YAML语法中,表示列表方括号与内容之间不需要空格

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

1

authConfig :
appVerifiedRequired : true
userVerifiedRequired : false
resourcePermissionRequired : true
Copy link
Collaborator

Choose a reason for hiding this comment

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

多处YAML规范需要调整下,key和冒号之间不需要空格,但冒号最后面需要跟一个空格以分隔键和值

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

Choose a reason for hiding this comment

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

1

Copy link
Collaborator

@liuliaozhong liuliaozhong left a comment

Choose a reason for hiding this comment

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

一个小问题

@@ -75,7 +75,7 @@ query gse task id by step instance id
|------------------|----------|---------------------------------------------------------------------------------------------|
| bk_scope_type | string | Resource scope type. Optional values: biz - Business,biz_set - Business Set |
| bk_scope_id | string | Resource scope ID. Corresponds to bk_scope_type, which means business ID or business set ID |
| bk_app_id | long | Business ID |
| bk_biz_id | long | Business ID |
Copy link
Collaborator

Choose a reason for hiding this comment

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

bk_biz_id从3.5.x以后就不推荐使用了,但是为了兼容老版本接口仍然保留着这字段,建议文档上不写了

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@@ -51,7 +51,7 @@ query job link by gse task id
|------------------|----------|---------------------------------------------------------------------------------------------|
| bk_scope_type | string | Resource scope type. Optional values: biz - Business,biz_set - Business Set |
| bk_scope_id | string | Resource scope ID. Corresponds to bk_scope_type, which means business ID or business set ID |
| bk_app_id | long | Business ID |
| bk_biz_id | long | Business ID |
Copy link
Collaborator

Choose a reason for hiding this comment

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

bk_biz_id从3.5.x以后就不推荐使用了,但是为了兼容老版本接口仍然保留着这字段,建议文档上不写了

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@@ -75,7 +75,7 @@
|------------------|----------|-----------------------------------------|
| bk_scope_type | string | 资源范围类型。可选值: biz - 业务,biz_set - 业务集 |
| bk_scope_id | string | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID |
| bk_app_id | long | 业务ID |
| bk_biz_id | long | 业务ID |
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@@ -51,7 +51,7 @@
|------------------|----------|-----------------------------------------|
| bk_scope_type | string | 资源范围类型。可选值: biz - 业务,biz_set - 业务集 |
| bk_scope_id | string | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID |
| bk_app_id | long | 业务ID |
| bk_biz_id | long | 业务ID |
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Collaborator

@jsonwan jsonwan left a comment

Choose a reason for hiding this comment

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

几个小问题需要处理下。

@jsonwan jsonwan merged commit 9385986 into TencentBlueKing:master Feb 17, 2025
4 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.

3 participants