Repository navigation
docs: 补 CI workflow 观测方案(双平台 + 分期规划) - #38
Conversation
接入指南 5.1 原来只有标题。补上方案:结果必须从 GitHub Actions API 取 (ci_runner_job 是 Pushgateway 全量替换、pod-history-api 是 Pod 生命周期、 EphemeralRunner.status 没有 conclusion),给出端点、水位线、指标与告警设计、 以及 Deployment + /metrics 的部署形态;5.2 说明 job 日志在 GitHub 侧、 集群 LTS 只到 runner Pod 这一层。 Co-Authored-By: Claude Code <noreply@anthropic.com>
补一句触发方式的取舍:轮询幂等、可回填、不怕丢事件,端到端延迟 约 12–15 分钟;webhook 能到秒级但要公网接收端与签名校验,事件丢失 只能手工 redelivery,对当前告警粒度不值。 Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
- 第 5 章整体重写:整体架构图(CI 集群在上、中心集群在下, 区分事件上报与 remote_write 两条通路)、指标清单、分期规划、详细设计 - 一期同时覆盖 GitHub 与 GitCode:platform 标签、Source 适配器、 状态/结论归一表、排序键抽象 - ghalistener 归入二期、event agent 归入三期;明确 ② 与 ③ 在 ARC 指标里拆不开,二期 B 只买到②+③合计 - 轮询路径改用「终态轮询 / 在途轮询 / job 轮询」表述 Co-Authored-By: Claude Code <noreply@anthropic.com>
Welcome To opensourceways CommunityHey @TangJia025 , thanks for your contribution to the community. Bot Usage ManualI'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. Contact GuideIf you have any questions, please contact the SIG: infratructure , |
CLA Signature PassTangJia025, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
Linking Issue Notice@TangJia025 , the pull request must be linked to at least one issue. |
|
/check-issue |
接入指南第 5 章整体重写:从「只有结果观测」扩展为覆盖 GitHub + GitCode 的 CI workflow 完整观测方案。
Resolves https://github.com/opensourceways/backlog/issues/2061
整体架构
三个组件、两条通路:
ci-workflow-aggregator(单副本):轮询 REST API,产出 run/job 级指标,暴露/metrics;ghalistener(已有 387 个):容量 gauge 与 ③④ 耗时,经集群 Prometheus agentremote_write进中心;ci-event-agent(三期):watchEphemeralRunner,把 job 级事件POST /ingest给 aggregator。架构图按 CI 集群在上、中心集群在下重画,事件上报与 remote_write 落到不同组件,避免被读成一条路。
指标与阶段
platform标签;双平台
Source接口(ListRuns/GetRun/ListJobs);status+conclusion两个字段,GitCode 只有一个status,适配器负责拆开并映射成统一取值;created_at(GitCode 没有该字段,用start_time);分期
详细设计见第 5.4 节(aggregator / ghalistener / event agent 的内部结构、三条轮询路径、去重与剪枝、核心流程),已知边界见 5.5。
🤖 Generated with Claude Code
AI 使用声明
当前 PR 是否有 AI 参与: