-
Couldn't load subscription status.
- Fork 209
feat: 执行脚本、查结果提供v4接口 #3845 #3857
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
base: master
Are you sure you want to change the base?
Conversation
添加apigw接口
| @EsbV4API | ||
| @RestController | ||
| @Validated | ||
| public interface ApiGwBatchGetJobInstanceIpLogV4Resource { |
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.
Job对外的开放接口相关类命名上建议使用OpenApi开头,APIGW是特指蓝鲸网关,将来也可能通过其他的网关对外开放接口。
| /** | ||
| * 当步骤为脚本执行时,步骤日志 | ||
| */ | ||
| @JsonProperty("script_logs") |
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.
JSON字段名称与类字段名称建议保持一定映射关系(下划线-驼峰),避免排查问题沟通时混淆。
| /** | ||
| * 当步骤为文件传输时,步骤日志 | ||
| */ | ||
| @JsonProperty("file_logs") |
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.
JSON字段名称与类字段名称建议保持一定映射关系(下划线-驼峰),避免排查问题沟通时混淆。
| * 当步骤为文件传输时,步骤日志 | ||
| */ | ||
| @JsonProperty("file_logs") | ||
| private List<V4FileStepIpLogDTO> fileStepIpLogs; |
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.
上传日志与下载日志建议在单独的类里面分开为2个字段,只有源机器才有上传日志,目标机器才有下载日志,V3接口里面将二者糅合在一起其实不太清晰。
| /** | ||
| * 日志内容 | ||
| */ | ||
| @JsonProperty("log_content") |
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.
JSON字段名称与类字段名称建议保持一定映射关系(下划线-驼峰),避免排查问题沟通时混淆。
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import com.tencent.bk.job.execute.model.esb.v4.req.ApiGwV4HostDTO; | ||
| import lombok.Data; | ||
|
|
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.
建议给类添加上文档注释:单个源执行对象+单个目标执行对象+单个文件对应的一条传输日志
| | job_instance_id | long | 是 | 作业实例ID | | ||
| | step_instance_id | long | 是 | 步骤实例ID | | ||
| | host_id_list | array | 否 | 主机ID列表,最多500个。每个元素为long。host_id_list和ip_list同时存在时,优先使用host_id_list | | ||
| | ip_list | array | 否 | 主机IP列表,最多500个。每个元素定义详见ip。host_id_list和ip_list同时存在时,优先使用host_id_list | |
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.
V4接口需要支持容器,执行对象相关数据结构可参考bkci_plugin_*相关接口。
| | bk_scope_id | string | 是 | 资源范围ID, 与bk_scope_type对应, 表示业务ID或者业务集ID | | ||
| | job_instance_id | long | 是 | 作业实例ID | | ||
| | step_instance_id | long | 是 | 步骤实例ID | | ||
| | host_id_list | array | 否 | 主机ID列表,最多500个。每个元素为long。host_id_list和ip_list同时存在时,优先使用host_id_list | |
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.
最大数量建议修改为100个,单台机器最大日志量可达5MB,500*5MB=2.5GB,还是会有大对象GC的问题。
|
|
||
| #### data | ||
|
|
||
| | 字段 | 类型 | 是否一定不为null | 描述 | |
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.
V4接口中统一使用:是否一定存在
| |--------------------|-------|----|---------------------------| | ||
| | host_list | array | 否 | 静态主机列表,见host定义 | | ||
| | dynamic_group_list | array | 否 | 动态分组ID列表,见dynamic_group定义 | | ||
| | topo_node_list | array | 否 | 分布式拓扑节点列表,见topo_node定义 | |
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.
V4接口需要支持容器,执行对象相关数据结构可参考bkci_plugin_*相关接口。
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.
几个小问题需要再处理下,类命名、支持容器、接口字段存在性描述等共性问题有一些没有重复指出,需要搜索类似的问题都修改下。
No description provided.