Page MenuHomePhabricator

Phonos ParserIntegrationTest test failure on CI while testing OOUI html output
Closed, ResolvedPublic

Description

Phonos is testing against expected html which is not under control of Phonos and now fails some ids on ooui-php-*

id="ooui-php-*" is generated via a static property (from e7efb19369e9c6f822330b46ed968a363bcb5bd6), so the number depends on the execution order of the test.
In the past (added in 9966616d637327519cb5edc7f1afcb2841cdf68d) the tests are working as Phonos was running at the only extension, maybe it now running with new dependencies or another extension is also increment the static property and Phonos now fails.

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Phonos/+/947851
https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-noselenium-docker/122989/console

There were 4 failures:

1) ParserIntegrationTest::testParse with data set "PhonosParserTests.txt: Empty parser function" ('legacy')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'<p>Phonos<span data-nosnippet="" id="ooui-php-1" class="ext-phonos ext-phonos-PhonosButton noexcerpt ext-phonos-error ext-phonos-PhonosButton-emptylabel oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-buttonWidget" data-ooui="{&quot;_&quot;:&quot;mw.Phonos.PhonosButton&quot;,&quot;rel&quot;:[&quot;nofollow&quot;],&quot;framed&quot;:false,&quot;icon&quot;:&quot;volumeOff&quot;,&quot;data&quot;:{&quot;ipa&quot;:&quot;&quot;,&quot;text&quot;:&quot;&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;wikibase&quot;:&quot;&quot;,&quot;error&quot;:&quot;Either IPA, a file, or a Wikibase item must be provided.&quot;},&quot;classes&quot;:[&quot;ext-phonos&quot;,&quot;ext-phonos-PhonosButton&quot;,&quot;noexcerpt&quot;,&quot;ext-phonos-error&quot;,&quot;ext-phonos-PhonosButton-emptylabel&quot;]}"><a role="button" tabindex="0" rel="nofollow" class="oo-ui-buttonElement-button"><span class="oo-ui-iconElement-icon oo-ui-icon-volumeOff"></span><span class="oo-ui-labelElement-label"></span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator"></span></a></span>END\n
+'<p>Phonos<span data-nosnippet="" id="ooui-php-490" class="ext-phonos ext-phonos-PhonosButton noexcerpt ext-phonos-error ext-phonos-PhonosButton-emptylabel oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-buttonWidget" data-ooui="{&quot;_&quot;:&quot;mw.Phonos.PhonosButton&quot;,&quot;rel&quot;:[&quot;nofollow&quot;],&quot;framed&quot;:false,&quot;icon&quot;:&quot;volumeOff&quot;,&quot;data&quot;:{&quot;ipa&quot;:&quot;&quot;,&quot;text&quot;:&quot;&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;wikibase&quot;:&quot;&quot;,&quot;error&quot;:&quot;Either IPA, a file, or a Wikibase item must be provided.&quot;},&quot;classes&quot;:[&quot;ext-phonos&quot;,&quot;ext-phonos-PhonosButton&quot;,&quot;noexcerpt&quot;,&quot;ext-phonos-error&quot;,&quot;ext-phonos-PhonosButton-emptylabel&quot;]}"><a role="button" tabindex="0" rel="nofollow" class="oo-ui-buttonElement-button"><span class="oo-ui-iconElement-icon oo-ui-icon-volumeOff"></span><span class="oo-ui-labelElement-label"></span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator"></span></a></span>END\n
 </p>'

/workspace/src/tests/phpunit/suites/ParserIntegrationTest.php:68
/workspace/src/tests/phpunit/suites/SuiteEventsTrait.php:69
/workspace/src/tests/phpunit/suites/SuiteEventsTrait.php:69
phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97
=== Logs generated by test case
[wfDebug] [debug] ParserTestRunner::runLegacyTest: running Empty parser function {"private":false}
[wfDebug] [debug] ParserFactory: using default preprocessor {"private":false}
===

