Skip to content

CI: switch the install script to git clone#92

Closed
malberts wants to merge 2 commits into
relfrom
ci/install-modernize-rel
Closed

CI: switch the install script to git clone#92
malberts wants to merge 2 commits into
relfrom
ci/install-modernize-rel

Conversation

@malberts

@malberts malberts commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Mirrors the equivalent change being applied to the master branch. master and rel are byte-identical lockstep; CI changes need to land on both.

The current matrix covers REL1_43+, none of which is in the affected range, so this isn't fixing a current breakage. It removes a latent hazard as future MediaWiki versions move through the same branch-to-tag conversion, and realises the inline TODO that already predicted dropping the phpunit.xml.template wget.

Switch the install script to git clone

Wikimedia recently converted older MediaWiki release refs (REL1_39 through REL1_42, plus older extension/skin branches) from branches to tags. The original branch refs still exist for now, so the same names resolve as both a branch AND a tag. GitHub's archive endpoint can no longer disambiguate the bare archive/<name>.tar.gz URL form in that state, and returns an HTTP 300 Multiple Choices with a 105-byte body:

the given path has multiple possibilities: #Git::Ref:..., #Git::Ref:...

Switching installWiki.sh to git clone --depth 1 --branch <name> resolves whichever ref form exists and is robust to whatever Wikimedia does with the refs next.

Drop the redundant wget for phpunit.xml.template

The new-runner code path was fetching phpunit.xml.template from raw.githubusercontent.com because MediaWiki marks the file export-ignore in .gitattributes, which excludes it from git archive output. git clone does not honour export-ignore; the file is in the working tree after a normal checkout. With installWiki.sh now using git clone, the separate wget becomes dead code. This realises the inline TODO already noting "remove this once installWiki.sh switches to git clone".

Bump the cache key

Existing wget-era cache entries lack phpunit.xml.template because they were populated from the archive tarball. Without a key bump, on every cache hit after merge the file would be absent and composer phpunit:config would fail. Bump to -v2 so the next run produces a fresh entry from the git clone path, with the file included.

malberts and others added 2 commits June 13, 2026 12:49
GitHub recently converted older MediaWiki release refs (REL1_39 through
REL1_42, plus all old extension/skin branches down to REL1_20) from
branches to tags, leaving both refs in place under the same name. The
bare `archive/<name>.tar.gz` URL form now returns HTTP 300 Multiple
Choices for those names instead of a tarball:

  the given path has multiple possibilities:
    #<Git::Ref:...>, #<Git::Ref:...>

The matrix only covers REL1_43+ so this isn't surfacing today, but the
bare URL form is a latent hazard as future versions move through the
same conversion. Switching to `git clone --depth 1 --branch <name>`
resolves either ref form transparently and is robust to whatever
Wikimedia does with the refs next.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
MediaWiki marks phpunit.xml.template with `export-ignore` in
`.gitattributes`, which excludes it from `git archive` output (and
therefore from GitHub's `archive/<ref>.tar.gz` tarball endpoint).
That's why the new-runner code path had to fetch it separately, and
why the existing inline TODO anticipated this cleanup.

`git clone` does not honour `export-ignore`; the file is in the
working tree after a normal checkout. With installWiki.sh now using
`git clone`, the separate wget for the template becomes dead code.
Drop it.

Bump the cache key to invalidate existing wget-era entries (which
lack `phpunit.xml.template` because they were populated from the
archive tarball); without the bump, on every cache hit the file would
be absent and `composer phpunit:config` would fail.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@malberts malberts force-pushed the ci/install-modernize-rel branch from 80ec252 to d7d5eec Compare June 13, 2026 11:02
@malberts malberts marked this pull request as ready for review June 13, 2026 11:04
@malberts malberts deleted the branch rel June 13, 2026 11:44
@malberts malberts closed this Jun 13, 2026
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