Repository navigation
ci: run the full matrix on release/** integration branches - #386
Conversation
All six workflows only triggered on main/master, for both push and pull_request. A PR targeting release/0.4.70 therefore got no checks at all, which makes the release-train model unusable: work would only be verified at the point it reaches main, i.e. after the whole train is already assembled. Add 'release/**' to the push and pull_request branch filters so an integration branch is gated exactly like main -- each PR is verified when it lands on the train, and the train itself is verified on every push before it is proposed to main.
Every workflow restores an ~800 MB mcpp cache and then immediately runs 'rm -rf $HOME/.mcpp/registry', which also deletes registry/data/xpkgs -- the downloaded and extracted package payloads. The cache was therefore almost worthless, and every run had to re-fetch every transitive source from its upstream host. That made CI fail wholesale whenever a single upstream host was unreachable. Today all six workflows fail on error: fetch '[email protected]' failed (exit 1) compat.bzip2 is a transitive dependency of compat.libarchive and is absent from mcpp.lock, which only pins direct dependencies, so it is re-resolved and re-downloaded from sourceware.org on every run. Prune only what actually has to be re-resolved for GLOBAL -- the indexes and the mirror config -- and keep data/xpkgs. Payloads are sha256-pinned by their recipe, so retaining them cannot leak a CN artifact into a GLOBAL build. This does not remove the upstream dependency; a cold cache still needs the source hosts. It removes the guarantee of hitting them every time.
追加:修掉一个先于本 PR 存在的 CI 脆弱点第一次提交后实测: 对照实验确认这与改动无关 —— 本 PR 第一次提交只改 workflow 触发条件,叠在 根因日志显示(macOS 那次为例):
修复只清理真正需要为 GLOBAL 重新解析的部分(各索引 + mirror 配置),保留 prune_registry() {
[ -d "$1" ] || return 0
find "$1" -mindepth 1 -maxdepth 1 ! -name data -exec rm -rf {} +
[ -d "$1/data" ] || return 0
find "$1/data" -mindepth 1 -maxdepth 1 ! -name xpkgs -exec rm -rf {} +
}payload 由 recipe 的 sha256 固定,与 mirror 无关,保留它不可能把 CN 产物混进 GLOBAL 构建。 已应用于 linux / linux-root / linux-e2e / macos / windows(pwsh) / release.yml。 验证
未解决的部分这不消除对上游主机的依赖 —— 冷缓存仍需访问 sourceware.org 等。它消除的是"每次都必须访问"。 durable 的修法在上游 mcpp registry:给 |
缓存修复已验证有效 —— 但今天有独立的上游拉取故障修复生效的证据macOS 即:保留下来的 payload 被直接复用,不再触网。这正是本 PR 要达到的效果。 但 CI 仍未全绿 —— 原因是上游,不是本 PR失败点从
这些 job 的缓存键各不相同(e2e 用 musl-gcc、aarch64 用交叉依赖),缓存里没有它们需要的 payload,只能走上游 —— 而今天多个互不相关的上游拉取都在失败。 排除过的可能:
结论:GitHub runner 侧今天对多个上游主机的拉取不稳定。本 PR 把"每次都必须触网"降级为"只有冷缓存才触网",是正确方向且已见效,但无法在上游恢复前让全平台转绿。 建议本 PR 与 #389 可以先审阅。CI 转绿需要等上游恢复后重跑 —— 届时缓存会逐步填充,抗性也会随之提高。 durable 修法仍在上游 mcpp registry:给这些包的 GLOBAL 源补可靠镜像(CN 侧已有 |
The plan assumed a PR landing on the integration branch would be gated by CI. It was not: all six workflows only triggered on main/master, so a PR based on release/0.4.70 got no checks at all. A second, pre-existing problem surfaced next -- every workflow restored an ~800 MB mcpp cache and then deleted the payload directory it had just restored. Add P-1 covering both (fixed in #386) plus the unresolved upstream fetch instability, and note that it gates R.3's three-platform-green requirement without changing that requirement.
* docs(agents): xvm group transaction review, design and plan Add the PR #384 review, the target architecture, and the staged implementation plan for the 0.4.70 release train. - review: verify the five root causes against origin/main, record two silent regressions (includedir no longer written, headers never carry a group), the removal-fallback coherence gap, and the before/after user-experience comparison - design: three-layer state model (Catalog / Selection / Materialization), group promoted to a top-level table, commit-then-reconcile so the filesystem stops participating in the transaction, doctor as the reconciler - plan: single release/0.4.70 integration branch, P0-P4 plus an R integration stage, 18 scenario-level acceptance assertions, and a seamless-upgrade contract (U1-U7) including downgrade safety * docs(agents): record the CI prerequisites the plan had assumed The plan assumed a PR landing on the integration branch would be gated by CI. It was not: all six workflows only triggered on main/master, so a PR based on release/0.4.70 got no checks at all. A second, pre-existing problem surfaced next -- every workflow restored an ~800 MB mcpp cache and then deleted the payload directory it had just restored. Add P-1 covering both (fixed in #386) plus the unresolved upstream fetch instability, and note that it gates R.3's three-platform-green requirement without changing that requirement. * docs(agents): bound the merge exception during the upstream outage CI cannot go green while P-1.3 lasts, and review of intermediate PRs is delegated. Both facts need a written boundary so 'upstream is broken' does not become a general waiver. Allow a PR to land on the integration branch only when the local build and test suite are green AND the CI failure carries the known upstream fetch signature, before any of this repo's code is compiled. Any other failure signature still blocks. R.3 is unchanged: the branch has to be re-run green on all three platforms before it is proposed to main, so this defers verification rather than skipping it.
Problem
0.4.70 采用单一
release/0.4.70集成分支模型(见 #385 的实施计划),但六个 CI workflow 全部只在main/master上触发 ——push和pull_request两个事件都是:后果:base 为
release/0.4.70的 PR 完全不跑 CI。 #385 实测no checks reported。这让集成分支模型无法运转 —— 工作只会在抵达 main 时才被验证,也就是整列车已经组装完毕之后。而这个模型的全部意义恰恰是"每个 PR 上车时就验证,整列车验证通过后才提交给 main"。
Change
给六个 workflow 的
push与pull_request分支过滤器加上release/**:[main, master][main, master, 'release/**'][main, master][main, master, 'release/**'][main, master][main, master, 'release/**'][main, master][main, master, 'release/**'][main, master][main, master, 'release/**'][ main ][ main, 'release/**' ]用通配
release/**而非硬编码release/0.4.70,这样后续版本的集成分支无需再改 workflow。仓库里已有release/0.4.3、release/0.4.14等历史分支,命名惯例一致。未改动:
release.yml/mirror-binaries.yml(workflow_dispatch)、gitee-sync.yml(只同步 main)、xlings-ci-archlinux.yml(按 paths 触发)—— 都不应跟随集成分支。Verification
Note
本 PR 是集成分支模型的前置条件,需先于 #384 与后续 P0–P4 的 PR 合入。
另有一个独立的、先于本 PR 存在的问题:#384 在 base 还是 main 时六平台 CI 均失败于
error: fetch '[email protected]' failed (exit 1),重跑不恢复。compat.bzip2是compat.libarchive的传递依赖,不在mcpp.lock中(lock 只锁直接依赖),因此受上游 registry 变动影响。该问题与本 PR 无关,将单独处理。