Page MenuHomePhabricator

Intermittent mediawiki-extensions-hhvm failures due to Flow unit test fetching live SpamBlacklist configuration
Closed, ResolvedPublic


Since Flow got added to the mediawiki-extensions job (T88206) in, the job intermittently fail:

There was 1 error:

1) Flow\Tests\Api\ApiFlowReplyTest::testTopLevelReply
Failed to open (Operation timed out after 4159 milliseconds ..)


Please address the unit tests and/or the underlying configuration to not fetch configuration (or any other url for that matter). Perhaps a mock object can do here. Or perhaps ensuring wg-variables are set correctly instead of relying on Jenkins or MediaWiki default settings (which is bad practice).

See MediaWiki core phpunit tests for examples of where relevant wg-variables are set to explicit values.

Event Timeline

Krinkle raised the priority of this task from to Unbreak Now!.
Krinkle updated the task description. (Show Details)
Krinkle added a subscriber: Krinkle.

@DannyH can someone please fix this ASAP? It's breaking other people's builds. Fix is great, otherwise we'll have to remove Flow from that group test job (before end of the day).

cc: @EBernhardson

gerritbot added a subscriber: gerritbot.

Change 189614 had a related patch set uploaded (by Mattflaschen):
Disable shared SpamBlacklist during tests.


The underlying cause is that the SpamBlacklist extension defaults to using a page from Meta.

We already have some code that's supposed to suppress this.

But it's obviously not working (anymore?). Anyway, I'm working on it.

Ran flow's test suite through strace with the '-e trace=connect' parameters to record all outgoing connections, SpamBlacklist contacting meta is the only external network request made. Depending on configuration parsoid is contacted, but that is disabled when run inside jenkins.

Checked a few core tests with strace as well, EditPageTest has the same problem of triggering SpamBlacklist via the default configuration. There may be others I didn't run the full core test suite.

@hashar or @zeljkofilipin or @Cmcmahon: can you make a call on this during your morning so that work isn't delayed tomorrow?

Change 189614 merged by jenkins-bot:
Disable shared SpamBlacklist during tests.

This should be fixed. However, it doesn't look like this is actually running on Flow commits, so it's hard to be sure.

If we did fix it, the job could easily re-break if it's not changed to vote on all the projects it runs, including Flow.

@Mattflaschen: I think @hashar knows more about how we'll rollout the new mediawiki-extensions-* jobs (to replace mwext-{name}-testextension-*), however I see it has been enabled in Flow a few weeks ago in the experimental pipeline. Leave a comment saying "check experimental" on a Flow patch to trigger it.

zuul#mwext-Flow and before that via the zuul#extensions-template.

Leave a comment saying "check experimental" on a Flow patch to trigger it.


Re-open if it happens again.

Thanks @Mattflaschen !

Last week I have noticed the debug.log have a lot of messages related to SpamBlacklist regex content and did notice it was fetching from meta. Should have filled a bug for it.

We will need a way to drop the default when running tests:

$wgBlacklistSettings = array(
    'spam' => array(
        'files' => array( "" )

I have filled tasks: