Pass --update to fetch-repos.py from init-version.sh - #4
Open
claude[bot] wants to merge 1 commit into
Open
claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
init-version.sh called fetch-repos.py with --repos and --target only. Without --update, fetch-repos.py prints "[skip] already cloned" and returns early for any path that already has a .git directory, so extension checkouts stay frozen at whatever revision they were first cloned at and later manifest edits never reach the tree. With --update, existing checkouts go through git_update(): fetch --depth=1 origin <branch>, checkout <branch>, reset --hard origin/<branch>. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AiEBkhzV1z9bEykvEU9U8j
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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.
Requested by Thomas · Slack thread
Before:
scripts/init-version.shcallsscripts/extensions/fetch-repos.pywith--reposand--targetand nothing else.fetch-repos.pytreats an existing checkout as done: if the destination already has a.gitdirectory and--updatewas not passed, it prints[skip] <path> already clonedand returns success without touching the tree. The result is that every extension checkout is frozen at whatever revision it was first cloned at. Editing a manifest changes nothing on disk, because the clone already exists — the edit is silently skipped on every subsequent run. That is the mechanism behind SentryMEDIAWIKI-CEX(99 events):<timeline>tags fail to render because the Timeline checkout is stuck on a revision from a one-month window in which it referenced a class that only exists in MediaWiki 1.46. Upstream fixed it a month later, but the fix has never been fetched.After: The invocation passes
--update, so existing checkouts are brought to the branch the manifest pins.fetch-repos.py'sgit_update()runsgit fetch --depth=1 origin <branch>,git checkout <branch>, thengit reset --hard origin/<branch>. Manifest edits now actually take effect on a re-run, and stale checkouts like Timeline move forward to current upstream.How: One line added to the existing invocation in
scripts/init-version.sh, matching the surrounding\line-continuation style.--updateis already a supported flag onfetch-repos.py(parser.add_argument('--update', action='store_true', help='Pull latest in existing repos')) — nothing in the Python is changed.The trade-off, stated plainly. This genuinely changes deploy behaviour, and it is not a no-op cleanup. Today a re-run of
init-version.shleaves existing checkouts untouched, which has been acting as an accidental freeze. After this change, a re-run moves every existing checkout to the manifest's pinned branch and does so withreset --hard, discarding any local modifications in those directories. That is the intent — it is what makes the manifests authoritative again — but it means the next build will pull in upstream changes that have been frozen for however long each checkout has been sitting there, all at once, across every extension and skin, not just Timeline. Some of those extensions have not moved with this tree in a long time. This deserves a staging run and a look at what actually changes before it is merged and run against production; it should not be a blind merge.What was verified, and what was not. Verified from here:
bash -n scripts/init-version.shparses clean; the skip-early behaviour, the--updateflag definition, and the exactgit_update()command sequence were each read directly inscripts/extensions/fetch-repos.py.shellcheckis not installed in this environment, so it was not run — please don't read this as shellcheck-clean.Not verified: this was not run against a real MediaWiki tree. No
init-version.shexecution, no checkout updated, and no page rendered — so the claim that this clearsMEDIAWIKI-CEXfollows from the code path, not from an end-to-end test. A staging run is the way to confirm it, and is worth doing for the trade-off above regardless.🤖 Generated with Claude Code
https://claude.ai/code/session_01AiEBkhzV1z9bEykvEU9U8j
Generated by Claude Code