2) ParserIntegrationTest::testParse with data set "PhonosParserTests.txt: Given the ipa, file and text parameters" ('legacy')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'<p>Phonos<span data-nosnippet="" id="ooui-php-2" class="ext-phonos ext-phonos-PhonosButton noexcerpt ext-phonos-error oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-labelElement oo-ui-buttonWidget" data-ooui="{&quot;_&quot;:&quot;mw.Phonos.PhonosButton&quot;,&quot;rel&quot;:[&quot;nofollow&quot;],&quot;framed&quot;:false,&quot;icon&quot;:&quot;volumeOff&quot;,&quot;label&quot;:&quot;h\u025b\u02c8lo\u028a&quot;,&quot;data&quot;:{&quot;ipa&quot;:&quot;h\u025b\u02c8lo\u028a&quot;,&quot;text&quot;:&quot;Hello&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;wikibase&quot;:&quot;&quot;,&quot;file&quot;:&quot;does-not-exist.ogg&quot;,&quot;error&quot;:&quot;phonos-file-not-found&quot;},&quot;classes&quot;:[&quot;ext-phonos&quot;,&quot;ext-phonos-PhonosButton&quot;,&quot;noexcerpt&quot;,&quot;ext-phonos-error&quot;]}"><a role="button" tabindex="0" rel="nofollow" aria-label="Play audio" class="oo-ui-buttonElement-button"><span class="oo-ui-iconElement-icon oo-ui-icon-volumeOff"></span><span class="oo-ui-labelElement-label">hɛˈloʊ</span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator"></span></a></span><sup class="ext-phonos-attribution noexcerpt"><a href="/index.php?title=Special:Upload&amp;wpDestFile=does-not-exist.ogg" class="new" title="File:does-not-exist.ogg"><span class="mw-file-element mw-broken-media">i</span></a></sup>END\n
+'<p>Phonos<span data-nosnippet="" id="ooui-php-491" class="ext-phonos ext-phonos-PhonosButton noexcerpt ext-phonos-error oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-labelElement oo-ui-buttonWidget" data-ooui="{&quot;_&quot;:&quot;mw.Phonos.PhonosButton&quot;,&quot;rel&quot;:[&quot;nofollow&quot;],&quot;framed&quot;:false,&quot;icon&quot;:&quot;volumeOff&quot;,&quot;label&quot;:&quot;h\u025b\u02c8lo\u028a&quot;,&quot;data&quot;:{&quot;ipa&quot;:&quot;h\u025b\u02c8lo\u028a&quot;,&quot;text&quot;:&quot;Hello&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;wikibase&quot;:&quot;&quot;,&quot;file&quot;:&quot;does-not-exist.ogg&quot;,&quot;error&quot;:&quot;phonos-file-not-found&quot;},&quot;classes&quot;:[&quot;ext-phonos&quot;,&quot;ext-phonos-PhonosButton&quot;,&quot;noexcerpt&quot;,&quot;ext-phonos-error&quot;]}"><a role="button" tabindex="0" rel="nofollow" aria-label="Play audio" class="oo-ui-buttonElement-button"><span class="oo-ui-iconElement-icon oo-ui-icon-volumeOff"></span><span class="oo-ui-labelElement-label">hɛˈloʊ</span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator"></span></a></span><sup class="ext-phonos-attribution noexcerpt"><a href="/index.php?title=Special:Upload&amp;wpDestFile=does-not-exist.ogg" class="new" title="File:does-not-exist.ogg"><span class="mw-file-element mw-broken-media">i</span></a></sup>END\n
 </p>'

/workspace/src/tests/phpunit/suites/ParserIntegrationTest.php:68
/workspace/src/tests/phpunit/suites/SuiteEventsTrait.php:69
/workspace/src/tests/phpunit/suites/SuiteEventsTrait.php:69
phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97
=== Logs generated by test case
[wfDebug] [debug] ParserTestRunner::runLegacyTest: running Given the ipa, file and text parameters {"private":false}
[wfDebug] [debug] ParserFactory: using default preprocessor {"private":false}
[GlobalTitleFail] [info] MessageCache::parse called with no title set. {"exception":{}}
===

3) ParserIntegrationTest::testParse with data set "PhonosParserTests.txt: Given the ipa, file, text and label parameters" ('legacy')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'<p>Phonos<span data-nosnippet="" id="ooui-php-3" class="ext-phonos ext-phonos-PhonosButton noexcerpt ext-phonos-error oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-labelElement oo-ui-buttonWidget" data-ooui="{&quot;_&quot;:&quot;mw.Phonos.PhonosButton&quot;,&quot;rel&quot;:[&quot;nofollow&quot;],&quot;framed&quot;:false,&quot;icon&quot;:&quot;volumeOff&quot;,&quot;label&quot;:{&quot;html&quot;:&quot;Foo&lt;b&gt;bar&lt;\/b&gt;&quot;},&quot;data&quot;:{&quot;ipa&quot;:&quot;h\u025b\u02c8lo\u028a&quot;,&quot;text&quot;:&quot;Hello&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;wikibase&quot;:&quot;&quot;,&quot;file&quot;:&quot;does-not-exist.ogg&quot;,&quot;error&quot;:&quot;phonos-file-not-found&quot;},&quot;classes&quot;:[&quot;ext-phonos&quot;,&quot;ext-phonos-PhonosButton&quot;,&quot;noexcerpt&quot;,&quot;ext-phonos-error&quot;]}"><a role="button" tabindex="0" rel="nofollow" aria-label="Play audio" class="oo-ui-buttonElement-button"><span class="oo-ui-iconElement-icon oo-ui-icon-volumeOff"></span><span class="oo-ui-labelElement-label">Foo<b>bar</b></span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator"></span></a></span><sup class="ext-phonos-attribution noexcerpt"><a href="/index.php?title=Special:Upload&amp;wpDestFile=does-not-exist.ogg" class="new" title="File:does-not-exist.ogg"><span class="mw-file-element mw-broken-media">i</span></a></sup>END\n
+'<p>Phonos<span data-nosnippet="" id="ooui-php-492" class="ext-phonos ext-phonos-PhonosButton noexcerpt ext-phonos-error oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-labelElement oo-ui-buttonWidget" data-ooui="{&quot;_&quot;:&quot;mw.Phonos.PhonosButton&quot;,&quot;rel&quot;:[&quot;nofollow&quot;],&quot;framed&quot;:false,&quot;icon&quot;:&quot;volumeOff&quot;,&quot;label&quot;:{&quot;html&quot;:&quot;Foo&lt;b&gt;bar&lt;\/b&gt;&quot;},&quot;data&quot;:{&quot;ipa&quot;:&quot;h\u025b\u02c8lo\u028a&quot;,&quot;text&quot;:&quot;Hello&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;wikibase&quot;:&quot;&quot;,&quot;file&quot;:&quot;does-not-exist.ogg&quot;,&quot;error&quot;:&quot;phonos-file-not-found&quot;},&quot;classes&quot;:[&quot;ext-phonos&quot;,&quot;ext-phonos-PhonosButton&quot;,&quot;noexcerpt&quot;,&quot;ext-phonos-error&quot;]}"><a role="button" tabindex="0" rel="nofollow" aria-label="Play audio" class="oo-ui-buttonElement-button"><span class="oo-ui-iconElement-icon oo-ui-icon-volumeOff"></span><span class="oo-ui-labelElement-label">Foo<b>bar</b></span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator"></span></a></span><sup class="ext-phonos-attribution noexcerpt"><a href="/index.php?title=Special:Upload&amp;wpDestFile=does-not-exist.ogg" class="new" title="File:does-not-exist.ogg"><span class="mw-file-element mw-broken-media">i</span></a></sup>END\n
 </p>'

/workspace/src/tests/phpunit/suites/ParserIntegrationTest.php:68
/workspace/src/tests/phpunit/suites/SuiteEventsTrait.php:69
/workspace/src/tests/phpunit/suites/SuiteEventsTrait.php:69
phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97
=== Logs generated by test case
[wfDebug] [debug] ParserTestRunner::runLegacyTest: running Given the ipa, file, text and label parameters {"private":false}
[wfDebug] [debug] ParserFactory: using default preprocessor {"private":false}
[GlobalTitleFail] [info] MessageCache::parse called with no title set. {"exception":{}}
===

4) ParserIntegrationTest::testParse with data set "PhonosParserTests.txt: Given a file and a blank label" ('legacy')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'<p>Phonos<span data-nosnippet="" id="ooui-php-4" class="ext-phonos ext-phonos-PhonosButton noexcerpt ext-phonos-error ext-phonos-PhonosButton-emptylabel oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-buttonWidget" data-ooui="{&quot;_&quot;:&quot;mw.Phonos.PhonosButton&quot;,&quot;rel&quot;:[&quot;nofollow&quot;],&quot;framed&quot;:false,&quot;icon&quot;:&quot;volumeOff&quot;,&quot;data&quot;:{&quot;ipa&quot;:&quot;&quot;,&quot;text&quot;:&quot;&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;wikibase&quot;:&quot;&quot;,&quot;file&quot;:&quot;does-not-exist.ogg&quot;,&quot;error&quot;:&quot;phonos-file-not-found&quot;},&quot;classes&quot;:[&quot;ext-phonos&quot;,&quot;ext-phonos-PhonosButton&quot;,&quot;noexcerpt&quot;,&quot;ext-phonos-error&quot;,&quot;ext-phonos-PhonosButton-emptylabel&quot;]}"><a role="button" tabindex="0" rel="nofollow" aria-label="Play audio" class="oo-ui-buttonElement-button"><span class="oo-ui-iconElement-icon oo-ui-icon-volumeOff"></span><span class="oo-ui-labelElement-label"></span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator"></span></a></span><sup class="ext-phonos-attribution noexcerpt"><a href="/index.php?title=Special:Upload&amp;wpDestFile=does-not-exist.ogg" class="new" title="File:does-not-exist.ogg"><span class="mw-file-element mw-broken-media">i</span></a></sup>END\n
+'<p>Phonos<span data-nosnippet="" id="ooui-php-493" class="ext-phonos ext-phonos-PhonosButton noexcerpt ext-phonos-error ext-phonos-PhonosButton-emptylabel oo-ui-widget oo-ui-widget-enabled oo-ui-buttonElement oo-ui-buttonElement-frameless oo-ui-iconElement oo-ui-buttonWidget" data-ooui="{&quot;_&quot;:&quot;mw.Phonos.PhonosButton&quot;,&quot;rel&quot;:[&quot;nofollow&quot;],&quot;framed&quot;:false,&quot;icon&quot;:&quot;volumeOff&quot;,&quot;data&quot;:{&quot;ipa&quot;:&quot;&quot;,&quot;text&quot;:&quot;&quot;,&quot;lang&quot;:&quot;en&quot;,&quot;wikibase&quot;:&quot;&quot;,&quot;file&quot;:&quot;does-not-exist.ogg&quot;,&quot;error&quot;:&quot;phonos-file-not-found&quot;},&quot;classes&quot;:[&quot;ext-phonos&quot;,&quot;ext-phonos-PhonosButton&quot;,&quot;noexcerpt&quot;,&quot;ext-phonos-error&quot;,&quot;ext-phonos-PhonosButton-emptylabel&quot;]}"><a role="button" tabindex="0" rel="nofollow" aria-label="Play audio" class="oo-ui-buttonElement-button"><span class="oo-ui-iconElement-icon oo-ui-icon-volumeOff"></span><span class="oo-ui-labelElement-label"></span><span class="oo-ui-indicatorElement-indicator oo-ui-indicatorElement-noIndicator"></span></a></span><sup class="ext-phonos-attribution noexcerpt"><a href="/index.php?title=Special:Upload&amp;wpDestFile=does-not-exist.ogg" class="new" title="File:does-not-exist.ogg"><span class="mw-file-element mw-broken-media">i</span></a></sup>END\n
 </p>'

/workspace/src/tests/phpunit/suites/ParserIntegrationTest.php:68
/workspace/src/tests/phpunit/suites/SuiteEventsTrait.php:69
/workspace/src/tests/phpunit/suites/SuiteEventsTrait.php:69
phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97
=== Logs generated by test case
[wfDebug] [debug] ParserTestRunner::runLegacyTest: running Given a file and a blank label {"private":false}
[wfDebug] [debug] ParserFactory: using default preprocessor {"private":false}
[GlobalTitleFail] [info] MessageCache::parse called with no title set. {"exception":{}}
===

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 955069 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/Phonos@master] Disable parser tests

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

Samwilson subscribed.

As a temporary fix, to get CI passing for other tasks, we'll disable the parser tests.

The actual fix for this is to reset the OOUI ID number, which is a change to core (and elsewhere).

Change 955069 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Disable parser tests

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

Change 955047 had a related patch set uploaded (by Tim Starling; author: Samwilson):

[mediawiki/extensions/Phonos@wmf/1.41.0-wmf.25] Disable parser tests

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

Change 955047 merged by jenkins-bot:

[mediawiki/extensions/Phonos@wmf/1.41.0-wmf.25] Disable parser tests

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

Change 955158 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[oojs/ui@master] Add Tag::resetElementId()

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

Change 955159 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/core@master] Reset the OOUI element ID before each test

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

Change 955161 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/extensions/Phonos@master] Re-enable parser tests

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

Change 955158 merged by jenkins-bot:

[oojs/ui@master] Add Tag::resetElementId()

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

Change 956898 had a related patch set uploaded (by Samtar; author: Samtar):

[oojs/ui@master] Tag: Add warning comment to Tag::resetElementId()

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

Change 956898 merged by jenkins-bot:

[oojs/ui@master] Tag: Add warning comment to Tag::resetElementId()

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

Change 955159 merged by jenkins-bot:

[mediawiki/core@master] Reset the OOUI element ID before each test

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

Change 955161 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Re-enable parser tests

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

dom_walden subscribed.

From what I can tell, the PHPUnit tests are passing. Moving to Done.

MusikAnimal claimed this task.
MusikAnimal reassigned this task from MusikAnimal to tstarling.
MusikAnimal subscribed.