Page MenuHomePhabricator

Argument 1 passed to Wikimedia\Parsoid\Html2Wt\WikitextSerializer::stripUnnecessaryHeadingNowikis() must be of the type string, null given, called in /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/src/Html2Wt/WikitextSerializer.php on line 1647
Open, MediumPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.34

message
Argument 1 passed to Wikimedia\Parsoid\Html2Wt\WikitextSerializer::stripUnnecessaryHeadingNowikis() must be of the type string, null given, called in /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/src/Html2Wt/WikitextSerializer.php on line 1647

Impact

Notes

Details

Request URL
https://no.wikipedia.org/w/rest.php/no.wikipedia.org/v3/transform/pagebundle/to/wikitext/Skole/21324597
Stack Trace
exception.trace
from /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/src/Html2Wt/WikitextSerializer.php(1371)
#0 /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/src/Html2Wt/WikitextSerializer.php(1647): Wikimedia\Parsoid\Html2Wt\WikitextSerializer->stripUnnecessaryHeadingNowikis(NULL)
#1 [internal function]: Wikimedia\Parsoid\Html2Wt\WikitextSerializer->Wikimedia\Parsoid\Html2Wt\{closure}(NULL)
#2 /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/src/Html2Wt/WikitextSerializer.php(1649): array_map(Closure, array)
#3 /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/src/Html2Wt/SelectiveSerializer.php(227): Wikimedia\Parsoid\Html2Wt\WikitextSerializer->serializeDOM(DOMElement, boolean)
#4 /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/src/Core/WikitextContentModelHandler.php(168): Wikimedia\Parsoid\Html2Wt\SelectiveSerializer->serializeDOM(DOMDocument)
#5 /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/src/Parsoid.php(281): Wikimedia\Parsoid\Core\WikitextContentModelHandler->fromDOM(Wikimedia\Parsoid\Config\Env, Wikimedia\Parsoid\Core\SelserData)
#6 /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/extension/src/Rest/Handler/ParsoidHandler.php(828): Wikimedia\Parsoid\Parsoid->dom2wikitext(MWParsoid\Config\PageConfig, DOMDocument, array, Wikimedia\Parsoid\Core\SelserData)
#7 /srv/mediawiki/php-1.36.0-wmf.34/vendor/wikimedia/parsoid/extension/src/Rest/Handler/TransformHandler.php(133): MWParsoid\Rest\Handler\ParsoidHandler->html2wt(MWParsoid\Config\PageConfig, array, string)
#8 /srv/mediawiki/php-1.36.0-wmf.34/includes/Rest/Router.php(395): MWParsoid\Rest\Handler\TransformHandler->execute()
#9 /srv/mediawiki/php-1.36.0-wmf.34/includes/Rest/Router.php(322): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\TransformHandler)
#10 /srv/mediawiki/php-1.36.0-wmf.34/includes/Rest/EntryPoint.php(165): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#11 /srv/mediawiki/php-1.36.0-wmf.34/includes/Rest/EntryPoint.php(130): MediaWiki\Rest\EntryPoint->execute()
#12 /srv/mediawiki/php-1.36.0-wmf.34/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#13 /srv/mediawiki/w/rest.php(3): require(string)
#14 {main}

Event Timeline

ssastry triaged this task as Medium priority.Mar 18 2021, 8:23 PM
ssastry created this task.

Change 674631 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Add some logging around failing preg_replace when serializing

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

Change 674631 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Add some logging around failing preg_replace when serializing

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

Change 677010 had a related patch set uploaded (by Subramanya Sastry; author: Subramanya Sastry):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a31

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

Change 676957 had a related patch set uploaded (by C. Scott Ananian; author: Subramanya Sastry):

[mediawiki/vendor@wmf/1.36.0-wmf.38] Bump wikimedia/parsoid to 0.13.0-a31

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

Change 677010 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.13.0-a31

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

Change 676957 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.36.0-wmf.38] Bump wikimedia/parsoid to 0.13.0-a31

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

Change 676957 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.36.0-wmf.38] Bump wikimedia/parsoid to 0.13.0-a31

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

@cscott wrote on Gerrit:

Missed the branch cut again, but sneaking this in before the train deploy.

Remember that by default code must not be merged in wmf branches unless you both can and will be deploying it shortly. I guess you thought the branch wasn't in production yet, but it was.

It never got deployed, and now others can't deploy changes to vendor.

For tomorrow, please rebase+deploy from the deployment host, or revert in Gerrit and cleanup deployment host state as needed; such that the outcome is that /srv/mediawiki-staging/php-1.36.0-wmf.38/vendor is either at or ahead of origin/wmf/1.36.0-wmf.38. This used to have an Icinga alert but it looks like that stopped working some time ago.

I'm pretty sure the divergence is not due to the vendor cherry-pick but instead to the security patch deployed for T279451. That's known by the deployment team I believe.

I'm pretty sure the divergence is not due to the vendor cherry-pick but instead to the security patch deployed for T279451. That's known by the deployment team I believe.

I don't think so...I just applied the patch to whatever was on vendor/ at the time:

legoktm@deploy1002:/srv/mediawiki-staging/php-1.36.0-wmf.38/vendor$ git reflog
bbda7041 (HEAD) HEAD@{0}: am: Use a protected key to distinguish comments internal to Parsoid
8dfbe7d3 HEAD@{1}: checkout: moving from master to 8dfbe7d3c23c357a395ddd9afa20f57a98347590
57a22548 (master) HEAD@{2}: clone: from https://gerrit.wikimedia.org/r/mediawiki/vendor

The real issue is that I don't see a core submodule bump: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+log/refs/heads/wmf/1.36.0-wmf.38 - the vendor submodule is still pointing to 8dfbe7d3c23 (rMWVD8dfbe7d3c23c: Bump wikimedia/parsoid to 0.13.0-a30).

The branch commit was *merged* at 10:14 PDT, while the vendor bump was at 7:54 PDT. Because the vendor commit was merged before the branch commit, there was no submodule for Gerrit to create an auto-bump commit for and it got missed.