Page MenuHomePhabricator

Revision endpoint: InvalidArgumentException: ParserOutput does not have a render ID
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
message
InvalidArgumentException: ParserOutput does not have a render ID
trace
from /srv/mediawiki/php-1.42.0-wmf.15/includes/parser/Parsoid/ParsoidOutputAccess.php(140)
#0 /srv/mediawiki/php-1.42.0-wmf.15/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php(492): MediaWiki\Parser\Parsoid\ParsoidOutputAccess->getParsoidRenderID(MediaWiki\Parser\ParserOutput)
#1 /srv/mediawiki/php-1.42.0-wmf.15/includes/Rest/Handler/RevisionHTMLHandler.php(114): MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper->getETag(string)
#2 /srv/mediawiki/php-1.42.0-wmf.15/includes/Rest/Handler.php(256): MediaWiki\Rest\Handler\RevisionHTMLHandler->getETag()
#3 /srv/mediawiki/php-1.42.0-wmf.15/includes/Rest/Handler.php(273): MediaWiki\Rest\Handler->getConditionalHeaderUtil()
#4 /srv/mediawiki/php-1.42.0-wmf.15/includes/Rest/Router.php(555): MediaWiki\Rest\Handler->checkPreconditions()
#5 /srv/mediawiki/php-1.42.0-wmf.15/includes/Rest/Router.php(452): MediaWiki\Rest\Router->executeHandler(MediaWiki\Rest\Handler\RevisionHTMLHandler)
#6 /srv/mediawiki/php-1.42.0-wmf.15/includes/Rest/EntryPoint.php(195): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#7 /srv/mediawiki/php-1.42.0-wmf.15/includes/Rest/EntryPoint.php(135): MediaWiki\Rest\EntryPoint->execute()
#8 /srv/mediawiki/php-1.42.0-wmf.15/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#9 /srv/mediawiki/w/rest.php(3): require(string)
#10 {main}
Impact
  • Blocks PCS switchover to core page HTML

Event Timeline

Jgiannelos triaged this task as Medium priority.

This happens for non-wikitext pages. The example given in the task description is for User:Robertsky/AERpreferences.json.

See T349868: page/<title>/html and with_html endpoints fails with InvalidArgumentException for overridden interface messages with JSON content

thcipriani raised the priority of this task from Medium to Unbreak Now!.Feb 15 2024, 8:43 PM
thcipriani subscribed.

Seeing a huge spike of these following a rollback of group2 wikis to 1.42.0-wmf.17 at 2024-02-15 20:38

Question from IRC:

bd808 │ does https://gerrit.wikimedia.org/r/c/mediawiki/core/+/957773 just need to be backported
bd808 │ included in shows it as only in master + .18

Can anyone weigh in if that's safe to backport?

I'd rather not, the render ID patch is quite large.

Not sure why we'd get a spike of these after rollback, though -- if anything the rollforward code should be generating more render IDs than before. Hm.

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

[mediawiki/core@master] [ParserOutput] Back-compatibility with old cache render-id contents

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

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

[mediawiki/core@master] [ParserOutput] allow rollback of render id

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

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

[mediawiki/core@wmf/1.42.0-wmf.17] [ParserOutput] allow rollback of render id

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

Change 1003882 abandoned by C. Scott Ananian:

[mediawiki/core@master] [ParserOutput] allow rollback of render id

Reason:

Back-compat against master branch is in I437e0449f813ed5533d32a69d335313a63f4efad.

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

brennen lowered the priority of this task from Unbreak Now! to Needs Triage.Feb 15 2024, 10:15 PM

Change 1003833 abandoned by C. Scott Ananian:

[mediawiki/core@wmf/1.42.0-wmf.17] [ParserOutput] allow rollback of render id

Reason:

Turned out not to be needed (whew!)

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

cscott claimed this task.

Root cause: my original patch for https://gerrit.wikimedia.org/r/c/mediawiki/core/+/957773 changed the name of the render id property in parser cache, in a backward-compatible but not forward-compatible way. This has been a persistent issue for changes to ParserCache, and I should really know better. The result was that when the train was rolled back for T357668 we started getting new failures because of the ParserCache entries generated during the roll-forward.

Belt-and-suspenders, I wrote two patches, one for the "next version" to generate parser cache info under the "old name", and one for the "previous version" to recognize parser cache info under the "new name".

In the end, neither was needed: the safest course was to fix the unrelated T357668 and then just complete the roll-forward.

Change 1003881 abandoned by C. Scott Ananian:

[mediawiki/core@master] [ParserOutput] Back-compatibility with old cache render-id contents

Reason:

No longer needed.

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