Page MenuHomePhabricator

HTTP request blocked: https://meta.wikimedia.org/w/api.php?action=jsonschema&revid=18910134&formatversion=2&format=json by RemoteSchema::httpGet. Use MockHttpTrait.
Closed, ResolvedPublic

Description

Update: fixed by reverting https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EventLogging/+/645430; we'll continue using this ticket as we work through the cause.

Seen on a Wikibase patch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/649762

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-noselenium-docker/53689/console

Fallout from T262443: Do not hit actual urls during phpunit tests, being tracked in T265628: Identify which extensions' tests make HTTP requests and so are now broken post-T262443

03:05:15 1) WikimediaEvents\Tests\PageViewsTest::testLog
03:05:15 HTTP request blocked: https://meta.wikimedia.org/w/api.php?action=jsonschema&revid=18910134&formatversion=2&format=json by RemoteSchema::httpGet. Use MockHttpTrait.
03:05:15 
03:05:15 /workspace/src/tests/phpunit/mocks/NullHttpRequestFactory.php:43
03:05:15 /workspace/src/includes/http/HttpRequestFactory.php:189
03:05:15 /workspace/src/includes/http/HttpRequestFactory.php:212
03:05:15 /workspace/src/extensions/EventLogging/includes/RemoteSchema.php:108
03:05:15 /workspace/src/extensions/EventLogging/includes/RemoteSchema.php:57
03:05:15 /workspace/src/extensions/EventLogging/includes/EventLogging.php:191
03:05:15 /workspace/src/extensions/EventLogging/includes/EventLogging.php:84
03:05:15 /workspace/src/extensions/WikimediaEvents/includes/PageViews.php:229
03:05:15 /workspace/src/extensions/WikimediaEvents/tests/phpunit/PageViewsTest.php:489
03:05:15 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
03:05:15 /workspace/src/maintenance/doMaintenance.php:106

03:05:15 2) Wikibase\Client\Tests\Integration\Hooks\EchoNotificationsHandlersTest::testWikibaseHandleChange
03:05:15 HTTP request blocked: https://meta.wikimedia.org/w/api.php?action=jsonschema&revid=14208837&formatversion=2&format=json by RemoteSchema::httpGet. Use MockHttpTrait.
03:05:15 
03:05:15 /workspace/src/tests/phpunit/mocks/NullHttpRequestFactory.php:43
03:05:15 /workspace/src/includes/http/HttpRequestFactory.php:189
03:05:15 /workspace/src/includes/http/HttpRequestFactory.php:212
03:05:15 /workspace/src/extensions/EventLogging/includes/RemoteSchema.php:108
03:05:15 /workspace/src/extensions/EventLogging/includes/RemoteSchema.php:57
03:05:15 /workspace/src/extensions/EventLogging/includes/EventLogging.php:191
03:05:15 /workspace/src/extensions/EventLogging/includes/EventLogging.php:84
03:05:15 /workspace/src/extensions/WikimediaEvents/includes/WikimediaEventsHooks.php:299
03:05:15 /workspace/src/includes/deferred/MWCallableUpdate.php:38
03:05:15 /workspace/src/includes/deferred/DeferredUpdates.php:467
03:05:15 /workspace/src/includes/deferred/DeferredUpdates.php:344
03:05:15 /workspace/src/includes/deferred/DeferredUpdates.php:278
03:05:15 /workspace/src/includes/deferred/DeferredUpdates.php:194
03:05:15 /workspace/src/includes/deferred/DeferredUpdates.php:491
03:05:15 /workspace/src/maintenance/includes/Maintenance.php:698
03:05:15 /workspace/src/includes/libs/rdbms/database/Database.php:4241
03:05:15 /workspace/src/includes/libs/rdbms/database/Database.php:4610
03:05:15 /workspace/src/includes/libs/rdbms/database/Database.php:4371
03:05:15 /workspace/src/includes/libs/rdbms/database/DBConnRef.php:68
03:05:15 /workspace/src/includes/libs/rdbms/database/DBConnRef.php:629
03:05:15 /workspace/src/includes/Storage/PageUpdater.php:1132
03:05:15 /workspace/src/includes/Storage/PageUpdater.php:801
03:05:15 /workspace/src/includes/page/WikiPage.php:1964
03:05:15 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:1354
03:05:15 /workspace/src/extensions/Wikibase/client/tests/phpunit/integration/includes/Hooks/EchoNotificationsHandlersTest.php:171
03:05:15 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
03:05:15 /workspace/src/maintenance/doMaintenance.php:106

