Page MenuHomePhabricator

Move all cache property initialization into ContentRenderer
Open, HighPublic

Description

Currently we check-and-set ParserOutput::getCacheTime(), ::getCacheRevisionId(), ::getTimestamp() and ::getRenderId() in multiple places.

These should be moved earlier in the parse pipeline (in particular pulled into ContentRenderer) and instead turned into deprecation warnings (and later thrown exceptions) asserting that the properties have already been set.

Event Timeline

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

[mediawiki/core@master] Add ParserOutput::{get,set}RenderId() and set render id in ContentRenderer

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

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

[mediawiki/core@master] [poolcounter] Remove incomplete workaround for T48014

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

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

[mediawiki/core@master] [ParserCache] Add logging for T350538

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

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

[mediawiki/core@master] [ParsoidParser] Warn if render ID is not set

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

Change 957773 merged by jenkins-bot:

[mediawiki/core@master] Add ParserOutput::{get,set}RenderId() and set render id in ContentRenderer

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

Change 971980 merged by jenkins-bot:

[mediawiki/core@master] [poolcounter] Remove incomplete workaround for T48014

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

Change 971981 merged by jenkins-bot:

[mediawiki/core@master] [ParserCache] Add logging for T350538

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

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

[mediawiki/core@master] [ParsoidParser] Add warning to ParsoidParser::setParsoidRenderID()

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

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

[mediawiki/core@master] Tighten up phan type for ContentRenderer::getParserOutput()

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

Change 1007418 merged by jenkins-bot:

[mediawiki/core@master] Tighten up phan type for ContentRenderer::getParserOutput()

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

Change #999082 abandoned by C. Scott Ananian:

[mediawiki/core@master] [ParsoidParser] Add warning to ParsoidParser::setParsoidRenderID()

Reason:

The call chain is actually ContentRenderer->ContentHandler->ParsoidParser, so the ContentRenderer won't get a chance to set the render ID here until after the ParsoidParser returns.

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

Change #971982 merged by jenkins-bot:

[mediawiki/core@master] [ParsoidParser] Remove unneeded code to set render ID

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