Steps to replicate the issue (include links if applicable):
- For the mediawiki service, use a container image that uses libcurl v7.85+
- Update to mwcli v0.27.1 and update the docker environment
- sudo mw update --version=v0.27.1
- mw docker update
- Use the bookworm-php83-fpm:1.0.0 image and recreate the mediawiki service
- mw docker env set MEDIAWIKI_IMAGE docker-registry.wikimedia.org/dev/bookworm-php83-fpm:1.0.0
- mw docker mediawiki create -- force-recreate
- See the curl/libcurl version: $ mw docker mediawiki exec -- curl --version
- Update to mwcli v0.27.1 and update the docker environment
- Execute a curl command, e.g.
$ mw dev mw exec -- curl --request GET --url 'http://default.mediawiki.mwdd.localhost:8080/w/rest.php/wikibase/v1/entities/items/Q1' --header 'User-Agent: whatever' -v Note: Unnecessary use of -X or --request, GET is already inferred. * Trying 127.0.0.1:8080... * connect to 127.0.0.1 port 8080 failed: Connection refused * Trying [::1]:8080... * connect to ::1 port 8080 failed: Connection refused * Failed to connect to default.mediawiki.mwdd.localhost port 8080 after 0 ms: Couldn't connect to server * Closing connection 0 curl: (7) Failed to connect to default.mediawiki.mwdd.localhost port 8080 after 0 ms: Couldn't connect to server
- Run Wikibase REST API e2e tests involving sitelinks (execute from extensions/Wikibase/repo/rest-api dir): $ mw dev mw fresh -- npm run api-testing:e2e-crud -- --grep sitelink
Software version:
$ mw version Version Information Value BuildDate 2025-03-06T17:08:42Z Version 0.27.1 Releases https://gitlab.wikimedia.org/repos/releng/cli/-/releases
Workaround:
Update to v0.27.2+ or manually set the image the mediawiki service uses to one that include a version of libcurl before 7.85.0:
- mw dev env set MEDIAWIKI_IMAGE docker-registry.wikimedia.org/dev/buster-php81-fpm:1.0.1-s2
- mw dev mw create --force-recreate
Other information (browser name/version, screenshots, etc.):
- PHP uses libcurl so the solution can't be as simple as "don't use curl"
- The change was made in PR9296 and released in curl/libcurl 7.85 (see the tags on the commit)
- Discussions relating to this change breaking peoples workflows and curl maintainers reluctant to revert the change: #11104 and #15628
- More information in T387494#10617603
TODO:
- Roll back to using the buster-php81-fpm image by default until a solution implemented
- Decide on what to use instead of *.localhost
- Implement alternative
- Add more test cases to CI to cover similar issues in the future