Deleting a branch is permanent. It CANNOT be undone. Continue?
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》
问题描述
任务简况信息是任务在启动时,按时间顺序记录下来的一些发送事件,比如任务调度事件,拉取镜像事件,启动成功事件等,用户可通过对这些事件发生观测进一步了解任务状态.
该功能已在Octopus之前的版本中存在,但运行时发现,获取任务简况的信息时延迟时间很久,甚至不发获取.目前初步分析,随着集群任务量较大时,问题更加明显
拟解决
阅读这一块实现代码后,初步优化方案有两步:
目前实现方式中,每当启动任务时,都有实例化一个任务级别的ClientInformer,这样与k8s apiserver的连接数会随着任务量增多而增多,考虑减少Informer数量,https://git.openi.org.cn/OpenI/octopus/src/branch/master/server/taskset/pkg/pipeline/services/kubernetes/logs_helper.go#L60
任务的事件记录目前是累加的方式存放在数据库
job
表的stateSummary
字段中,考虑将这些数据存放在时序数据库中,https://git.openi.org.cn/OpenI/octopus/src/branch/master/server/taskset/pkg/pipeline/models/job/job.go#L39相关问题:
#27
#12
#11
已采用方案:
field key: message;
id: 任务jobId
pageIndex: 分页索引,从1开始
pageSize: 分页大小
taskIndex:子任务索引,从1开始
replicaIndex:副本索引,从1开始
返回的结果包括:
totalSize: 该副本事件总数,
jobEvents: 事件数组,
数组每一项包括:
timestamp:事件发生时间,
name: 副本名,
reason: 事件原因,
message: 事件消息