Page MenuHomePhabricator

Add tests to ensure we catch ParserCache divergences between edit and read view code paths
Closed, DeclinedPublic

Description

We need to ensure we don’t corrupt parser cache if there are indeed divergences between edit and read views and catch regressions before deploy.

Possible test idea:

  • Put content through ParsoidOutputAccess and ParserOutputAccess and assert output is identical. (At least until we replace ParsoidOutputAccess…)

Event Timeline

ssastry triaged this task as Medium priority.Apr 6 2023, 2:24 PM
ssastry moved this task from Needs Triage to Testing on the Parsoid board.

Discussed with @daniel and we'd like this test code to live in the ParsoidCachePrewarmJob (T328034) and to randomly sample 1% of pages or so, and for those randomly selected pages generate "the same" output except using ParserOutputAccess instead of ParsoidOutputAccess and verify that the contents are identical, logging if not. (Also some unit tests comparing ParserOutputAccess and ParsoidOutputAccess for a more deterministic test, but these might miss interesting corner cases.)

MSantos raised the priority of this task from Medium to High.Aug 28 2023, 3:13 PM

We figured out that after all the patches and other testing, we didn't need to do this anymore.