Page MenuHomePhabricator

mediawiki-extensions-hhvm-jessie failures on EchoDiscussionParserTest
Closed, ResolvedPublic

Description

mediawiki-extensions-hhvm-jessie is failing on wmf/1.32.0-wmf.3.

From https://gerrit.wikimedia.org/r/#/c/432960/:

08:49:39 There were 3 failures:
08:49:39 
08:49:39 1) EchoDiscussionParserTest::testGenerateEventsForRevision with data set #1 (138275105, 138274875, 'Schnark', 'de', array(), 'UTPage', array(array('mention', 'Schnark', 'Echo-Test')))
08:49:39 Failed asserting that two arrays are equal.
08:49:39 --- Expected
08:49:39 +++ Actual
08:49:39 @@ @@
08:49:39  Array (
08:49:39 -    0 => Array (...)
08:49:39  )
08:49:39 
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/extensions/Echo/tests/phpunit/DiscussionParserTest.php:402
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/tests/phpunit/MediaWikiTestCase.php:423
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/maintenance/doMaintenance.php:94
08:49:39 
08:49:39 2) EchoDiscussionParserTest::testGenerateEventsForRevision with data set #2 (40610292, 40608353, 'PauloEduardo', 'pt', array('[[User:{{{1|<noinclude>Exempl...clude>'), 'UTPage', array(array('mention', 'PauloEduardo', 'Notificações')))
08:49:39 Failed asserting that two arrays are equal.
08:49:39 --- Expected
08:49:39 +++ Actual
08:49:39 @@ @@
08:49:39  Array (
08:49:39 -    0 => Array (...)
08:49:39  )
08:49:39 
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/extensions/Echo/tests/phpunit/DiscussionParserTest.php:402
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/tests/phpunit/MediaWikiTestCase.php:423
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/maintenance/doMaintenance.php:94
08:49:39 
08:49:39 3) EchoDiscussionParserTest::testSigningDetection with data set #10 ('Test --[[Benutzer:Schnark]] (...|js]])', array(7, 'Schnark'))
08:49:39 false does not match expected type "array".
08:49:39 
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/extensions/Echo/tests/phpunit/DiscussionParserTest.php:1053
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/tests/phpunit/MediaWikiTestCase.php:423
08:49:39 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/maintenance/doMaintenance.php:94
08:49:39 
08:49:39 FAILURES!
08:49:39 Tests: 15433, Assertions: 144048, Failures: 3, Skipped: 212.

Details

Related Gerrit Patches:
mediawiki/extensions/Echo : masterRe-enable DiscussionParser tests
mediawiki/extensions/Echo : wmf/1.33.0-wmf.21Remove problematic test case
mediawiki/extensions/Echo : masterRemove problematic test case
integration/config : masterRevert "Add GlobalPreferences to extension-gate"

Event Timeline

dcausse created this task.May 14 2018, 9:20 AM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptMay 14 2018, 9:20 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Is it failing in master too?

dcausse added a comment.EditedMay 14 2018, 5:06 PM

@Legoktm no I don't think so, it happens only on patches I cherry pick to this branch. See https://gerrit.wikimedia.org/r/#/c/432984/ a test patch cherry picked from master (succesfull build on the master branch: https://gerrit.wikimedia.org/r/#/c/432981/).

Niharika triaged this task as High priority.May 14 2018, 7:51 PM
Niharika added a subscriber: Niharika.

Making this high priority as it is blocking unrelated tasks from being deployed.

Legoktm renamed this task from mediawiki-extensions-hhvm-jessie failures on EchoDiscussionParserTest (wmf/1.32.0-wmf.3) to mediawiki-extensions-hhvm-jessie failures on EchoDiscussionParserTest on wmf/1.32.0-wmf.3 and REL1_31 but not master.May 15 2018, 9:43 PM

Change 433297 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[integration/config@master] Revert "Add GlobalPreferences to extension-gate"

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

After spending way too much time trying to identify a MediaWiki commit that caused it, I started looking through CI infra/config changes, noticed the addition of GlobalPreferences, reverted it on a hunch, and failures are gone. I'm guessing some master commit needs to be backported to REL1_31/wmf.3??

Change 433297 merged by jenkins-bot:
[integration/config@master] Revert "Add GlobalPreferences to extension-gate"

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

MaxSem added a subscriber: MaxSem.May 15 2018, 11:50 PM

GlobalPreferences was broken in wmf.3 (to the point it's surprising to me tests didn't fatal out completely). We could just wait for this branch to go out of prod and try again, but I'm not sure what's wrong with REL1_31.

For the reference, the absence of GP from extension-gate has caused a several-hours-long outage in betalabs last week, and as of the time of this being written, the extension is live in production. Therefore, not having it in prod is dangerous in the long run. How hard would it be to remove it from extension-gate only in REL1_31?

Vvjjkkii renamed this task from mediawiki-extensions-hhvm-jessie failures on EchoDiscussionParserTest on wmf/1.32.0-wmf.3 and REL1_31 but not master to v0caaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
Daimona renamed this task from v0caaaaaaa to mediawiki-extensions-hhvm-jessie failures on EchoDiscussionParserTest on wmf/1.32.0-wmf.3 and REL1_31 but not master.Jul 1 2018, 12:45 PM
Daimona updated the task description. (Show Details)
Daimona added subscribers: gerritbot, Aklapper.
Restricted Application added a project: Growth-Team. · View Herald TranscriptOct 5 2018, 1:45 PM
kostajh changed the task status from Open to Stalled.Oct 30 2018, 4:15 PM
kostajh moved this task from Needs Discussion/Analysis to Revisit on the Growth-Team board.
kostajh added a subscriber: kostajh.

If this is still seen, could someone please paste a gerrit patch and/or jenkins build URL?

Seen on master now as well, and affecting mediawiki/core commits.

https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/473769/
https://integration.wikimedia.org/ci/job/wmf-quibble-core-vendor-mysql-hhvm-docker/10206/console

There was 1 failure:

1) EchoDiscussionParserTest::testSigningDetection with data set #10 ('Test --[[Benutzer:Schnark]] (...|js]])', array(7, 'Schnark'))
=== Logs generated by test case
[wfDebug] [debug] User: loading options for user 2 from database. {"private":false}
[preferences] [debug] Loading global options for user '{user}' {"user":"Schnark"}
[GlobalTitleFail] [info] RequestContext::getTitle called by Hooks::run/Hooks::callHook/GlobalPreferences\Hooks::onUserSaveOptions/GlobalPreferences\GlobalPreferencesFactory->onGlobalPrefsPage/RequestContext->getTitle with no title set. {"private":false}
[PHPUnitCommand] [info] FAILURE in EchoDiscussionParserTest::testSigningDetection with data set #10: [PHPUnit_Framework_ExpectationFailedException] false does not match expected type "array". {"private":false}
===
false does not match expected type "array".

/workspace/src/extensions/Echo/tests/phpunit/DiscussionParserTest.php:1028
/workspace/src/tests/phpunit/MediaWikiTestCase.php:425
/workspace/src/maintenance/doMaintenance.php:94
Krinkle renamed this task from mediawiki-extensions-hhvm-jessie failures on EchoDiscussionParserTest on wmf/1.32.0-wmf.3 and REL1_31 but not master to mediawiki-extensions-hhvm-jessie failures on EchoDiscussionParserTest.Mar 8 2019, 11:39 PM
Krinkle changed the task status from Stalled to Open.
Krinkle removed a project: Patch-For-Review.
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMar 12 2019, 6:03 PM
kostajh claimed this task.Mar 12 2019, 6:16 PM
kostajh moved this task from Incoming to In Progress on the Growth-Team (Current Sprint) board.

For reasons not yet clear to me, replacing instances of Benutzer:Schnark with User:Schnark result in the test passing. In extensions/Echo/includes/DiscussionParser.php#extractUsersFromLine, this fails because Title::newFromText() doesn't get the user page when Benutzer is used.

			$match = explode( '|', $match, 2 );
			$title = Title::newFromText( $match[0] );

			// figure out if we the link is related to a user
			if (
				$title &&
				( $title->getNamespace() === NS_USER || $title->getNamespace() === NS_USER_TALK )
			) {

Change 495961 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/Echo@master] Remove problematic test case

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

Change 495961 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Remove problematic test case

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

SBisson moved this task from QA to Code Review on the Growth-Team (Current Sprint) board.

Change 496080 had a related patch set uploaded (by Krinkle; owner: Kosta Harlan):
[mediawiki/extensions/Echo@wmf/1.33.0-wmf.21] Remove problematic test case

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

Change 496080 merged by jenkins-bot:
[mediawiki/extensions/Echo@wmf/1.33.0-wmf.21] Remove problematic test case

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

Next step for this is to figure out how to fix the problematic test case.

kostajh lowered the priority of this task from High to Low.Mar 13 2019, 4:04 PM

Change 499660 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/Echo@master] Re-enable DiscussionParser tests

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

Change 499660 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Re-enable DiscussionParser tests

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

aaron closed this task as Resolved.Mar 28 2019, 7:16 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:09 PM