When RESTBase is turned off, Parsoid runs will no longer be triggered
on template changes. This creates a new mechanism to do that, based on
the RevisionDataUpdates hook called by DerivedPageDataUpdater. The new
behavior is controlled by a feature flag, LinterParseOnDerivedDataUpdate,
which is enabled per default. In WMF production, this should be
turned off as long as we are still triggering Parsoid parses through
the pregeneration mechanism in RESTBase.
Note that this will not write ParserOutput to the ParserCache. On edits,
pages will get parsed with Parsoid twice, once to trigger the lint data
update, and once by ParsoidCachePrewarmJob to populate the ParserCache.
Both parses will trigger the ParserLogLinterData hook, the lint data
from the second parse is redundant.
However, while ParsoidCachePrewarmJob and RevisionDataUpdates get
triggered together on edits, they also get triggered separately:
ParsoidCachePrewarmJob by page views with parser cache misses; and
RevisionDataUpdates when pages get invalidated due to template changes.
Because ParsoidCachePrewarmJob and RevisionDataUpdates generally get
triggered in different situations, it seems cleaner to keep the two
mechanisms independent of each other, and live with the duplicate parse
on edit.
Bug: T361013
Change-Id: If53841ee583ce240dd245d640b9ea9c97e1eaa55
Since linting is currently tied up with read views, don't let a failure
to enqueue block a parse.
Bug: T364229
Change-Id: I9e8391d9f193aef72ca13ccda8ff6ab58ffc34da
Add support for new parsoid lint, missing-image-alt-text
Matches on images that don't have an alt text attribute at all
(empty alt attributes count as present).
Intended to make it easier to put workflows around these images,
including streamlined workflows for "microcontributions" in the
mobile apps.
As this has some impedence mismatch with usage of Special:LintErrors
this is marked as hidden (priority=none) so will not be displayed by
default, but has an enum value reserved for it and can be queried
explicitly.
Bug: T344378
Change-Id: I38cc1abbece3cca8155bec1f071b854027be0966
Additional debug logging allows us to verify the upcoming changes
in If53841ee583ce in production.
Bug: T361013
Change-Id: I261aacc1c9fa6483d88e94424d1f77d861f1a990
This had previously been fixed in
I2610b9b16d4032b0e18b3537cc9ed51bfdaff299 but a poor refactoring in
Ib3d3622144b670ebe1a4ce04e6db6811584d42c8 reintroduced it.
Bug: T363682
Change-Id: I378e802753c4284e7c5ec65148b43e0b41784cf3
Presumably it would be better if category priorities lived in their own
table so that we could do a join rather than an ever growing where in
clause. That would help Quarry users as well.
Bug: T334527
Change-Id: Ibd535a54565f6f474346c44ad7597fa0532faf6c
Instead, pass the page id when using methods for a page. The change
avoids constructing Database a dummy page id when those methods aren't
going to be used.
getFromId doesn't seem like it needs a page id, since the linter id is
the primary key.
Also, a namespace id should no longer optional to setForPage. The
LinterWriteNamespaceColumnStage option already gates whether to include
it in the row.
Follows-Up: I9fd6e7724dcf33be0b1feb19ec8eb448738cab09
Change-Id: Ib3d3622144b670ebe1a4ce04e6db6811584d42c8
And addresses some other cleanup from review comments.
Follows-Up: I9fd6e7724dcf33be0b1feb19ec8eb448738cab09
Change-Id: If87b0bf91930f0f8d89ed046d18aadb8f346f9aa