Page MenuHomePhabricator

UnsupportedMediaTypeTest(s) failing in Wikibase CI
Closed, ResolvedPublic

Description

Empty change on Wikibase master master fails:

09:31:11   1) Unsupported media type requests
09:31:11        addItemStatement
09:31:11          addItemStatement responds 415 for an unsupported media type:
09:31:11 
09:31:11       AssertionError: 
09:31:11 7Response body: {}8
09:31:11 Invalid status: expected 200 to equal 415      
09:31:11       actual expected
09:31:11       
09:31:11       200415
09:31:11       
09:31:11       at Proxy.<anonymous> (tests/mocha/helpers/chaiHelper.js:91:8)
09:31:11       at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
09:31:11       at Context.<anonymous> (/workspace/src/extensions/Wikibase/repo/domains/crud/tests/mocha/api-testing/UnsupportedMediaTypeTest.js:32:32)
09:31:11       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
09:31:11 
09:31:11   2) Unsupported media type requests
09:31:11        addItemAliasesInLanguage
09:31:11          addItemAliasesInLanguage responds 415 for an unsupported media type:
09:31:11 
09:31:11       AssertionError: 
09:31:11 7Response body: {}8
09:31:11 Invalid status: expected 200 to equal 415      
09:31:11       actual expected
09:31:11       
09:31:11       200415
09:31:11       
09:31:11       at Proxy.<anonymous> (tests/mocha/helpers/chaiHelper.js:91:8)
09:31:11       at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
09:31:11       at Context.<anonymous> (/workspace/src/extensions/Wikibase/repo/domains/crud/tests/mocha/api-testing/UnsupportedMediaTypeTest.js:32:32)
09:31:11       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
09:31:11 
09:31:11   3) Unsupported media type requests
09:31:11        addPropertyAliasesInLanguage
09:31:11          addPropertyAliasesInLanguage responds 415 for an unsupported media type:
09:31:11 
09:31:11       AssertionError: 
09:31:11 7Response body: {}8
09:31:11 Invalid status: expected 200 to equal 415      
09:31:11       actual expected
09:31:11       
09:31:11       200415
09:31:11       
09:31:11       at Proxy.<anonymous> (tests/mocha/helpers/chaiHelper.js:91:8)
09:31:11       at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
09:31:11       at Context.<anonymous> (/workspace/src/extensions/Wikibase/repo/domains/crud/tests/mocha/api-testing/UnsupportedMediaTypeTest.js:32:32)
09:31:11       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
09:31:11 
09:31:11   4) Unsupported media type requests
09:31:11        addPropertyStatement
09:31:11          addPropertyStatement responds 415 for an unsupported media type:
09:31:11 
09:31:11       AssertionError: 
09:31:11 7Response body: {}8
09:31:11 Invalid status: expected 200 to equal 415      
09:31:11       actual expected
09:31:11       
09:31:11       200415
09:31:11       
09:31:11       at Proxy.<anonymous> (tests/mocha/helpers/chaiHelper.js:91:8)
09:31:11       at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
09:31:11       at Context.<anonymous> (/workspace/src/extensions/Wikibase/repo/domains/crud/tests/mocha/api-testing/UnsupportedMediaTypeTest.js:32:32)
09:31:11       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
09:31:11 
09:31:11   5) Unsupported media type requests
09:31:11        addItem
09:31:11          addItem responds 415 for an unsupported media type:
09:31:11 
09:31:11       AssertionError: 
09:31:11 7Response body: {}8
09:31:11 Invalid status: expected 200 to equal 415      
09:31:11       actual expected
09:31:11       
09:31:11       200415
09:31:11       
09:31:11       at Proxy.<anonymous> (tests/mocha/helpers/chaiHelper.js:91:8)
09:31:11       at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
09:31:11       at Context.<anonymous> (/workspace/src/extensions/Wikibase/repo/domains/crud/tests/mocha/api-testing/UnsupportedMediaTypeTest.js:32:32)
09:31:11       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
09:31:11 
09:31:11   6) Unsupported media type requests
09:31:11        addProperty
09:31:11          addProperty responds 415 for an unsupported media type:
09:31:11 
09:31:11       AssertionError: 
09:31:11 7Response body: {}8
09:31:11 Invalid status: expected 200 to equal 415      
09:31:11       actual expected
09:31:11       
09:31:11       200415
09:31:11       
09:31:11       at Proxy.<anonymous> (tests/mocha/helpers/chaiHelper.js:91:8)
09:31:11       at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
09:31:11       at Context.<anonymous> (/workspace/src/extensions/Wikibase/repo/domains/crud/tests/mocha/api-testing/UnsupportedMediaTypeTest.js:32:32)
09:31:11       at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
09:31:11

Event Timeline

Change #1145816 had a related patch set uploaded (by WMDE-leszek; author: WMDE-leszek):

[mediawiki/extensions/Wikibase@master] DNM Confirm multipart/form-data is a culprit

https://gerrit.wikimedia.org/r/1145816

Change #1145830 had a related patch set uploaded (by Silvan Heintze; author: Silvan Heintze):

[mediawiki/extensions/Wikibase@master] REST: Temporarily skip tests to unblock CI

https://gerrit.wikimedia.org/r/1145830

Change #1145830 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Temporarily skip tests to unblock CI

https://gerrit.wikimedia.org/r/1145830

Change #1145921 had a related patch set uploaded (by Silvan Heintze; author: Silvan Heintze):

[mediawiki/extensions/Wikibase@master] REST: Fix 'Unsupported media type' e2e test

https://gerrit.wikimedia.org/r/1145921

I've managed to replicate the failures by running quibble locally. Notably, those test fail due to API unexpectedly responding 200 instead of 415, when running quibble from image docker-registry.wikimedia.org/releng/quibble-bullseye-php81:1.14.1, but pass, as they did until May 14, when using image docker-registry.wikimedia.org/releng/quibble-buster-php74:1.14.1. Reason unknown yet.

At quick look images differ by PHP version and php-81 image including opensearch. What difference could flip the API behaviour for POST requests with content type multipart/form-data still not known.

Tests pass when run in a container running quible-bullseye-php81:1.14.1 too, so I'd dare to speculate that culprit is somewhere around PHP 8, as debian version does not seem to matter (neither the addition of opensearch in bullseye images)

Change #1145921 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Fix 'Unsupported media type' e2e test

https://gerrit.wikimedia.org/r/1145921