Skip to content

Commit 079f05f

Browse files
committed
ci: refresh the published index before the workspace tests
The workspace jobs never refreshed the published index. The snapshot in play is whatever the pinned mcpp release vendored -- the Download step `cp -a`s the release's registry/ over ~/.mcpp/registry, on top of the restored cache -- so it is by construction older than main, and it never moves, because the cache is saved with that same stale copy inside it. This stayed invisible because mcpp DOES refresh on a miss for a direct dependency, and because every member so far resolved its packages either from this checkout or from compat packages that have been in the index far longer than any snapshot. tests/examples/godot-cpp-module is the first member to depend on a package added in the same cycle THROUGH a Form-A package -- a transitive dependency, which is the path with no refresh -- and it failed with error: dependency 'compat.godot-cpp': no package found ... index: local index 160c389 (never refreshed) on all three platforms, minutes after `Publish Index Artifact` had already republished an index that contained it. Reproduced locally against a snapshot of the same age, and `mcpp index update` alone turns that run green: test result ok. 1 passed; 0 failed; finished in 72.94s
1 parent ef3780e commit 079f05f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/validate.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,30 @@ jobs:
409409
echo "MEMBERS=$sel" >> "$GITHUB_ENV"
410410
echo "selected members: ${sel:-<none>}"
411411
412+
# ── Refresh the PUBLISHED index before testing ────────────────────
413+
# Most members resolve everything from this checkout, but a member that
414+
# redirects a namespace other than `compat` gets the REST from the
415+
# published index — and nothing here ever refreshed it. The snapshot in
416+
# play is whatever the pinned mcpp release vendored (the Download step
417+
# `cp -a`s the release's registry/ over ~/.mcpp/registry, on top of the
418+
# restored cache), so it is by construction older than main, and it
419+
# never moves: the cache is saved with that same stale copy inside it.
420+
#
421+
# mcpp does refresh on a miss for a DIRECT dependency, which is why this
422+
# went unnoticed — the gap is a Form-A package's TRANSITIVE dependency.
423+
# tests/examples/godot-cpp-module hit it head-on: the module package's
424+
# own compat.godot-cpp dep resolved against a snapshot predating the
425+
# commit that added it, and failed with `index: local index <sha> (never
426+
# refreshed)` even though the artifact had already been republished.
427+
# (Older members never noticed: their compat packages have been in the
428+
# index far longer than any snapshot.)
429+
- name: Refresh the published package index
430+
shell: bash
431+
env:
432+
MCPP_INDEX_MIRROR: GLOBAL
433+
run: |
434+
"$MCPP" index update
435+
412436
- name: mcpp test (workspace or affected members)
413437
shell: bash
414438
env:

0 commit comments

Comments
 (0)