Project:Debug Mediawiki image

From MaRDI portal
Revision as of 08:32, 9 May 2025 by Larissa (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When new bugs suddenly appear in some functionality of the portal, it is worth investigating whether the bug originates from an error in the Mediawiki core image. A first indication about the origin of the bug can be obtained checking the Console in the browser (right click > Inspect > Console, on any paging experiencing the error).

Bugs in the core Mediawiki image can appear because:

  • The latest image build (happening through Github workflows) partially failed.
  • A change in some extension introduced a bug.

The Mediawiki core image behind the MaRDI portal is defined in the following Dockerfile.

Old: This Dockerfile includes two important variables:

New: The clone_all.sh includes two important variables:

  • ARG WMF_BRANCH=wmf/1.44.0-wmf.18
  • ARG REL_BRANCH=REL1_43

These define the branches that are pulled in the GitHub repositories corresponding to Mediawiki as well as the extensions that we use.

As defined in the Dockerfile, some extensions are pulled from the WMF_BRANCH, some are pulled from the REL_BRANCH and some are pulled from the master branch (currently LinkedWiki, Math and MathSearch).

The fact that we pull some extensions from master sometimes introduces bugs due to conflicts with the Mediawiki base layer defined by the WMF_BRANCH.

The first thing one can try to fix the bug is to update the WMF_BRANCH to the latest version. For this, just check the latest released version and change the WMF_BRANCH version to use the version in the green box (group 2).

Build the image in your local system with:

docker build -t ghcr.io/mardi4nfdi/docker-wikibase:main .

And try to locally run all services with

docker compose up -d

Make sure that your local docker-compose.yaml is using the same tag that you use when you create the image. In this case ghcr.io/mardi4nfdi/docker-wikibase:main.

Updating the Mediawiki core version usually fixes the bug if it was caused by a conflict between Mediawiki and the extension.

If the bug persists, it will be necessary to check in details the logs during the image build process. This might indicate the source of the problem. For this, it is recommended to use

docker build --no-cache --progress=plain -t ghcr.io/mardi4nfdi/docker-wikibase:main .