Event Timeline

Restricted Application added a subscriber: • Aklapper. · View Herald Transcript
Reedy renamed this task from WikimediaEvents\Tests\PageViewsTest::testLog HTTP request blocked: to WikimediaEvents\Tests\PageViewsTest::testLog HTTP request blocked.Dec 16 2020, 3:21 AM
Reedy updated the task description. (Show Details)
Reedy renamed this task from WikimediaEvents\Tests\PageViewsTest::testLog HTTP request blocked to HTTP request blocked: https://meta.wikimedia.org/w/api.php?action=jsonschema&revid=18910134&formatversion=2&format=json by RemoteSchema::httpGet. Use MockHttpTrait..Dec 16 2020, 3:23 AM
Reedy updated the task description. (Show Details)
Reedy updated the task description. (Show Details)
Michael added a project: Wikidata.

We're seeing this in other patches as well: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/649825

So, I'm raising its priority to "high" for now.

Nikerabbit raised the priority of this task from High to Unbreak Now!.Dec 16 2020, 12:11 PM
Nikerabbit subscribed.

git bisect says the first bad commit is the current HEAD of EventLogging, Iee3a49f3b9 (T253121). (Edit: I only tested the Wikibase test, don’t know if this also applies to the other failing test.)

Can be reproduced locally with:

php tests/phpunit/phpunit.php extensions/Wikibase/client/tests/phpunit/integration/includes/Hooks/EchoNotificationsHandlersTest.php

Change 649877 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/EventLogging@master] Skip EventLogging::logEventServiceEvent() in tests

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

Change 649878 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] DNM: empty change to test CI

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

Thanks for creating this ticket, we're looking into this now and should resolve soon.

Alright, then I’ll stop tinkering with my above changes for the time being :) thanks!

Alright, then I’ll stop tinkering with my above changes for the time being :) thanks!

No, I think it's fine to unbreak the CI for now. See my comments on your patch.

Change 649877 abandoned by Jason Linehan:
[mediawiki/extensions/EventLogging@master] Skip EventLogging::logEventServiceEvent() in tests

Reason:
Reverted https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EventLogging/ /645430/16

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

Change 649878 abandoned by Lucas Werkmeister (WMDE):
[mediawiki/extensions/Wikibase@master] DNM: empty change to test CI

Reason:
it works again \o/

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

Lucas_Werkmeister_WMDE lowered the priority of this task from Unbreak Now! to High.Dec 16 2020, 3:48 PM

Seems to be fixed for now. @jlinehan do you want to keep this task open to track your work on it (I assume you’ll eventually want to un-revert that change in some form), or is it okay to close?

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EventLogging/+/645430 was reverted while we examine the source of the error. Sorry for the inconvenience.

Seems to be fixed for now. @jlinehan do you want to keep this task open to track your work on it (I assume you’ll eventually want to un-revert that change in some form), or is it okay to close?

Yeah, it's OK to leave it open, thanks!

• jlinehan lowered the priority of this task from High to Medium.
• jlinehan updated the task description. (Show Details)

Change 649878 restored by Mholloway:
[mediawiki/extensions/Wikibase@master] DNM: empty change to test CI

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

Change 649878 abandoned by Mholloway:
[mediawiki/extensions/Wikibase@master] DNM: empty change to test CI

Reason:

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

The culprit was a missing check to ensure that the eventlogging service base URI was defined. A fixed version of the change is here: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EventLogging/+/649961