Repository navigation
ci: refresh the mcpp and package-index pins - #403
Merged
Merged
Conversation
Every workflow has been failing on lines like error: fetch '[email protected]' failed (exit 1) error: fetch '[email protected]' failed (exit 1) which read as a network problem and are not one. The mcpplibs index declares a client floor: # index.toml min_mcpp = "0.0.108" CI pinned mcpp 0.0.67, so every fresh index resolution is gated out. The floor check (E0006) landed in mcpp 0.0.85, and 0.0.67 predates it, so the pinned client does not even report the violation -- it just fails to resolve, with a message that looks like a failed download. Everything else in the evidence agrees: the runners download glibc at 22 MB/s and gcc at 43 MB/s in the same job, github.com serves the gtest tarball fine, the failures are instant with no transfer, and Finished release [optimized] in 0.01s succeeds outright because its dependencies come from the restored payload cache. Only what actually needs the index -- gtest, a dev-dependency absent from the cache, and compat.bzip2 on the musl e2e path -- hits the gate. Bump mcpp to 0.0.108 and XIM_PKGINDEX_REF to a commit that carries it. The two move together: the index comment spells out that min_mcpp is bumped only alongside the client pin, and #324 refreshed both for the same class of breakage before. aarch64 pins no index ref -- it self-hosts a cross-capable mcpp from source -- so it is left alone and observed.
Refreshing the mcpp pin moved the failure and improved its diagnosis: before error: fetch '[email protected]' failed (exit 1) after error: xlings install_packages failed (exit 1) for '[email protected]' with 1 index repo configured [mcpplibs -> .../mcpp-index.git] xlings emitted no structured error mcpp 0.0.108 delegates package installation to xlings, and it is xlings that fails. The bootstrap was pinned at v0.4.49, which predates 0.4.52 -- the release that moved index fetching to versioned artifacts. So the bootstrap cannot install from the current index at all. That also explains the shape of the failures: Finished release [optimized] in 0.01s succeeds because production dependencies come from the restored payload cache, and only what genuinely needs installing -- gtest, absent from the cache -- reaches the broken path. Bootstrap with v0.4.69, the current release. aarch64 was on 0.4.51 and failing the same way; it moves too, so all seven workflows now bootstrap from one version instead of three.
0.0.109 landed today. Take it rather than 0.0.108: the index floor is 0.0.108, so 0.0.109 satisfies it, and the failure seen on 0.0.108 -- xlings fetching the mcpplibs sub-index artifact successfully and then finding none of its packages in the catalog -- is worth retesting against the newer client before digging further into it. Repins XIM_PKGINDEX_REF to a commit carrying 0.0.109, and the pin comment with it. That failure is not from this release branch: the same pins applied to plain origin/main fail identically (1/7, #404), so it is pre-existing.
With dependency resolution working under mcpp 0.0.109, the suite ran far enough to surface a real failure -- on macOS only: xvm registration production child: project metadata and artifact roots disagree (exit 6) The production-path child builds its expectations from fs::temp_directory_path() while Config discovers the project root by walking up from the working directory. On macOS the temp dir lives under /var, a symlink to /private/var, so the two spellings differ while naming one directory. The global-scope check passed because the test hands Config that path directly; only the discovered project path takes the symlinked route. Compare through weakly_canonical. This is a defect in the assertion, not in the product: nothing outside the test compares these two spellings, and every path the product builds comes from Config consistently. It was invisible until now because every earlier CI run died during dependency resolution, before any test executed.
With CI finally reaching the test phase, Windows surfaced six failures. All six are assumptions in tests, not defects in the product. Four are the same one: cleanup calls remove_all on a directory whose file is still open. POSIX lets you unlink an open file; Windows does not, so the cleanup throws and the failure message says nothing about what was under test. The three state-lock tests now scope their lock and, like the late-conflict test, remove with the error_code overload. One compares a path against a POSIX literal. The value is built with std::filesystem::path, so on Windows it comes back with backslashes and the literal can never match. Build the expectation the same way. One checks for a shim by bare name. Program shims carry the platform's executable suffix, so the bare name only exists on POSIX. The production-path child also moved from exit 6 to exit 10 with the previous canonicalization fix, which is progress: the root comparison now passes and the next check is the one failing. None of this was visible before today -- every earlier CI run died during dependency resolution, so no test on any platform had run.
The state lock deadlocked against xlings itself. Recipes shell out to xlings from their hooks -- d2mcpp's config hook runs `xlings install` -- and the child waited 30 s for a lock its own parent was holding and could not release until the child returned: [error] another xlings process is changing this installation; waited 30s [warn] config hook failed for d2mcpp: exec failed: xlings install ... A real defect I introduced, not a platform quirk. It surfaced on the Windows e2e only because that is the job whose fixture exercises a recipe with a nested install. Make the lock re-entrant across a process tree. The holder exports XLINGS_STATE_LOCK_HELD; a descendant sees it, skips locking, and proceeds under the lock its ancestor already holds. The marker is cleared when the holder is destroyed, so an unrelated later command in the same process still locks normally. SecondAcquisitionInTheSameProcessFailsFast asserted the premise this change removes -- within one process, re-entry is now the intended behavior. Replaced with AnUnrelatedHolderIsExcludedWithAnActionableMessage, which clears the marker to stand in for a process that shares nothing but the home, and a case pinning that a child never waits and that the marker does not outlive its holder.
The mcpp pin moved 0.0.67 -> 0.0.109. That changes nothing for people using xlings -- the binary release does not need mcpp -- but anyone building from source has to move with it, and the notes said nothing. Includes why, because the failure mode is misleading: the mcpplibs index raised its client floor to 0.0.108, and an mcpp older than 0.0.85 does not implement the floor check at all, so it reports a resolution failure as `error: fetch '<pkg>' failed` and looks like a network problem.
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.
根因
mcpplibs 索引声明了客户端版本下限:
CI 钉的是 mcpp 0.0.67,所以任何需要新鲜索引解析的包都被门禁挡掉。
关键在于:E0006 这个 floor 检查是 mcpp 0.0.85 才引入的,而 0.0.67 早于它 —— 所以被钉的客户端根本不会报告违规,只是解析失败,抛出一条长得像下载失败的消息。我就是被这条消息骗了。
排除网络的证据
mcpp build成功(250s,943/943)gtest(dev-dep,缓存无)和 musl e2e 路径的compat.bzip2失败修复
.xlings.jsonmcpp0.0.670.0.108XIM_PKGINDEX_REF(6 个 workflow)dee7848…aa48bec…(已验证含 mcpp 0.0.108)两者必须同时改 —— 索引注释写明 "Bump min_mcpp ONLY together with the CI MCPP_VERSION pin",且 #324 曾为同一类问题刷新过这两个 pin。
xlings-ci-aarch64不钉索引 ref(它从源码自建 cross-capable mcpp),未改动,观察其表现。风险
从 0.0.67 跳到 0.0.108 是 41 个版本。历史上这类 bump 有过 gotcha(gtest_main、mirror-test)。这正是要在 CI 上验证的原因 —— 本机 mcpp 是 0.0.103,同样低于 floor,验证不了这件事。
若 CI 暴露新问题,在本 PR 上迭代,不污染集成分支。