Repository navigation
docs(ci): CI workflow 设计拆分为独立文档,并补一期执行清单与接入决策 - #46
Merged
Merged
Conversation
接入指南第 5 章已 800 余行,混在接入指引里不便按设计评审,也让指南过长。 拆成《CI workflow 可观测技术设计》,指南 §5 改为摘要 + 指向。 - 新文件 docs/CI workflow可观测技术设计.md:章节号 5.x → 1~5,正文六处交叉引用同步改写 - 指南 §5 保留一段摘要与链接,§6 Jenkins 任务编号不变 - CI可观测目标.md 三处「指南第 5 章 / 5.4.1 / 5.2.3」改为指向新技术设计 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. 👍 |
把「一期待办」从设计论证里剥离成可勾选的执行清单,并记录已实测定死的前提: - A 已定事实:三环境→集群/仓库清单/凭据/指标去向/上线链路对照表; 出网、test 端口名自动发现、prod 需手工 scrape job、cn4 可挂 PVC 四项标 🔒 - 0 前置决策:spec 指标前缀条款、community 取值、GitCode Actions API 实测等阻塞项 - 1–9 分步:工程骨架 → ai-workflow 接入 → 平台无关核心 → 两个适配器 → 指标与自监控 → 三环境上线 → 监控接入 → 验收 → 二期预留接口 技术设计文档头部加一行回链。 暂不打 project:ci-workflow-aggregator label(服务尚未注册),先以本文作为跟踪入口。 Co-Authored-By: Claude Code <noreply@anthropic.com>
原条款只允许业务指标用 `<service>_` 前缀,而 CI workflow 观测钉的是 `ci_workflow_*`(同一批事实可能由轮询与事件两条路径产出),落地即违约。 新增「领域共享指标可用 `<domain>_` 前缀」,并写明三条前提: 同一事实同名同 schema(来源差异走 source label)、跨路径必须单点入账 (禁止各组件各自计数,否则 sum 翻倍且不报错)、不同事实不同名 (上游 ghalistener 的 gha_* 不改名)。 同时新增「已登记的领域前缀」表,避免两个领域撞名。 纯命名条款,不改字段与取值,四语言实现无需同步。 执行清单第 0 节对应项勾选完成。 Co-Authored-By: Claude Code <noreply@anthropic.com>
观测对象(vllm-project / triton-lang / GitCode 组织)不在 spec 社区枚举内, 本服务是平台维度采集器而非某社区实例,故 OBS_COMMUNITY 固定 common, 跨仓区分一律走 repo label。 设计文档「部署形态」补 OBS_* 显式注入说明(不靠兜底); 执行清单第 0 节对应项勾选完成。 Co-Authored-By: Claude Code <noreply@anthropic.com>
CLA Signature PassTangJia025, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
匿名实测 Ascend/pytorch(2026-10-28)确定 v8 actions 端点:
- base path 是 api.gitcode.com/api/v8/repos/{o}/{r}/actions/*,runs/workflows/jobs 均匿名 200
- v5 侧的 401 是未匹配子路径的兜底,不能用来判端点是否存在
- per_page 上限 100、按 start_time 严格倒序、支持 status/branch/workflow_id 过滤、since 被忽略
- 状态只有 RUNNING/COMPLETED/FAILED/CANCELED(job 级另有 IGNORED),无 QUEUED、无 FAILED(...) 括号原因
- 时间全部毫秒;jobs 接口是扁平 jobs[],apply_time→start_time 可算排队;详情接口 360KB 不要轮询
- 响应无 x-ratelimit-* 头
生产 PAT 形态按既定方案定稿(fine-grained,Actions/Contents/Metadata 只读,预算 ~45%)。
Co-Authored-By: Claude Code <noreply@anthropic.com>
失败口径:在归一后的 conclusion 枚举上实现唯一函数,告警/连续失败/大盘共用; 补 GitHub↔GitCode 原值映射表,并定「未知取值留在分母」——剔除会让平台新增 取值时分母静默变小、失败率虚高。 workflow 排除清单:走 values 下发、按 workflow 身份精确匹配,剔除点在归一化之后、 状态层之前;列出四类初版及各自排除理由。新增 workflow 默认采集、排除须显式配置。 Co-Authored-By: Claude Code <noreply@anthropic.com>
hk-001(test)与 hk-003(preview)各建 1Gi csi-disk RWO PVC,均 10–20s Bound, 验证后已删除;hk-001 default ns 另有 6 个 127d 的 Bound PVC 作旁证。 关键前提:两个集群都没有默认 StorageClass,chart 必须显式声明 storageClassName, 漏写是静默 Pending 而非报错。保留 PVC Pending 超时降级 emptyDir 的兜底开关。 Co-Authored-By: Claude Code <noreply@anthropic.com>
- umbrella:opensourceways/ci-observability,.gitmodules 挂 ci-workflow-aggregator 与 jenkins-exporter;submodule 只能指向仓库根,故 exporter 必须独立成仓而非塞进 ci-all - service:.ai-flow/services/ci-observability.yaml,label project:ci-observability, 一个服务两个镜像靠 kustomize format + image_names 映射 - pod_selector 用两个 Deployment 共打的 part-of=ci-observability,否则另一个组件 镜像替换不被校验(绿着但没部署) - 记下引擎语义:submodule update --remote ⇒ 构建跟子仓分支头,umbrella SHA 不是发布快照 Co-Authored-By: Claude Code <noreply@anthropic.com>
接入指南 §6 已定「自研 exporter 拉 Jenkins REST API、不装 Prometheus 插件」 (插件只有 job 维度,回答不了多参数单 job 的仓库归因)。据此: - spec 领域前缀表登记 jenkins_,避免与 ci_workflow_ 之外再撞名 - 执行清单补一条:exporter 必须能访问 openeulerjenkins.osinfra.cn,该域名在部分出口 解析不到;连不通的环境只能验收 /metrics 暴露与自监控,不能验收真实采集 Co-Authored-By: Claude Code <noreply@anthropic.com>
按 release 引擎的实际行为补全: - 构建粒度是子仓:只构建「本 issue 在该子仓有合入 PR」且「根目录有 Dockerfile」的子仓, 另一个子仓完全不动 - 归档按 sub 各自找 kustomization(apply_tag_sync 注释),故两个子仓各一个部署子目录、 各一个 ArgoCD Application,同 ns - infra-common/service.md 每子仓每环境各一行:缺行则该子仓不构建不归档且不报错 - 镜像仓名=子仓名小写;无 Dockerfile 静默跳过 Co-Authored-By: Claude Code <noreply@anthropic.com>
exporter 被我先前写成「无状态可多副本」是错的:接入指南 §6.1.2 明确要求 build number 水位线持久化,否则每次重启把最近 N 条 build 重数一遍, jenkins_build_result_total 虚高。 改为:两个子仓都是常驻微服务(各自 Deployment/Service/凭据/自监控/探针), 都单副本 + strategy:Recreate + 独立 1Gi PVC;「exporter」只是职责命名。 Co-Authored-By: Claude Code <noreply@anthropic.com>
CLA Signature PassTangJia025, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolve https://github.com/opensourceways/backlog/issues/2061
变更
把
可观测接入指南.md第 5 章(CI workflow,805 行)整体搬进新文件docs/CI workflow可观测技术设计.md,指南 §5 只留一段摘要 + 链接;随后在同一 PR 内补出一期执行清单,并把清单一路上定下来的接入决策回写进设计与 spec。
为什么拆:这一章是方案设计(架构图、指标清单、分期规划、详细设计、已知边界),
和指南其余部分(「你属于哪一类、照着接」的操作指引)性质不同,混在一起既不好按设计评审,
也让指南本身长到 1400 行。
具体改动
docs/CI workflow可观测技术设计.md# CI workflow 可观测技术设计,章节号5.x / 5.x.y→1~5 / x.y,六处交叉引用同步改写,本章→本文,加导语与到执行清单的回链;另补两处决策:OBS_COMMUNITY固定common(部署形态段)docs/可观测接入指南.mddocs/CI可观测目标.mdspec/metrics-format.md<domain>_前缀」条款(三条前提)+「已登记的领域前缀」表(登记ci_workflow_、jenkins_)docs/CI workflow可观测一期执行清单.md正文搬运部分内容零改写:
git diff逐行比对原第 5 章,差异只有标题层级、章节号、六处引用与「本章/本文」。一期决策(本 PR 内定稿,均已写入清单)
ci_workflow_*走新增的「领域共享指标」条款;前提是同一事实同名同 schema + 单点入账(事件路径推给 aggregator 合并,不各自计数)communityOBS_COMMUNITY=common,不做请求级覆盖,跨仓区分走repoActions:read+Contents:read+Metadata:read,预算 2000–2250 次/h(约 45%)/api/v8/repos/{o}/{r}/actions/*(api.子域),runs/workflows/jobs 匿名可读;per_page上限 100;状态只有RUNNING/COMPLETED/FAILED/CANCELED(job 级另有IGNORED),无 QUEUED、无FAILED(...);时间全毫秒;详情 360KB 不要轮询;无x-ratelimit-*头conclusion上实现唯一函数;未知取值留在分母(剔除会让分母静默变小、失败率虚高)csi-disk均 10–20s Bound;都没有默认 StorageClass,chart 必须显式声明opensourceways/ci-observability+ 两个子仓(ci-workflow-aggregator、jenkins-exporter),ai-workflow 一个服务一个 labelproject:ci-observability验证
diff -u <原第 5 章> <新文件>人工通读,确认除机械改动外无内容变化grep已无指向「接入指南 5.x」的悬空引用# / ## / ###;代码块未被章节号改写误伤备注
文件名按需求保留空格(
CI workflow可观测技术设计.md),markdown 链接用%20转义。🤖 Generated with Claude Code
AI 使用声明
当前 PR 是否有 AI 参与: