Page MenuHomePhabricator

MediaWiki core patches fail with: ParserIntegrationTest::testParse with data set "parserTests.txt: -{}- tags within headlines (within html for parserConvert())"
Closed, ResolvedPublicPRODUCTION ERROR

Description

All recent MediaWiki core patches fail with

13:50:31 1) ParserIntegrationTest::testParse with data set "parserTests.txt: -{}- tags within headlines (within html for parserConvert())" ('[details omitted]')
13:50:31 Failed asserting that two strings are equal.
13:50:31 --- Expected
13:50:31 +++ Actual
13:50:31 @@ @@
13:50:31 -'<h2><span id="-.7BNaslov.7D-"></span><span class="mw-headline" id="-{Naslov}-">Naslov</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Уреди одељак „Naslov“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>\n
13:50:31 +'<h2><span id="-.7BNaslov.7D-"></span><span class="mw-headline" id="-{Naslov}-">Naslov</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Уредите одељак „Naslov“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>\n
13:50:31  <p>Ноте тхат евен ан унпротецтед хеадлине ИД ис нот аффецтед бy лангуаге\n
13:50:31  цонверсион:\n
13:50:31  </p>\n
13:50:31 -<h2><span class="mw-headline" id="Latinski">Латински</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Уреди одељак „Латински“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>\n
13:50:31 +<h2><span class="mw-headline" id="Latinski">Латински</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Уредите одељак „Латински“">уреди</a><span class="mw-editsection-bracket">]</span></span></h2>\n
13:50:31 
13:50:31 /workspace/src/tests/phpunit/includes/parser/ParserIntegrationTest.php:53
13:50:31 /workspace/src/maintenance/doMaintenance.php:94
13:50:31 
13:50:31 2) ParserIntegrationTest::testParse with data set "parserTests.txt: T146305: Don't break image parsing if language converter markup is in the caption." ('[details omitted]')
13:50:31 Failed asserting that two strings are equal.
13:50:31 --- Expected
13:50:31 +++ Actual
13:50:31 @@ @@
13:50:31 -'<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећај"></a></div>caption:</div></div></div>\n
13:50:31 +'<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>  <div class="thumbcaption"><div class="magnify"><a href="/wiki/%D0%94%D0%B0%D1%82%D0%BE%D1%82%D0%B5%D0%BA%D0%B0:Foobar.jpg" class="internal" title="Повећајте"></a></div>caption:</div></div></div>\n
13:50:31 
13:50:31 /workspace/src/tests/phpunit/includes/parser/ParserIntegrationTest.php:53
13:50:31 /workspace/src/maintenance/doMaintenance.php:94
13:50:31 
13:50:31 FAILURES!
13:50:31 Tests: 6586, Assertions: 55752, Failures: 2, Skipped: 14.
13:50:31 Traceback (most recent call last):
13:50:31   File "/usr/local/bin/quibble", line 11, in <module>
13:50:31     load_entry_point('quibble==0.0.0', 'console_scripts', 'quibble')()
13:50:31   File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 462, in main
13:50:31     cmd.execute()
13:50:31   File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 443, in execute
13:50:31     quibble.test.run_phpunit_database(mwdir=self.mw_install_path)
13:50:31   File "/usr/local/lib/python3.5/dist-packages/quibble/test.py", line 126, in run_phpunit_database
13:50:31     run_phpunit(*args, **kwargs)
13:50:31   File "/usr/local/lib/python3.5/dist-packages/quibble/test.py", line 121, in run_phpunit
13:50:31     subprocess.check_call(cmd, cwd=mwdir, env=phpunit_env)
13:50:31   File "/usr/lib/python3.5/subprocess.py", line 271, in check_call
13:50:31     raise CalledProcessError(retcode, cmd)
13:50:31 subprocess.CalledProcessError: Command '['php', 'tests/phpunit/phpunit.php', '--debug-tests', '--group', 'Database', '--exclude-group', 'Broken,ParserFuzz,Stub']' returned non-zero exit status 1

It seems some parser test had a translation hardcoded and that translation changed.

Event Timeline

Tgr created this task.Jul 2 2018, 2:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 2 2018, 2:01 PM
Tgr added a comment.Jul 2 2018, 2:07 PM

Yeah, it was caused by this edit.

Tgr added a comment.Jul 2 2018, 2:19 PM

...and this one. (Edit section link title attribute and thumbnail magnifier icon title attribute, respectively.)

Change 443424 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] Update parser tests for translation change

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

Updated the test with the new language, obviously this is not a long-term fix though. Either someone should monitor the affected messages, or maybe we could replace

<a ... title="Уреди одељак „Naslov“">уреди</a>

with something like

<a ... title="⧼editsectionhint|Naslov⧽">⧼editsection⧽</a>

and then switch i back in post-processing. Or maybe somehow trick the parser and the message cache into seeing different languages?

Change 443424 merged by jenkins-bot:
[mediawiki/core@master] Update parser tests for translation change

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

hashar closed this task as Resolved.Jul 2 2018, 2:45 PM
hashar assigned this task to Tgr.
cscott added a subscriber: cscott.Jul 2 2018, 5:50 PM

Parsoid doesn't embed the edit hint in the generated HTML, FWIW.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM