Skip to content

Init submodules when fetching extensions and skins - #7

Open
claude[bot] wants to merge 1 commit into
mainfrom
fix/fetch-repos-submodules
Open

claude[bot] wants to merge 1 commit into
mainfrom
fix/fetch-repos-submodules

Conversation

@claude

@claude claude Bot commented Sep 14, 2026

Copy link
Copy Markdown

Requested via Slack thread

Before: fetch-repos.py cloned with git clone --depth=1 --branch <REL> and updated with fetch/checkout/reset --hard. Neither touched submodules. Wikibase declares five of them in .gitmodules, including view/lib/wikibase-termbox (gerrit wikibase/termbox), so every tree init-version.sh builds left those directories empty.

After: the clone recurses submodules and the update path runs git submodule update --init --recursive, so view/lib/wikibase-termbox/resources.json and the other view libraries are present. The update path also repairs trees an earlier run left empty.

resources.json is a committed file in the termbox submodule, not a build artifact — TermboxModule::getMessages() reads it while ResourceLoader assembles the startup module, so a missing one throws RuntimeException: Failed to open …/resources.json and that request gets no JS module registry at all (MEDIAWIKI-CS1).

How

Two flags, mirroring what mw-deploy's shim already does for the same trees (shim/mwdeploy_shim.py:543, :796) — the two tools disagreed and only the scaffold was wrong.

Validated locally against a throwaway superproject holding a view/lib/wikibase-termbox submodule:

  • python3 -m py_compile scripts/extensions/fetch-repos.py
  • fresh clone → resources.json present
  • old-style clone (no --recurse-submodules) reproduces the empty directory; fetch-repos.py --update over it restores the file

This is a latent defect fix, not a proven cause of the single-host event on mw-us-east-011 — only that one node of four is affected, which points at that host's synced tree rather than at the scaffold. The ops repair there is still needed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MuStKvs3pWiFUNmf615dgN


Generated by Claude Code

Wikibase keeps view/lib/wikibase-termbox and four other view libraries
as git submodules. fetch-repos.py cloned and reset without them, so
every tree built by init-version.sh had those directories empty and
TermboxModule::readJsonFile fataled on the missing resources.json while
building the startup ResourceLoader module.

Matches what mw-deploy's shim already does (mwdeploy_shim.py:543,796).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuStKvs3pWiFUNmf615dgN
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c5e41813-8556-4135-ad2a-3a55351d819c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant